nouveau.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Nouveau] [PATCH] drm/nouveau: set RGB quantization range to FULL
@ 2021-11-10 15:58 Hans Verkuil
  2021-11-11  0:44 ` Ben Skeggs
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2021-11-10 15:58 UTC (permalink / raw)
  To: Maling list - DRI developers; +Cc: nouveau, Ben Skeggs

The nouveau driver outputs full range RGB, but the AVI InfoFrame just says
'Default' instead of 'Full'.

Call drm_hdmi_avi_infoframe_quant_range to fill in the quantization field of
the AVI InfoFrame correctly. Now displays that advertise RGB Selectable
Quantization Range in their EDID will understand that full range is transmitted
by the HDMI output. This is consistent to how the Nvidia's driver behaves.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index d7b9f7f8c9e3..b05c01927fe6 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -852,6 +852,9 @@ nv50_hdmi_enable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc,
 	ret = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame.avi,
 						       &nv_connector->base, mode);
 	if (!ret) {
+		drm_hdmi_avi_infoframe_quant_range(&avi_frame.avi,
+						   &nv_connector->base, mode,
+						   HDMI_QUANTIZATION_RANGE_FULL);
 		/* We have an AVI InfoFrame, populate it to the display */
 		args.pwr.avi_infoframe_length
 			= hdmi_infoframe_pack(&avi_frame, args.infoframes, 17);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Nouveau] [PATCH] drm/nouveau: set RGB quantization range to FULL
  2021-11-10 15:58 [Nouveau] [PATCH] drm/nouveau: set RGB quantization range to FULL Hans Verkuil
@ 2021-11-11  0:44 ` Ben Skeggs
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2021-11-11  0:44 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: ML nouveau, Ben Skeggs, Maling list - DRI developers

On Thu, 11 Nov 2021 at 01:58, Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> The nouveau driver outputs full range RGB, but the AVI InfoFrame just says
> 'Default' instead of 'Full'.
>
> Call drm_hdmi_avi_infoframe_quant_range to fill in the quantization field of
> the AVI InfoFrame correctly. Now displays that advertise RGB Selectable
> Quantization Range in their EDID will understand that full range is transmitted
> by the HDMI output. This is consistent to how the Nvidia's driver behaves.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>

> ---
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index d7b9f7f8c9e3..b05c01927fe6 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -852,6 +852,9 @@ nv50_hdmi_enable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc,
>         ret = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame.avi,
>                                                        &nv_connector->base, mode);
>         if (!ret) {
> +               drm_hdmi_avi_infoframe_quant_range(&avi_frame.avi,
> +                                                  &nv_connector->base, mode,
> +                                                  HDMI_QUANTIZATION_RANGE_FULL);
>                 /* We have an AVI InfoFrame, populate it to the display */
>                 args.pwr.avi_infoframe_length
>                         = hdmi_infoframe_pack(&avi_frame, args.infoframes, 17);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-11  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 15:58 [Nouveau] [PATCH] drm/nouveau: set RGB quantization range to FULL Hans Verkuil
2021-11-11  0:44 ` Ben Skeggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).