vpp: fix afbc mif setting error caused vd2 display abnormal [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Thu, 5 Dec 2019 10:48:05 +0000 (18:48 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 10 Dec 2019 01:53:32 +0000 (18:53 -0700)
PD#SWPL-17687

Problem:
afbc vd2 mif width size set error

Solution:
fix afbc vd2 mif setting error issue

Verify:
Verify on X301

Change-Id: I4e24b58ab581e2f15fae1becb7120b6bbc951175
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
(cherry picked from commit 7f43e78548f34f26d9bcaae7995a5b6c6365b5d7)

drivers/amlogic/media/video_sink/video_hw.c

index 30caa9436f325897efc4f79e3e553d93f65a4a39..0a4c0e62f2d6d501951deef1f247135661434ed3 100644 (file)
@@ -1715,7 +1715,7 @@ static s32 vd2_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;
@@ -1741,7 +1741,7 @@ static s32 vd2_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;