From 39c9976d3bc2a11a15cbe03095265d9b9398069c Mon Sep 17 00:00:00 2001 From: Yi Zhou Date: Tue, 15 Jan 2019 15:31:13 +0800 Subject: [PATCH] dv: close afbc2 when playing sources with unnecessary el [1/1] PD#SWPL-915 Problem: DOLBY only sets the enhancement for the first frame -> Vd sets cur_dispubf2 according to enhance -> codec_mm keeps the last frame according to cur_dispbuf2, so it fails -> AFBC2 access to the released content causes the trigger. Solution: close afbc2 Verify: r321 Change-Id: I03c431a6ea11b8aabf97b1f0b21f717024be2f62 Signed-off-by: Yi Zhou --- drivers/amlogic/media/video_sink/video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index f27f3194c511..89cba8a218f2 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -3891,6 +3891,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; + last_el_status = vf_with_el; if (((vf->type & VIDTYPE_NO_VIDEO_ENABLE) == 0) &&