All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix broken initialization when SCDC is supported but not implemented
@ 2026-01-17 15:00 Giuseppe Ranieri
  0 siblings, 0 replies; only message in thread
From: Giuseppe Ranieri @ 2026-01-17 15:00 UTC (permalink / raw)
  To: nouveau

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-17 17:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-17 15:00 [PATCH] Fix broken initialization when SCDC is supported but not implemented Giuseppe Ranieri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.