From 08b606bbad2abebf41cb7ff3c86414421ab4ff44 Mon Sep 17 00:00:00 2001 From: yao liu Date: Thu, 31 Oct 2019 15:47:49 +0800 Subject: [PATCH] dv: blank screen during Transition tests [1/1] PD#SWPL-16051 Problem: Soure changed from DV to sdr, but core1 lut is not update due to stb_core_setting_update_flag is reset when frame dropped by amvideo Solution: Don't clear stb_core_setting_update_flag until it has been used. Verify: U212 Change-Id: Ib1e445653978583ddda35c266000e812463f3f77 Signed-off-by: yao liu --- .../enhancement/amdolby_vision/amdolby_vision.c | 23 +++++++++++++++++++++- drivers/amlogic/media/video_sink/video.c | 4 +++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c index 7100444..9112c35 100644 --- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c +++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c @@ -237,6 +237,11 @@ static unsigned int dolby_vision_flags = FLAG_BYPASS_VPP | FLAG_FORCE_CVM; module_param(dolby_vision_flags, uint, 0664); MODULE_PARM_DESC(dolby_vision_flags, "\n dolby_vision_flags\n"); +/*bit0:set core1 lut; bit1: set core2 lut; bit 3: set all reg*/ +static unsigned int force_set; +module_param(force_set, uint, 0664); +MODULE_PARM_DESC(force_set, "\n force_set\n"); + #define DV_NAME_LEN_MAX 32 static unsigned int htotal_add = 0x140; @@ -1951,6 +1956,12 @@ static int dolby_core1_set( if (dolby_vision_flags & FLAG_DISABLE_COMPOSER) composer_enable = 0; + if (force_set & 1) + set_lut = true; + + if (force_set & 4) + reset = true; + if (dolby_vision_on_count == dolby_vision_run_mode_delay) reset = true; @@ -2296,6 +2307,12 @@ static int dolby_core2_set( reset = true; } + if (force_set & 2) + set_lut = true; + + if (force_set & 4) + reset = true; + if (stb_core_setting_update_flag & FLAG_CHANGE_TC2) set_lut = true; @@ -2439,6 +2456,9 @@ static int dolby_core3_set( (dolby_vision_flags & FLAG_CERTIFICAION)) reset = true; + if (force_set & 4) + reset = true; + if (is_meson_gxm()) { if ((first_reseted & 0x2) == 0) { first_reseted = (first_reseted | 0x2); @@ -2946,6 +2966,7 @@ static void apply_stb_core_settings( DOLBY_VISION_OUTPUT_MODE_IPT_TUNNEL, pps_state); } + stb_core_setting_update_flag = 0; } static void osd_bypass(int bypass) @@ -6805,7 +6826,7 @@ int dolby_vision_parse_metadata( &new_dovi_setting); if (flag >= 0) { #ifdef V2_4 - stb_core_setting_update_flag = flag; + stb_core_setting_update_flag |= flag; if ((dolby_vision_flags & FLAG_FORCE_DOVI_LL) && (dst_format == FORMAT_DOVI)) diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 863c48c..9b18495 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -6919,7 +6919,9 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id) /* all drop done*/ dovi_drop_flag = false; omx_drop_done = true; - pr_info("dolby vision drop done\n"); + if (debug_flag & + DEBUG_FLAG_OMX_DV_DROP_FRAME) + pr_info("dolby vision drop done\n"); break; } else break; -- 2.7.4