From: Pengcheng Chen Date: Wed, 4 Dec 2019 10:04:14 +0000 (+0800) Subject: vpp: fix afbc mif setting error caused video display abnormal [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=935e3df26164de8773dd04df8e266f9023ebd13c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git vpp: fix afbc mif setting error caused video display abnormal [1/1] PD#SWPL-17687 Problem: afbc mif width size set error Solution: fix afbc mif setting error issue Verify: Verify on X301 Change-Id: I76e32cf6e86cdfa30b7d48f710c51a2032a66fa1 Signed-off-by: Pengcheng Chen (cherry picked from commit 8900537c81fb326bf2db8f1fa9bd62025c57b898) --- diff --git a/drivers/amlogic/media/video_sink/video_hw.c b/drivers/amlogic/media/video_sink/video_hw.c index 25083435bac8..30caa9436f32 100644 --- a/drivers/amlogic/media/video_sink/video_hw.c +++ b/drivers/amlogic/media/video_sink/video_hw.c @@ -1436,7 +1436,7 @@ static s32 vd1_afbc_setting_tl1(struct mif_pos_s *setting) (setting->src_w - 1) + 1, 32); mif_blk_bgn_h = crop_left / 32; mif_blk_end_h = (crop_left + setting->end_x_lines - - setting->start_x_lines + 1) / 32; + setting->start_x_lines) / 32; pix_bgn_h = crop_left - mif_blk_bgn_h * 32; pix_end_h = pix_bgn_h + setting->end_x_lines - setting->start_x_lines; @@ -1462,7 +1462,7 @@ static s32 vd1_afbc_setting_tl1(struct mif_pos_s *setting) vsize_in = round_up((setting->src_h - 1) + 1, 4); mif_blk_bgn_v = crop_top / 4; mif_blk_end_v = (crop_top + setting->end_y_lines - - setting->start_y_lines + 1) / 4; + setting->start_y_lines) / 4; pix_bgn_v = crop_top - mif_blk_bgn_v * 4; pix_end_v = pix_bgn_v + setting->end_y_lines - setting->start_y_lines;