From 0353f8ec762e0bc07b303e55b9c29f9a7bf91513 Mon Sep 17 00:00:00 2001 From: Pengcheng Chen Date: Thu, 18 Jul 2019 20:09:31 +0800 Subject: [PATCH] vpp: fix afbc scope set when video reverse [1/1] PD#SWPL-9397 Problem: afbc scope set error when video reverse and afbc width not aligned Solution: fix afbc scope set when video reverse Verify: Verify on TL1-x301 Change-Id: I1631c18192f438bfb6e60c3970789a903d0a3d19 Signed-off-by: Pengcheng Chen --- drivers/amlogic/media/video_sink/video.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 6e55c5a..b77c320 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -2110,7 +2110,10 @@ static void zoom_display_horz( #ifdef TV_REVERSE if (reverse) { content_w = zoom_end_x_lines - zoom_start_x_lines + 1; - content_l = (r_aligned - zoom_end_x_lines - 1); + if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) + content_l = 0; + else + content_l = (r_aligned - zoom_end_x_lines - 1); content_r = content_l + content_w - 1; VSYNC_WR_MPEG_REG(AFBC_PIXEL_HOR_SCOPE, (((content_l << 16)) | content_r) / h_skip); @@ -2209,8 +2212,12 @@ static void vd2_zoom_display_horz(struct vframe_s *vf, int hscale) #ifdef TV_REVERSE if (reverse) { content_w = zoom2_end_x_lines - zoom2_start_x_lines + 1; - content_l = (r_aligned - zoom2_end_x_lines - 1) + - (zoom2_start_x_lines - l_aligned); + if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) + content_l = 0; + else + content_l = (r_aligned - zoom2_end_x_lines + - 1) + (zoom2_start_x_lines + - l_aligned); content_r = content_l + content_w - 1; VSYNC_WR_MPEG_REG(VD2_AFBC_PIXEL_HOR_SCOPE, (content_l << 16) | content_r); -- 2.7.4