vpp: set the preblend horz size correctly for hdr input [2/2]
authorBrian Zhu <brian.zhu@amlogic.com>
Wed, 26 Dec 2018 14:37:51 +0000 (22:37 +0800)
committerLuan Yuan <luan.yuan@amlogic.com>
Fri, 28 Dec 2018 11:28:05 +0000 (19:28 +0800)
PD#SWPL-3478

Problem:
the border below has a abnormal line

Solution:
Set the preblend horz size correct

Verify:
verify on T962X2-X301

Change-Id: Ie7b20a6b030d40d3a0eb3458df07e7632491aa2c
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index 7932cf2..16f7448 100644 (file)
@@ -1390,7 +1390,16 @@ static void vpp_settings_h(struct vpp_frame_par_s *framePtr)
                        ((framePtr->VPP_hsc_endp & VPP_VD_SIZE_MASK)
                        << VPP_VD1_END_BIT));
                } else{
-
+                       if (!legacy_vpp) {
+                               x_lines = (zoom_end_x_lines -
+                                       zoom_start_x_lines + 1)
+                                       / (framePtr->hscale_skip_count + 1);
+                               VSYNC_WR_MPEG_REG(
+                               VPP_PREBLEND_VD1_H_START_END,
+                               ((0 & VPP_VD_SIZE_MASK) <<
+                               VPP_VD1_START_BIT) | (((x_lines - 1) &
+                               VPP_VD_SIZE_MASK) << VPP_VD1_END_BIT));
+                       }
                        VSYNC_WR_MPEG_REG(VPP_POSTBLEND_VD1_H_START_END +
                        cur_dev->vpp_off,
                        ((framePtr->VPP_hsc_startp & VPP_VD_SIZE_MASK)