* [PATCH v2 0/2] drm/nouveau: add and implement missing DCB connector values
[not found] <20251013222424.12613-3-lxrmrz732.ref@rocketmail.com>
@ 2025-10-13 22:18 ` Alex Ramírez
2025-10-13 22:18 ` [PATCH v2 1/2] drm/nouveau: add missing DCB connector types Alex Ramírez
2025-10-13 22:18 ` [PATCH v2 2/2] drm/nouveau: implement missing DCB connector types; gracefully handle unknown connectors Alex Ramírez
0 siblings, 2 replies; 5+ messages in thread
From: Alex Ramírez @ 2025-10-13 22:18 UTC (permalink / raw)
To: nouveau; +Cc: Alex Ramírez
uconn.c's handling of display connectors was refactored for Linux v6.5,
causing a regression that issues a warning on boot for GeForce 8600m GT (MacBookPro4,1)
and likely other legacy GPUs.
Several connector types used to be implicitly supported before v6.5 by a branch in
[drm/nouveau/nouveau_connector.c] line 1353 that determined connector types using
encoder bits, but they have since been left entirely unhandled after the refactor due to
the aforementioned kernel warning causing that path to never be taken in my testing:
nv_connector->type is generally 0x0 (DCB_CONNECTOR_VGA) in the case of an unknown
connector because the WARN_ON macro in the nvkm_uconn_new function in
[drm/nouveau/nvkm/engine/disp/uconn.c] causes the function to bail out before
a suitable connector value is chosen; it seems like the value is left undefined.
This patch set implements the missing DCB connector values per NVIDIA spec to fix the
root cause of the warning and changes the WARN_ON macro in uconn.c to a printk message
to more gracefully handle unknown connector types.
This version includes better commit messages. My original submission was partially
blocked by a spam filter.
Alex Ramírez (2):
drm/nouveau: add missing DCB connector types
drm/nouveau: implement missing DCB connector types; gracefully handle
unknown connectors
.../nouveau/include/nvkm/subdev/bios/conn.h | 84 ++++++++++++++-----
.../gpu/drm/nouveau/nvkm/engine/disp/uconn.c | 73 +++++++++++-----
2 files changed, 116 insertions(+), 41 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] drm/nouveau: add missing DCB connector types
2025-10-13 22:18 ` [PATCH v2 0/2] drm/nouveau: add and implement missing DCB connector values Alex Ramírez
@ 2025-10-13 22:18 ` Alex Ramírez
2025-10-14 16:07 ` Petr Vorel
2025-10-13 22:18 ` [PATCH v2 2/2] drm/nouveau: implement missing DCB connector types; gracefully handle unknown connectors Alex Ramírez
1 sibling, 1 reply; 5+ messages in thread
From: Alex Ramírez @ 2025-10-13 22:18 UTC (permalink / raw)
To: nouveau; +Cc: Alex Ramírez
* Add missing DCB connectors in conn.h as per the NVIDIA DCB specification.
A lot of connector logic was rewritten for Linux v6.5; some display connector types
went unaccounted-for which caused kernel warnings on devices with the now-unsupported
DCB connectors. This patch adds all of the DCB connectors as defined by NVIDIA to the
dcb_connector_type enum to bring back support for these connectors to the new logic.
Fixes: 8b7d92cad953 ("drm/nouveau/kms/nv50-: create connectors based on nvkm info")
Link: https://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html
Signed-off-by: Alex Ramírez <lxrmrz732@rocketmail.com>
---
.../nouveau/include/nvkm/subdev/bios/conn.h | 84 ++++++++++++++-----
1 file changed, 63 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h
index d1beaad0c82b..538306522d9a 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h
@@ -1,28 +1,70 @@
/* SPDX-License-Identifier: MIT */
#ifndef __NVBIOS_CONN_H__
#define __NVBIOS_CONN_H__
+
enum dcb_connector_type {
- DCB_CONNECTOR_VGA = 0x00,
- DCB_CONNECTOR_TV_0 = 0x10,
- DCB_CONNECTOR_TV_1 = 0x11,
- DCB_CONNECTOR_TV_3 = 0x13,
- DCB_CONNECTOR_DVI_I = 0x30,
- DCB_CONNECTOR_DVI_D = 0x31,
- DCB_CONNECTOR_DMS59_0 = 0x38,
- DCB_CONNECTOR_DMS59_1 = 0x39,
- DCB_CONNECTOR_LVDS = 0x40,
- DCB_CONNECTOR_LVDS_SPWG = 0x41,
- DCB_CONNECTOR_DP = 0x46,
- DCB_CONNECTOR_eDP = 0x47,
- DCB_CONNECTOR_mDP = 0x48,
- DCB_CONNECTOR_HDMI_0 = 0x60,
- DCB_CONNECTOR_HDMI_1 = 0x61,
- DCB_CONNECTOR_HDMI_C = 0x63,
- DCB_CONNECTOR_DMS59_DP0 = 0x64,
- DCB_CONNECTOR_DMS59_DP1 = 0x65,
- DCB_CONNECTOR_WFD = 0x70,
- DCB_CONNECTOR_USB_C = 0x71,
- DCB_CONNECTOR_NONE = 0xff
+ /* Analog outputs */
+ DCB_CONNECTOR_VGA = 0x00, // VGA 15-pin connector
+ DCB_CONNECTOR_DVI_A = 0x01, // DVI-A
+ DCB_CONNECTOR_POD_VGA = 0x02, // Pod - VGA 15-pin connector
+ DCB_CONNECTOR_TV_0 = 0x10, // TV - Composite Out
+ DCB_CONNECTOR_TV_1 = 0x11, // TV - S-Video Out
+ DCB_CONNECTOR_TV_2 = 0x12, // TV - S-Video Breakout - Composite
+ DCB_CONNECTOR_TV_3 = 0x13, // HDTV Component - YPrPb
+ DCB_CONNECTOR_TV_SCART = 0x14, // TV - SCART Connector
+ DCB_CONNECTOR_TV_SCART_D = 0x16, // TV - Composite SCART over D-connector
+ DCB_CONNECTOR_TV_DTERM = 0x17, // HDTV - D-connector (EIAJ4120)
+ DCB_CONNECTOR_POD_TV_3 = 0x18, // Pod - HDTV - YPrPb
+ DCB_CONNECTOR_POD_TV_1 = 0x19, // Pod - S-Video
+ DCB_CONNECTOR_POD_TV_0 = 0x1a, // Pod - Composite
+
+ /* DVI digital outputs */
+ DCB_CONNECTOR_DVI_I_TV_1 = 0x20, // DVI-I-TV-S-Video
+ DCB_CONNECTOR_DVI_I_TV_0 = 0x21, // DVI-I-TV-Composite
+ DCB_CONNECTOR_DVI_I_TV_2 = 0x22, // DVI-I-TV-S-Video Breakout-Composite
+ DCB_CONNECTOR_DVI_I = 0x30, // DVI-I
+ DCB_CONNECTOR_DVI_D = 0x31, // DVI-D
+ DCB_CONNECTOR_DVI_ADC = 0x32, // Apple Display Connector (ADC)
+ DCB_CONNECTOR_DMS59_0 = 0x38, // LFH-DVI-I-1
+ DCB_CONNECTOR_DMS59_1 = 0x39, // LFH-DVI-I-2
+ DCB_CONNECTOR_BNC = 0x3c, // BNC Connector [for SDI?]
+
+ /* LVDS / TMDS digital outputs */
+ DCB_CONNECTOR_LVDS = 0x40, // LVDS-SPWG-Attached [is this name correct?]
+ DCB_CONNECTOR_LVDS_SPWG = 0x41, // LVDS-OEM-Attached (non-removable)
+ DCB_CONNECTOR_LVDS_REM = 0x42, // LVDS-SPWG-Detached [following naming above]
+ DCB_CONNECTOR_LVDS_SPWG_REM = 0x43, // LVDS-OEM-Detached (removable)
+ DCB_CONNECTOR_TMDS = 0x45, // TMDS-OEM-Attached (non-removable)
+
+ /* DP digital outputs */
+ DCB_CONNECTOR_DP = 0x46, // DisplayPort External Connector
+ DCB_CONNECTOR_eDP = 0x47, // DisplayPort Internal Connector
+ DCB_CONNECTOR_mDP = 0x48, // DisplayPort (Mini) External Connector
+
+ /* Dock outputs (not used) */
+ DCB_CONNECTOR_DOCK_VGA_0 = 0x50, // VGA 15-pin if not docked
+ DCB_CONNECTOR_DOCK_VGA_1 = 0x51, // VGA 15-pin if docked
+ DCB_CONNECTOR_DOCK_DVI_I_0 = 0x52, // DVI-I if not docked
+ DCB_CONNECTOR_DOCK_DVI_I_1 = 0x53, // DVI-I if docked
+ DCB_CONNECTOR_DOCK_DVI_D_0 = 0x54, // DVI-D if not docked
+ DCB_CONNECTOR_DOCK_DVI_D_1 = 0x55, // DVI-D if docked
+ DCB_CONNECTOR_DOCK_DP_0 = 0x56, // DisplayPort if not docked
+ DCB_CONNECTOR_DOCK_DP_1 = 0x57, // DisplayPort if docked
+ DCB_CONNECTOR_DOCK_mDP_0 = 0x58, // DisplayPort (Mini) if not docked
+ DCB_CONNECTOR_DOCK_mDP_1 = 0x59, // DisplayPort (Mini) if docked
+
+ /* HDMI? digital outputs */
+ DCB_CONNECTOR_HDMI_0 = 0x60, // 3-Pin DIN Stereo Connector [for real?]
+ DCB_CONNECTOR_HDMI_1 = 0x61, // HDMI-A connector
+ DCB_CONNECTOR_SPDIF = 0x62, // Audio S/PDIF connector
+ DCB_CONNECTOR_HDMI_C = 0x63, // HDMI-C (Mini) connector
+
+ /* Misc. digital outputs */
+ DCB_CONNECTOR_DMS59_DP0 = 0x64, // LFH-DP-1
+ DCB_CONNECTOR_DMS59_DP1 = 0x65, // LFH-DP-2
+ DCB_CONNECTOR_WFD = 0x70, // Virtual connector for Wifi Display (WFD)
+ DCB_CONNECTOR_USB_C = 0x71, // [DP over USB-C; not present in docs]
+ DCB_CONNECTOR_NONE = 0xff // Skip Entry
};
struct nvbios_connT {
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] drm/nouveau: implement missing DCB connector types; gracefully handle unknown connectors
2025-10-13 22:18 ` [PATCH v2 0/2] drm/nouveau: add and implement missing DCB connector values Alex Ramírez
2025-10-13 22:18 ` [PATCH v2 1/2] drm/nouveau: add missing DCB connector types Alex Ramírez
@ 2025-10-13 22:18 ` Alex Ramírez
1 sibling, 0 replies; 5+ messages in thread
From: Alex Ramírez @ 2025-10-13 22:18 UTC (permalink / raw)
To: nouveau; +Cc: Alex Ramírez
* Implement missing DCB connectors in uconn.c previously defined in conn.h.
* Replace kernel WARN_ON macro with printk message to more gracefully signify
an unknown connector was encountered.
With this patch, unknown connectors are explicitly marked with value 0
(DCB_CONNECTOR_VGA) to match the tested current behavior. Although 0xff
(DCB_CONNECTOR_NONE) may be more suitable, I don't want to introduce a breaking change.
Fixes: 8b7d92cad953 ("drm/nouveau/kms/nv50-: create connectors based on nvkm info")
Link: https://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html
Signed-off-by: Alex Ramírez <lxrmrz732@rocketmail.com>
---
.../gpu/drm/nouveau/nvkm/engine/disp/uconn.c | 73 ++++++++++++++-----
1 file changed, 53 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c
index 2dab6612c4fc..d1fed2beee63 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c
@@ -191,27 +191,60 @@ nvkm_uconn_new(const struct nvkm_oclass *oclass, void *argv, u32 argc, struct nv
spin_lock(&disp->client.lock);
if (!conn->object.func) {
switch (conn->info.type) {
- case DCB_CONNECTOR_VGA : args->v0.type = NVIF_CONN_V0_VGA; break;
- case DCB_CONNECTOR_TV_0 :
- case DCB_CONNECTOR_TV_1 :
- case DCB_CONNECTOR_TV_3 : args->v0.type = NVIF_CONN_V0_TV; break;
- case DCB_CONNECTOR_DMS59_0 :
- case DCB_CONNECTOR_DMS59_1 :
- case DCB_CONNECTOR_DVI_I : args->v0.type = NVIF_CONN_V0_DVI_I; break;
- case DCB_CONNECTOR_DVI_D : args->v0.type = NVIF_CONN_V0_DVI_D; break;
- case DCB_CONNECTOR_LVDS : args->v0.type = NVIF_CONN_V0_LVDS; break;
- case DCB_CONNECTOR_LVDS_SPWG: args->v0.type = NVIF_CONN_V0_LVDS_SPWG; break;
- case DCB_CONNECTOR_DMS59_DP0:
- case DCB_CONNECTOR_DMS59_DP1:
- case DCB_CONNECTOR_DP :
- case DCB_CONNECTOR_mDP :
- case DCB_CONNECTOR_USB_C : args->v0.type = NVIF_CONN_V0_DP; break;
- case DCB_CONNECTOR_eDP : args->v0.type = NVIF_CONN_V0_EDP; break;
- case DCB_CONNECTOR_HDMI_0 :
- case DCB_CONNECTOR_HDMI_1 :
- case DCB_CONNECTOR_HDMI_C : args->v0.type = NVIF_CONN_V0_HDMI; break;
+ /* VGA */
+ case DCB_CONNECTOR_DVI_A :
+ case DCB_CONNECTOR_POD_VGA :
+ case DCB_CONNECTOR_VGA : args->v0.type = NVIF_CONN_V0_VGA; break;
+
+ /* TV */
+ case DCB_CONNECTOR_TV_0 :
+ case DCB_CONNECTOR_TV_1 :
+ case DCB_CONNECTOR_TV_2 :
+ case DCB_CONNECTOR_TV_SCART :
+ case DCB_CONNECTOR_TV_SCART_D :
+ case DCB_CONNECTOR_TV_DTERM :
+ case DCB_CONNECTOR_POD_TV_3 :
+ case DCB_CONNECTOR_POD_TV_1 :
+ case DCB_CONNECTOR_POD_TV_0 :
+ case DCB_CONNECTOR_TV_3 : args->v0.type = NVIF_CONN_V0_TV; break;
+
+ /* DVI */
+ case DCB_CONNECTOR_DVI_I_TV_1 :
+ case DCB_CONNECTOR_DVI_I_TV_0 :
+ case DCB_CONNECTOR_DVI_I_TV_2 :
+ case DCB_CONNECTOR_DVI_ADC :
+ case DCB_CONNECTOR_DMS59_0 :
+ case DCB_CONNECTOR_DMS59_1 :
+ case DCB_CONNECTOR_DVI_I : args->v0.type = NVIF_CONN_V0_DVI_I; break;
+ case DCB_CONNECTOR_TMDS :
+ case DCB_CONNECTOR_DVI_D : args->v0.type = NVIF_CONN_V0_DVI_D; break;
+
+ /* LVDS */
+ case DCB_CONNECTOR_LVDS : args->v0.type = NVIF_CONN_V0_LVDS; break;
+ case DCB_CONNECTOR_LVDS_SPWG : args->v0.type = NVIF_CONN_V0_LVDS_SPWG; break;
+
+ /* DP */
+ case DCB_CONNECTOR_DMS59_DP0 :
+ case DCB_CONNECTOR_DMS59_DP1 :
+ case DCB_CONNECTOR_DP :
+ case DCB_CONNECTOR_mDP :
+ case DCB_CONNECTOR_USB_C : args->v0.type = NVIF_CONN_V0_DP; break;
+ case DCB_CONNECTOR_eDP : args->v0.type = NVIF_CONN_V0_EDP; break;
+
+ /* HDMI */
+ case DCB_CONNECTOR_HDMI_0 :
+ case DCB_CONNECTOR_HDMI_1 :
+ case DCB_CONNECTOR_HDMI_C : args->v0.type = NVIF_CONN_V0_HDMI; break;
+
+ /*
+ * Dock & unused outputs.
+ * BNC, SPDIF, WFD, and detached LVDS go here.
+ */
default:
- WARN_ON(1);
+ nvkm_warn(&(disp->engine.subdev),
+ "unimplemented connector type 0x%02x\n",
+ conn->info.type);
+ args->v0.type = NVIF_CONN_V0_VGA;
ret = -EINVAL;
break;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] drm/nouveau: add missing DCB connector types
2025-10-13 22:18 ` [PATCH v2 1/2] drm/nouveau: add missing DCB connector types Alex Ramírez
@ 2025-10-14 16:07 ` Petr Vorel
2025-10-15 18:19 ` Alexander Ramirez
0 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2025-10-14 16:07 UTC (permalink / raw)
To: Alex Ramírez; +Cc: nouveau
Hi Alex,
> * Add missing DCB connectors in conn.h as per the NVIDIA DCB specification.
> A lot of connector logic was rewritten for Linux v6.5; some display connector types
> went unaccounted-for which caused kernel warnings on devices with the now-unsupported
> DCB connectors. This patch adds all of the DCB connectors as defined by NVIDIA to the
> dcb_connector_type enum to bring back support for these connectors to the new logic.
> Fixes: 8b7d92cad953 ("drm/nouveau/kms/nv50-: create connectors based on nvkm info")
> Link: https://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html
nit: maybe
Link: https://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html#_connector_table_entry
Thanks for adding the docs as comments!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] drm/nouveau: add missing DCB connector types
2025-10-14 16:07 ` Petr Vorel
@ 2025-10-15 18:19 ` Alexander Ramirez
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Ramirez @ 2025-10-15 18:19 UTC (permalink / raw)
To: Petr Vorel; +Cc: nouveau@lists.freedesktop.org
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]
Hey Petr,
Thank you for the review! Any thoughts on the cover letter or part 2 of the patch set?
I'm super new to mailing lists (and submissions in general).
Thanks for your time,
Alex On Tuesday, 14 October 2025 at 12:30:29 GMT-4, Petr Vorel <pvorel@suse.cz> wrote:
Hi Alex,
> * Add missing DCB connectors in conn.h as per the NVIDIA DCB specification.
> A lot of connector logic was rewritten for Linux v6.5; some display connector types
> went unaccounted-for which caused kernel warnings on devices with the now-unsupported
> DCB connectors. This patch adds all of the DCB connectors as defined by NVIDIA to the
> dcb_connector_type enum to bring back support for these connectors to the new logic.
> Fixes: 8b7d92cad953 ("drm/nouveau/kms/nv50-: create connectors based on nvkm info")
> Link: https://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html
nit: maybe
Link: https://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html#_connector_table_entry
Thanks for adding the docs as comments!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
[-- Attachment #2: Type: text/html, Size: 2945 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-15 18:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20251013222424.12613-3-lxrmrz732.ref@rocketmail.com>
2025-10-13 22:18 ` [PATCH v2 0/2] drm/nouveau: add and implement missing DCB connector values Alex Ramírez
2025-10-13 22:18 ` [PATCH v2 1/2] drm/nouveau: add missing DCB connector types Alex Ramírez
2025-10-14 16:07 ` Petr Vorel
2025-10-15 18:19 ` Alexander Ramirez
2025-10-13 22:18 ` [PATCH v2 2/2] drm/nouveau: implement missing DCB connector types; gracefully handle unknown connectors Alex Ramírez
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.