From 89a190a7dcaeb9def55ae615185d347334c6dbf8 Mon Sep 17 00:00:00 2001 From: Yong Qin Date: Thu, 28 Feb 2019 11:24:59 +0800 Subject: [PATCH] vpp: support the interlace format from vdin afbc [1/2] PD#SWPL-5205 Problem: Now vdin support afbc+interlace format Solution: In vpp, add case to support vdin afbc with interlace Verify: tl1_x301, verify pass Change-Id: I6540b03a6cb5308fc2bc202069aa87234fd35df6 Signed-off-by: Yong Qin --- drivers/amlogic/media/video_sink/video.c | 16 +++++++++++++++- drivers/amlogic/media/video_sink/vpp.c | 5 ++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 2c0d699..9883e3e 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -494,6 +494,7 @@ const char video_dev_id2[] = "amvideo-dev2"; int onwaitendframe; static u32 vpp_hold_line = 8; +static u32 stop_update; struct video_dev_s video_dev[2] = { {0x1d00 - 0x1d00, 0x1a50 - 0x1a50}, @@ -4026,6 +4027,8 @@ static void vsync_toggle_frame(struct vframe_s *vf) #endif } } + if (stop_update) + frame_par_ready_to_set = 0; } static void viu_set_dcu(struct vpp_frame_par_s *frame_par, struct vframe_s *vf) @@ -7072,7 +7075,15 @@ SET_FILTER: u32 zoom_start_y, zoom_end_y; correct_vd1_mif_size_for_DV(cur_frame_par); if (cur_dispbuf->type & VIDTYPE_INTERLACE) { - if (cur_dispbuf->type & VIDTYPE_VIU_FIELD) { + if (cur_dispbuf->type + & VIDTYPE_COMPRESS) { + /* for vdin afbc and interlace case */ + zoom_start_y = + cur_frame_par->VPP_vd_start_lines_; + zoom_end_y = + cur_frame_par->VPP_vd_end_lines_; + } else if (cur_dispbuf->type + & VIDTYPE_VIU_FIELD) { zoom_start_y = cur_frame_par->VPP_vd_start_lines_ >> 1; @@ -12796,6 +12807,9 @@ module_param(toggle_count, uint, 0664); MODULE_PARM_DESC(vpp_hold_line, "\n vpp_hold_line\n"); module_param(vpp_hold_line, uint, 0664); +MODULE_PARM_DESC(stop_update, "\n stop_update\n"); +module_param(stop_update, uint, 0664); + MODULE_PARM_DESC(reference_zorder, "\n reference_zorder\n"); module_param(reference_zorder, uint, 0664); diff --git a/drivers/amlogic/media/video_sink/vpp.c b/drivers/amlogic/media/video_sink/vpp.c index 4290494..3d5db31 100644 --- a/drivers/amlogic/media/video_sink/vpp.c +++ b/drivers/amlogic/media/video_sink/vpp.c @@ -2928,7 +2928,10 @@ int vpp_set_filters( aspect_ratio = (vf->ratio_control & DISP_RATIO_ASPECT_RATIO_MASK) >> DISP_RATIO_ASPECT_RATIO_BIT; - if (vf->type & VIDTYPE_INTERLACE) + /* the height from vdin afbc will be half */ + /* so need no interlace in */ + if ((vf->type & VIDTYPE_INTERLACE) + && !(vf->type & VIDTYPE_COMPRESS)) vpp_flags = VPP_FLAG_INTERLACE_IN; if (vf->ratio_control & DISP_RATIO_PORTRAIT_MODE) -- 2.7.4