<div dir="ltr"><div dir="ltr">On Mon, Feb 15, 2021 at 8:09 PM Alex Deucher <<a href="mailto:alexdeucher@gmail.com">alexdeucher@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Feb 12, 2021 at 5:30 PM Mario Kleiner<br>
<<a href="mailto:mario.kleiner.de@gmail.com" target="_blank">mario.kleiner.de@gmail.com</a>> wrote:<br>
><br>
> Spatial dithering to 10 bpc depth was disabled for all DCE's.<br>
> Restrict this to DCE-11.0, but allow it on other DCE's.<br>
><br>
> Testing on DCE-8.3 and DCE-11.2 did not show any obvious ill<br>
> effects, but a measureable precision improvement (via colorimeter)<br>
> when displaying a fp16 framebuffer to a 10 bpc DP or HDMI connected<br>
> HDR-10 monitor.<br>
><br>
> Alex suggests this may have been a workaround for some DCE-11.0<br>
> Carrizo and Stoney Asics, so lets try to restrict this to DCE 11.0.<br>
><br>
> Signed-off-by: Mario Kleiner <<a href="mailto:mario.kleiner.de@gmail.com" target="_blank">mario.kleiner.de@gmail.com</a>><br>
> Cc: Alex Deucher <<a href="mailto:alexdeucher@gmail.com" target="_blank">alexdeucher@gmail.com</a>><br>
> ---<br>
>  drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 9 ++++++---<br>
>  1 file changed, 6 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c<br>
> index 4600231da6cb..4ed886cdb8d8 100644<br>
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c<br>
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_opp.c<br>
> @@ -216,9 +216,12 @@ static void set_spatial_dither(<br>
>         REG_UPDATE(FMT_BIT_DEPTH_CONTROL,<br>
>                 FMT_TEMPORAL_DITHER_EN, 0);<br>
><br>
> -       /* no 10bpc on DCE11*/<br>
> -       if (params->flags.SPATIAL_DITHER_ENABLED == 0 ||<br>
> -               params->flags.SPATIAL_DITHER_DEPTH == 2)<br>
> +       if (params->flags.SPATIAL_DITHER_ENABLED == 0)<br>
> +               return;<br>
> +<br>
> +       /* No dithering to 10 bpc on DCE-11.0 */<br>
> +       if (params->flags.SPATIAL_DITHER_DEPTH == 2 &&<br>
> +               opp110->base.ctx->dce_version == DCE_VERSION_11_0)<br>
>                 return;<br>
<br>
I'm inclined to just remove this check altogether.  This is just the<br>
dithering control.  I think the limitations are more around the<br>
formats (e.g., FP formats) than the dithering.<br>
<br>
Alex<br>
<br></blockquote><div> </div><div>Certainly no objections from myself.</div><div>-mario<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
><br>
>         /* only use FRAME_COUNTER_MAX if frameRandom == 1*/<br>
> --<br>
> 2.25.1<br>
><br>
</blockquote></div></div>