From f932ceb227eb189867b87f8947fcc9e60ebf29d3 Mon Sep 17 00:00:00 2001 From: Brian Zhu Date: Mon, 21 Jan 2019 00:19:47 +0800 Subject: [PATCH] vpp: disable vd2 again if the last vframe is MVC [1/1] PD#SWPL-4003 Problem: VD2 keep displaying after keep last frame for mvc streaming Solution: check the last frame type and disable vd2 again Verify: verify by tl1 Change-Id: Ia2b598331e8f65c02974d41c498408bee40a407e Signed-off-by: Brian Zhu --- drivers/amlogic/media/video_sink/video.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 9b34ee7fb605..8bb25f82f486 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -998,6 +998,7 @@ static const struct vinfo_s *vinfo; static struct vframe_s *cur_dispbuf; static struct vframe_s *cur_dispbuf2; static bool need_disable_vd2; +static bool last_mvc_status; void update_cur_dispbuf(void *buf) { cur_dispbuf = buf; @@ -3920,7 +3921,11 @@ static void vsync_toggle_frame(struct vframe_s *vf) /* if el is unnecessary, afbc2 need to be closed */ if ((last_el_status == 1) && (vf_with_el == 0)) - need_disable_vd2 = 1; + need_disable_vd2 = true; + + if (((vf->type & VIDTYPE_MVC) == 0) + && last_mvc_status) + need_disable_vd2 = true; last_el_status = vf_with_el; @@ -3959,6 +3964,11 @@ static void vsync_toggle_frame(struct vframe_s *vf) } } cur_dispbuf = vf; + if (cur_dispbuf && (cur_dispbuf->type & VIDTYPE_MVC)) + last_mvc_status = true; + else + last_mvc_status = false; + if (first_picture) { frame_par_ready_to_set = 1; first_frame_toggled = 1;