From: Yi Zhou Date: Fri, 11 Jan 2019 03:31:16 +0000 (+0800) Subject: dv: keep dv enable when connecting to sdr TV [1/1] X-Git-Tag: khadas-vims-v0.9.6-release~956 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ab1d8c6b4d7ecbf9ca9c1ac881806ea7c538a55;p=platform%2Fkernel%2Flinux-amlogic.git dv: keep dv enable when connecting to sdr TV [1/1] PD#SWPL-3226 Problem: turn off the dv core, the osd flutters Solution: keeping core2 open when dv enable under sdr TV Verify: u212 Change-Id: Idf57c6e67676fb5eec944e543cb596247c932df4 Signed-off-by: Yi Zhou --- diff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c index 50a868e..d4d1c58 100644 --- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c +++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c @@ -3503,9 +3503,29 @@ static int dolby_vision_policy_process( *mode = DOLBY_VISION_OUTPUT_MODE_SDR8; mode_change = 1; } + } else if (src_format == FORMAT_HDR10 + && (!(dolby_vision_hdr10_policy & 1))) { + if (dolby_vision_mode != + DOLBY_VISION_OUTPUT_MODE_BYPASS) { + /* HDR bypass */ + pr_dolby_dbg("dovi output -> DOLBY_VISION_OUTPUT_MODE_BYPASS\n"); + *mode = DOLBY_VISION_OUTPUT_MODE_BYPASS; + mode_change = 1; + } + } else if (is_meson_g12a_cpu() || is_meson_g12b_cpu()) { + /*g12 has a hardware bug. Therefore, dv cores + *must keep working even if under sdr mode + */ + if (dolby_vision_mode != + DOLBY_VISION_OUTPUT_MODE_SDR8) { + /* SDR to SDR */ + pr_dolby_dbg("dovi output -> DOLBY_VISION_OUTPUT_MODE_SDR8\n"); + *mode = DOLBY_VISION_OUTPUT_MODE_SDR8; + mode_change = 1; + } } else if (dolby_vision_mode != - DOLBY_VISION_OUTPUT_MODE_BYPASS) { - /* HDR/SDR bypass */ + DOLBY_VISION_OUTPUT_MODE_BYPASS) { + /* SDR bypass */ pr_dolby_dbg("dovi output -> DOLBY_VISION_OUTPUT_MODE_BYPASS\n"); *mode = DOLBY_VISION_OUTPUT_MODE_BYPASS; mode_change = 1;