Skip to content

Commit 3036b4c

Browse files
Alex RamírezLyude
authored andcommitted
drm/nouveau: add missing DCB connector types
* 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: 8b7d92c ("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#_connector_table_entry Signed-off-by: Alex Ramírez <lxrmrz732@rocketmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> [Lyude: Clarify DCB_CONNECTOR_HDMI_0 weirdness in comments] Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20251213005327.9495-2-lxrmrz732@gmail.com
1 parent 1a0f69e commit 3036b4c

1 file changed

Lines changed: 74 additions & 21 deletions

File tree

  • drivers/gpu/drm/nouveau/include/nvkm/subdev/bios

drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h

Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,81 @@
11
/* SPDX-License-Identifier: MIT */
22
#ifndef __NVBIOS_CONN_H__
33
#define __NVBIOS_CONN_H__
4+
5+
/*
6+
* An enumerator representing all of the possible VBIOS connector types defined
7+
* by Nvidia at
8+
* https://nvidia.github.io/open-gpu-doc/DCB/DCB-4.x-Specification.html.
9+
*
10+
* [1] Nvidia's documentation actually claims DCB_CONNECTOR_HDMI_0 is a "3-Pin
11+
* DIN Stereo Connector". This seems very likely to be a documentation typo
12+
* or some sort of funny historical baggage, because we've treated this
13+
* connector type as HDMI for years without issue.
14+
* TODO: Check with Nvidia what's actually happening here.
15+
*/
416
enum dcb_connector_type {
5-
DCB_CONNECTOR_VGA = 0x00,
6-
DCB_CONNECTOR_TV_0 = 0x10,
7-
DCB_CONNECTOR_TV_1 = 0x11,
8-
DCB_CONNECTOR_TV_3 = 0x13,
9-
DCB_CONNECTOR_DVI_I = 0x30,
10-
DCB_CONNECTOR_DVI_D = 0x31,
11-
DCB_CONNECTOR_DMS59_0 = 0x38,
12-
DCB_CONNECTOR_DMS59_1 = 0x39,
13-
DCB_CONNECTOR_LVDS = 0x40,
14-
DCB_CONNECTOR_LVDS_SPWG = 0x41,
15-
DCB_CONNECTOR_DP = 0x46,
16-
DCB_CONNECTOR_eDP = 0x47,
17-
DCB_CONNECTOR_mDP = 0x48,
18-
DCB_CONNECTOR_HDMI_0 = 0x60,
19-
DCB_CONNECTOR_HDMI_1 = 0x61,
20-
DCB_CONNECTOR_HDMI_C = 0x63,
21-
DCB_CONNECTOR_DMS59_DP0 = 0x64,
22-
DCB_CONNECTOR_DMS59_DP1 = 0x65,
23-
DCB_CONNECTOR_WFD = 0x70,
24-
DCB_CONNECTOR_USB_C = 0x71,
25-
DCB_CONNECTOR_NONE = 0xff
17+
/* Analog outputs */
18+
DCB_CONNECTOR_VGA = 0x00, // VGA 15-pin connector
19+
DCB_CONNECTOR_DVI_A = 0x01, // DVI-A
20+
DCB_CONNECTOR_POD_VGA = 0x02, // Pod - VGA 15-pin connector
21+
DCB_CONNECTOR_TV_0 = 0x10, // TV - Composite Out
22+
DCB_CONNECTOR_TV_1 = 0x11, // TV - S-Video Out
23+
DCB_CONNECTOR_TV_2 = 0x12, // TV - S-Video Breakout - Composite
24+
DCB_CONNECTOR_TV_3 = 0x13, // HDTV Component - YPrPb
25+
DCB_CONNECTOR_TV_SCART = 0x14, // TV - SCART Connector
26+
DCB_CONNECTOR_TV_SCART_D = 0x16, // TV - Composite SCART over D-connector
27+
DCB_CONNECTOR_TV_DTERM = 0x17, // HDTV - D-connector (EIAJ4120)
28+
DCB_CONNECTOR_POD_TV_3 = 0x18, // Pod - HDTV - YPrPb
29+
DCB_CONNECTOR_POD_TV_1 = 0x19, // Pod - S-Video
30+
DCB_CONNECTOR_POD_TV_0 = 0x1a, // Pod - Composite
31+
32+
/* DVI digital outputs */
33+
DCB_CONNECTOR_DVI_I_TV_1 = 0x20, // DVI-I-TV-S-Video
34+
DCB_CONNECTOR_DVI_I_TV_0 = 0x21, // DVI-I-TV-Composite
35+
DCB_CONNECTOR_DVI_I_TV_2 = 0x22, // DVI-I-TV-S-Video Breakout-Composite
36+
DCB_CONNECTOR_DVI_I = 0x30, // DVI-I
37+
DCB_CONNECTOR_DVI_D = 0x31, // DVI-D
38+
DCB_CONNECTOR_DVI_ADC = 0x32, // Apple Display Connector (ADC)
39+
DCB_CONNECTOR_DMS59_0 = 0x38, // LFH-DVI-I-1
40+
DCB_CONNECTOR_DMS59_1 = 0x39, // LFH-DVI-I-2
41+
DCB_CONNECTOR_BNC = 0x3c, // BNC Connector [for SDI?]
42+
43+
/* LVDS / TMDS digital outputs */
44+
DCB_CONNECTOR_LVDS = 0x40, // LVDS-SPWG-Attached [is this name correct?]
45+
DCB_CONNECTOR_LVDS_SPWG = 0x41, // LVDS-OEM-Attached (non-removable)
46+
DCB_CONNECTOR_LVDS_REM = 0x42, // LVDS-SPWG-Detached [following naming above]
47+
DCB_CONNECTOR_LVDS_SPWG_REM = 0x43, // LVDS-OEM-Detached (removable)
48+
DCB_CONNECTOR_TMDS = 0x45, // TMDS-OEM-Attached (non-removable)
49+
50+
/* DP digital outputs */
51+
DCB_CONNECTOR_DP = 0x46, // DisplayPort External Connector
52+
DCB_CONNECTOR_eDP = 0x47, // DisplayPort Internal Connector
53+
DCB_CONNECTOR_mDP = 0x48, // DisplayPort (Mini) External Connector
54+
55+
/* Dock outputs (not used) */
56+
DCB_CONNECTOR_DOCK_VGA_0 = 0x50, // VGA 15-pin if not docked
57+
DCB_CONNECTOR_DOCK_VGA_1 = 0x51, // VGA 15-pin if docked
58+
DCB_CONNECTOR_DOCK_DVI_I_0 = 0x52, // DVI-I if not docked
59+
DCB_CONNECTOR_DOCK_DVI_I_1 = 0x53, // DVI-I if docked
60+
DCB_CONNECTOR_DOCK_DVI_D_0 = 0x54, // DVI-D if not docked
61+
DCB_CONNECTOR_DOCK_DVI_D_1 = 0x55, // DVI-D if docked
62+
DCB_CONNECTOR_DOCK_DP_0 = 0x56, // DisplayPort if not docked
63+
DCB_CONNECTOR_DOCK_DP_1 = 0x57, // DisplayPort if docked
64+
DCB_CONNECTOR_DOCK_mDP_0 = 0x58, // DisplayPort (Mini) if not docked
65+
DCB_CONNECTOR_DOCK_mDP_1 = 0x59, // DisplayPort (Mini) if docked
66+
67+
/* HDMI? digital outputs */
68+
DCB_CONNECTOR_HDMI_0 = 0x60, // HDMI? See [1] in top-level enum comment above
69+
DCB_CONNECTOR_HDMI_1 = 0x61, // HDMI-A connector
70+
DCB_CONNECTOR_SPDIF = 0x62, // Audio S/PDIF connector
71+
DCB_CONNECTOR_HDMI_C = 0x63, // HDMI-C (Mini) connector
72+
73+
/* Misc. digital outputs */
74+
DCB_CONNECTOR_DMS59_DP0 = 0x64, // LFH-DP-1
75+
DCB_CONNECTOR_DMS59_DP1 = 0x65, // LFH-DP-2
76+
DCB_CONNECTOR_WFD = 0x70, // Virtual connector for Wifi Display (WFD)
77+
DCB_CONNECTOR_USB_C = 0x71, // [DP over USB-C; not present in docs]
78+
DCB_CONNECTOR_NONE = 0xff // Skip Entry
2679
};
2780

2881
struct nvbios_connT {

0 commit comments

Comments
 (0)