vpp: fix afbc mif setting error caused video display abnormal [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Wed, 4 Dec 2019 10:04:14 +0000 (18:04 +0800)
committerPengcheng Chen <pengcheng.chen@amlogic.com>
Tue, 10 Dec 2019 01:03:14 +0000 (18:03 -0700)
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 <pengcheng.chen@amlogic.com>
(cherry picked from commit 8900537c81fb326bf2db8f1fa9bd62025c57b898)

drivers/amlogic/media/video_sink/video_hw.c

index 25083435bac84356d9f424c34e4c75e6b7868dd3..30caa9436f325897efc4f79e3e553d93f65a4a39 100644 (file)
@@ -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;