mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/disp: don't reject HDMI config on cards without SCDC
@ 2026-09-17 13:50 Tano Dzhinski
  2026-09-17 16:28 ` lyude
  2026-09-17 21:51 ` [PATCH v2] " Tano Dzhinski
  0 siblings, 2 replies; 4+ messages in thread
From: Tano Dzhinski @ 2026-09-17 13:50 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich
  Cc: Ben Skeggs, David Airlie, Simona Vetter, nouveau, dri-devel,
	linux-kernel, Tano Dzhinski

nv50_hdmi_enable() passes the sink's SCDC capability from its EDID
straight through to nvif_outp_hdmi(). On pre-Maxwell-2 cards there is no
hdmi->scdc callback, so nvkm_uoutp_mthd_hdmi() rejects the whole
configuration with -EINVAL, and nv50_hdmi_enable() returns before
hdmi->ctrl() runs and before the AVI and VSI infoframes are sent.

The result on such a card driving an SCDC-capable HDMI 2.0 sink is that
HDMI audio silently stops working. Video is unaffected, and nothing is
logged, which makes the failure hard to attribute.

SCDC is optional, and the hdmi->scdc() call further down is already
guarded against a missing callback. Requesting it on a card that cannot
do it need not invalidate the rest of the HDMI configuration, so drop
that term from the condition and let the existing guard skip SCDC alone.

Giuseppe Ranieri posted a fix for this to the nouveau list on
2026-01-17, which received no review:
https://ratatoskr.run/nouveau/2026/01/16963412

Fixes: 6c6abab20b99 ("drm/nouveau/disp: add output hdmi config method")
Signed-off-by: Tano Dzhinski <tano.dzhinski@gmail.com>
---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
index 377d0e0cef84..9887b3898505 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
@@ -253,8 +253,7 @@ nvkm_uoutp_mthd_hdmi(struct nvkm_outp *outp, void *argv, u32 argc)
 
 	if (!ior->func->hdmi ||
 	    args->v0.max_ac_packet > 0x1f ||
-	    args->v0.rekey > 0x7f ||
-	    (args->v0.scdc && !ior->func->hdmi->scdc))
+	    args->v0.rekey > 0x7f)
 		return -EINVAL;
 
 	if (!args->v0.enable) {
-- 
2.43.0


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

* Re: [PATCH] drm/nouveau/disp: don't reject HDMI config on cards without SCDC
  2026-09-17 13:50 [PATCH] drm/nouveau/disp: don't reject HDMI config on cards without SCDC Tano Dzhinski
@ 2026-09-17 16:28 ` lyude
  2026-09-17 21:51 ` [PATCH v2] " Tano Dzhinski
  1 sibling, 0 replies; 4+ messages in thread
From: lyude @ 2026-09-17 16:28 UTC (permalink / raw)
  To: Tano Dzhinski, Danilo Krummrich
  Cc: Ben Skeggs, David Airlie, Simona Vetter, nouveau, dri-devel,
	linux-kernel

Hi - apologies for missing the patch previously, and thank you for
bringing this to my attention!

Would you mind re-sending with the original authorship + a Co-authored-
by tag for yourself to make sure we give the original author credit?

On Thu, 2026-09-17 at 13:50 +0000, Tano Dzhinski wrote:
> nv50_hdmi_enable() passes the sink's SCDC capability from its EDID
> straight through to nvif_outp_hdmi(). On pre-Maxwell-2 cards there is
> no
> hdmi->scdc callback, so nvkm_uoutp_mthd_hdmi() rejects the whole
> configuration with -EINVAL, and nv50_hdmi_enable() returns before
> hdmi->ctrl() runs and before the AVI and VSI infoframes are sent.
> 
> The result on such a card driving an SCDC-capable HDMI 2.0 sink is
> that
> HDMI audio silently stops working. Video is unaffected, and nothing
> is
> logged, which makes the failure hard to attribute.
> 
> SCDC is optional, and the hdmi->scdc() call further down is already
> guarded against a missing callback. Requesting it on a card that
> cannot
> do it need not invalidate the rest of the HDMI configuration, so drop
> that term from the condition and let the existing guard skip SCDC
> alone.
> 
> Giuseppe Ranieri posted a fix for this to the nouveau list on
> 2026-01-17, which received no review:
> https://ratatoskr.run/nouveau/2026/01/16963412
> 
> Fixes: 6c6abab20b99 ("drm/nouveau/disp: add output hdmi config
> method")
> Signed-off-by: Tano Dzhinski <tano.dzhinski@gmail.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> index 377d0e0cef84..9887b3898505 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> @@ -253,8 +253,7 @@ nvkm_uoutp_mthd_hdmi(struct nvkm_outp *outp, void
> *argv, u32 argc)
>  
>  	if (!ior->func->hdmi ||
>  	    args->v0.max_ac_packet > 0x1f ||
> -	    args->v0.rekey > 0x7f ||
> -	    (args->v0.scdc && !ior->func->hdmi->scdc))
> +	    args->v0.rekey > 0x7f)
>  		return -EINVAL;
>  
>  	if (!args->v0.enable) {


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

* [PATCH v2] drm/nouveau/disp: don't reject HDMI config on cards without SCDC
  2026-09-17 13:50 [PATCH] drm/nouveau/disp: don't reject HDMI config on cards without SCDC Tano Dzhinski
  2026-09-17 16:28 ` lyude
@ 2026-09-17 21:51 ` Tano Dzhinski
  2026-09-17 21:56   ` tanodzh
  1 sibling, 1 reply; 4+ messages in thread
From: Tano Dzhinski @ 2026-09-17 21:51 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich
  Cc: Giuseppe Ranieri, David Airlie, Simona Vetter, nouveau,
	dri-devel, linux-kernel, Tano Dzhinski

From: Giuseppe Ranieri <giuseppe@ranieri.dev>

nv50_hdmi_enable() passes the sink's SCDC capability from its EDID
straight through to nvif_outp_hdmi(). On pre-Maxwell-2 cards there is no
hdmi->scdc callback, so nvkm_uoutp_mthd_hdmi() rejects the whole
configuration with -EINVAL, and nv50_hdmi_enable() returns before
hdmi->ctrl() runs and before the AVI and VSI infoframes are sent.

The result on such a card driving an SCDC-capable HDMI 2.0 sink is that
HDMI audio silently stops working. Video is unaffected, and nothing is
logged, which makes the failure hard to attribute.

SCDC is optional, and the hdmi->scdc() call further down is already
guarded against a missing callback. Requesting it on a card that cannot
do it need not invalidate the rest of the HDMI configuration, so drop
that term from the condition and let the existing guard skip SCDC alone.

Fixes: 6c6abab20b99 ("drm/nouveau/disp: add output hdmi config method")
Signed-off-by: Giuseppe Ranieri <giuseppe@ranieri.dev>
Co-authored-by: Tano Dzhinski <tano.dzhinski@gmail.com>
Signed-off-by: Tano Dzhinski <tano.dzhinski@gmail.com>
Tested-by: Tano Dzhinski <tano.dzhinski@gmail.com>
---
v2: restore Giuseppe Ranieri's original authorship and Signed-off-by
    (he posted this fix to the nouveau list on 2026-01-17,
    https://ratatoskr.run/nouveau/2026/01/16963412), per Lyude's
    review of v1. Added Co-authored-by and Tested-by.
    Tested on GK104 (GTX 670MX) with BenQ PD2700U and EW2790U.

 drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
index 377d0e0cef84..9887b3898505 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
@@ -253,8 +253,7 @@ nvkm_uoutp_mthd_hdmi(struct nvkm_outp *outp, void *argv, u32 argc)
 
 	if (!ior->func->hdmi ||
 	    args->v0.max_ac_packet > 0x1f ||
-	    args->v0.rekey > 0x7f ||
-	    (args->v0.scdc && !ior->func->hdmi->scdc))
+	    args->v0.rekey > 0x7f)
 		return -EINVAL;
 
 	if (!args->v0.enable) {
-- 
2.43.0


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

* Re: [PATCH v2] drm/nouveau/disp: don't reject HDMI config on cards without SCDC
  2026-09-17 21:51 ` [PATCH v2] " Tano Dzhinski
@ 2026-09-17 21:56   ` tanodzh
  0 siblings, 0 replies; 4+ messages in thread
From: tanodzh @ 2026-09-17 21:56 UTC (permalink / raw)
  To: Lyude Paul, Danilo Krummrich
  Cc: Giuseppe Ranieri, David Airlie, Simona Vetter, nouveau,
	dri-devel, linux-kernel

FYI - the CC to Giuseppe bounced: ranieri.dev no longer resolves
(NXDOMAIN on the MX lookup), so he can't be reached at that address
anymore. Possibly why the original posting went unanswered from his
side too.

The From: and Signed-off-by: in v2 still record him as the author,
which seemed right to keep regardless.

Everything else on the CC list delivered fine.

Tano


На пт, 18.09.2026 г. в 0:51 Tano Dzhinski <tano.dzhinski@gmail.com> написа:
>
> From: Giuseppe Ranieri <giuseppe@ranieri.dev>
>
> nv50_hdmi_enable() passes the sink's SCDC capability from its EDID
> straight through to nvif_outp_hdmi(). On pre-Maxwell-2 cards there is no
> hdmi->scdc callback, so nvkm_uoutp_mthd_hdmi() rejects the whole
> configuration with -EINVAL, and nv50_hdmi_enable() returns before
> hdmi->ctrl() runs and before the AVI and VSI infoframes are sent.
>
> The result on such a card driving an SCDC-capable HDMI 2.0 sink is that
> HDMI audio silently stops working. Video is unaffected, and nothing is
> logged, which makes the failure hard to attribute.
>
> SCDC is optional, and the hdmi->scdc() call further down is already
> guarded against a missing callback. Requesting it on a card that cannot
> do it need not invalidate the rest of the HDMI configuration, so drop
> that term from the condition and let the existing guard skip SCDC alone.
>
> Fixes: 6c6abab20b99 ("drm/nouveau/disp: add output hdmi config method")
> Signed-off-by: Giuseppe Ranieri <giuseppe@ranieri.dev>
> Co-authored-by: Tano Dzhinski <tano.dzhinski@gmail.com>
> Signed-off-by: Tano Dzhinski <tano.dzhinski@gmail.com>
> Tested-by: Tano Dzhinski <tano.dzhinski@gmail.com>
> ---
> v2: restore Giuseppe Ranieri's original authorship and Signed-off-by
>     (he posted this fix to the nouveau list on 2026-01-17,
>     https://ratatoskr.run/nouveau/2026/01/16963412), per Lyude's
>     review of v1. Added Co-authored-by and Tested-by.
>     Tested on GK104 (GTX 670MX) with BenQ PD2700U and EW2790U.
>
>  drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> index 377d0e0cef84..9887b3898505 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
> @@ -253,8 +253,7 @@ nvkm_uoutp_mthd_hdmi(struct nvkm_outp *outp, void *argv, u32 argc)
>
>         if (!ior->func->hdmi ||
>             args->v0.max_ac_packet > 0x1f ||
> -           args->v0.rekey > 0x7f ||
> -           (args->v0.scdc && !ior->func->hdmi->scdc))
> +           args->v0.rekey > 0x7f)
>                 return -EINVAL;
>
>         if (!args->v0.enable) {
> --
> 2.43.0
>

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

end of thread, other threads:[~2026-09-17 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 13:50 [PATCH] drm/nouveau/disp: don't reject HDMI config on cards without SCDC Tano Dzhinski
2026-09-17 16:28 ` lyude
2026-09-17 21:51 ` [PATCH v2] " Tano Dzhinski
2026-09-17 21:56   ` tanodzh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®