From: Giuseppe Ranieri <giuseppe@ranieri.dev>
To: nouveau@lists.freedesktop.org
Subject: [PATCH] Fix broken initialization when SCDC is supported but not implemented
Date: Sat, 17 Jan 2026 16:00:30 +0100 [thread overview]
Message-ID: <aWukDouVtfiORRrn@linux-gentoo> (raw)
This patch fix the missing scdc implementation on scdc enabled card behaviour init call and add debug message on error:
- FIX: when the scdc implementation is missing the call of nvkm_uoutp_mthd_hdmi don't return anymore an error code but emit a OUTP_DBG log message and continue the initialization process
- ADD: an NV_ERROR message where error code is return by the nvif_outp_hdmi call in nv50_hdmi_enable method
Solve problem with (scdc enabled) card that don´t had scdc implementation in nouveau driver.
Signed-off-by: Giuseppe Ranieri <giuseppe@ranieri.dev>
---
diff '--color=auto' -ur a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c 2025-11-30 23:42:10.000000000 +0100
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c 2026-01-17 01:27:34.150245394 +0100
@@ -819,9 +819,11 @@
ret = nvif_outp_hdmi(&nv_encoder->outp, nv_crtc->index, true, max_ac_packet, rekey,
mode->clock, hdmi->scdc.supported, hdmi->scdc.scrambling.supported,
hdmi->scdc.scrambling.low_rates);
- if (ret)
+ if (ret < 0) {
+ NV_ERROR(drm, "Failure to set HDMI: %d\n", ret);
return;
-
+ }
+
/* AVI InfoFrame. */
args->version = 0;
args->head = nv_crtc->index;
diff '--color=auto' -ur a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c 2025-11-30 23:42:10.000000000 +0100
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c 2026-01-17 01:20:03.670240977 +0100
@@ -253,8 +253,7 @@
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) {
@@ -266,6 +265,11 @@
ior->func->hdmi->ctrl(ior, args->v0.head, args->v0.enable,
args->v0.max_ac_packet, args->v0.rekey);
+
+ if (args->v0.scdc && !ior->func->hdmi->scdc)
+ OUTP_DBG(outp, "SCDC enabled: %d, ior->func->hdmi->scdc not implemented (ior): %p",
+ args->v0.scdc, ior);
+
if (ior->func->hdmi->scdc)
ior->func->hdmi->scdc(ior, args->v0.khz, args->v0.scdc, args->v0.scdc_scrambling,
args->v0.scdc_low_rates);
reply other threads:[~2026-01-17 17:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWukDouVtfiORRrn@linux-gentoo \
--to=giuseppe@ranieri.dev \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox