From 3ed4e4550150641eec81efd0b2823ae91382927d Mon Sep 17 00:00:00 2001 From: Brian Zhu Date: Sun, 25 Aug 2019 00:23:37 +0800 Subject: [PATCH] dv: add more condition to reset the control path [1/1] PD#SWPL-11314 Problem: When playing profile 4, multiple resolution and dual layer dv streaming, switching non-4k to 4K (DOVI->SDR), need do once control path reset since the core1 setting is not correctly. Solution: Improve the condition to reset control path Verify: Verified on AC211 Change-Id: I229a33228377bd9ff7811b4a25e973eeba8af66d Signed-off-by: Brian Zhu --- .../enhancement/amdolby_vision/amdolby_vision.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c index 8fa3f474a6a5..34de9e2c2354 100644 --- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c +++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c @@ -5780,7 +5780,7 @@ int dolby_vision_parse_metadata( if (!is_dv_standard_es(req.dv_enhance_exist, ret_flags, w)) { src_format = FORMAT_SDR; - dovi_setting.src_format = src_format; + /* dovi_setting.src_format = src_format; */ total_comp_size = 0; total_md_size = 0; src_bdp = 10; @@ -5791,7 +5791,7 @@ int dolby_vision_parse_metadata( ((dolby_vision_flags & FLAG_CERTIFICAION) == 0))) { src_format = FORMAT_SDR; - dovi_setting.src_format = src_format; + /* dovi_setting.src_format = src_format; */ total_comp_size = 0; total_md_size = 0; src_bdp = 10; @@ -5950,7 +5950,10 @@ int dolby_vision_parse_metadata( el_flag = 0; dolby_vision_el_disable = 1; } - + if (src_format != FORMAT_DOVI) { + el_flag = 0; + mel_flag = 0; + } if ((src_format == FORMAT_DOVI) && meta_flag_bl && meta_flag_el) { /* dovi frame no meta or meta error */ @@ -6268,7 +6271,7 @@ int dolby_vision_parse_metadata( if ((src_format != dovi_setting.src_format) || (dst_format != dovi_setting.dst_format) || ((!(dolby_vision_flags & FLAG_CERTIFICAION)) - && (frame_count == 0))) + && (frame_count == 0))) { p_funcs_stb->control_path( FORMAT_INVALID, 0, comp_buf[currentId], 0, @@ -6278,6 +6281,12 @@ int dolby_vision_parse_metadata( 0, &hdr10_param, &new_dovi_setting); + pr_dolby_dbg( + "reset control path: format changed: src:%d->%d, dst:%d-%d, frame_count:%d, dolby_vision_flags:0x%x\n", + dovi_setting.src_format, src_format, + dovi_setting.dst_format, dst_format, + frame_count, dolby_vision_flags); + } if (!vsvdb_config_set_flag) { memset(&new_dovi_setting.vsvdb_tbl[0], 0, sizeof(new_dovi_setting.vsvdb_tbl)); -- 2.20.1