From f3c0a7b22ce2ce1dedf013805c8f51f079b60f7a Mon Sep 17 00:00:00 2001 From: yao liu Date: Mon, 24 Jun 2019 19:00:50 +0800 Subject: [PATCH] dolby: Graphics blending tests fail on sdr tv [3/4] PD#SWPL-10128 Problem: graphic max 100 is too low Solution: need set graphic max to 380 Verify: Verified on sm1 Change-Id: Ibbea07439a99500bdcc051aa9ed7ea8d1ee00fc8 Signed-off-by: yao liu --- .../amlogic/media/enhancement/amdolby_vision/amdolby_vision.c | 10 ++++++---- 1 file changed, 6 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 828ac0e..0562a48 100644 --- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c +++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c @@ -298,9 +298,11 @@ MODULE_PARM_DESC(dolby_vision_graphic_min, "\n dolby_vision_graphic_min\n"); module_param(dolby_vision_graphic_max, uint, 0664); MODULE_PARM_DESC(dolby_vision_graphic_max, "\n dolby_vision_graphic_max\n"); -static unsigned int dolby_vision_target_graphics_max[3] = { - 300, 300, 100 -}; /* DOVI/HDR/SDR */ +static unsigned int dv_target_graphics_max[3][3] = { + { 300, 300, 380 }, /* DOVI => DOVI/HDR/SDR */ + { 300, 300, 100 }, /* HDR => DOVI/HDR/SDR */ + { 300, 300, 100 }, /* SDR => DOVI/HDR/SDR */ +}; static unsigned int dv_target_graphics_LL_max[3][3] = { { 300, 300, 100 }, /* DOVI => DOVI/HDR/SDR */ { 210, 300, 100 }, /* HDR => DOVI/HDR/SDR */ @@ -5570,7 +5572,7 @@ int dolby_vision_parse_metadata( graphic_max = dolby_vision_graphic_max; else { graphic_max = - dolby_vision_target_graphics_max[dst_format]; + dv_target_graphics_max[src_format][dst_format]; if ((dolby_vision_flags & FLAG_FORCE_DOVI_LL) || (dolby_vision_ll_policy >= DOLBY_VISION_LL_YUV422)) { -- 2.7.4