From: Mario Kleiner Date: Fri, 12 Feb 2021 22:29:54 +0000 (+0100) Subject: drm/amd/display: Allow spatial dither to 10 bpc on all DCE X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=afdd1de0f9e71dc5115416a47224829ad55cc9a4;p=linux.git drm/amd/display: Allow spatial dither to 10 bpc on all DCE Spatial dithering to 10 bpc depth was disabled for all DCE's. Testing on DCE-8.3 and DCE-11.2 did not show any obvious ill effects, but a measureable precision improvement (via colorimeter) when displaying a fp16 framebuffer to a 10 bpc DP or HDMI connected HDR-10 monitor. v2: enable it for all DCEs (Alex) Signed-off-by: Mario Kleiner Cc: Alex Deucher Reviewed-by: Mario Kleiner (v2) Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c index 4600231da6cbb..895b015b02e8b 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c @@ -216,9 +216,7 @@ static void set_spatial_dither( REG_UPDATE(FMT_BIT_DEPTH_CONTROL, FMT_TEMPORAL_DITHER_EN, 0); - /* no 10bpc on DCE11*/ - if (params->flags.SPATIAL_DITHER_ENABLED == 0 || - params->flags.SPATIAL_DITHER_DEPTH == 2) + if (params->flags.SPATIAL_DITHER_ENABLED == 0) return; /* only use FRAME_COUNTER_MAX if frameRandom == 1*/