1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVIF_IF0012_H__
3 #define __NVIF_IF0012_H__
5 #include <drm/display/drm_dp.h>
10 __u8 id; /* DCB device index. */
11 #define NVIF_OUTP_V0_TYPE_DAC 0x00
12 #define NVIF_OUTP_V0_TYPE_SOR 0x01
13 #define NVIF_OUTP_V0_TYPE_PIOR 0x02
15 #define NVIF_OUTP_V0_PROTO_RGB_CRT 0x00
16 #define NVIF_OUTP_V0_PROTO_TMDS 0x01
17 #define NVIF_OUTP_V0_PROTO_LVDS 0x02
18 #define NVIF_OUTP_V0_PROTO_DP 0x03
44 #define NVIF_OUTP_V0_DETECT 0x00
45 #define NVIF_OUTP_V0_EDID_GET 0x01
47 #define NVIF_OUTP_V0_INHERIT 0x10
48 #define NVIF_OUTP_V0_ACQUIRE 0x11
49 #define NVIF_OUTP_V0_RELEASE 0x12
51 #define NVIF_OUTP_V0_LOAD_DETECT 0x20
53 #define NVIF_OUTP_V0_BL_GET 0x30
54 #define NVIF_OUTP_V0_BL_SET 0x31
56 #define NVIF_OUTP_V0_LVDS 0x40
58 #define NVIF_OUTP_V0_HDMI 0x50
60 #define NVIF_OUTP_V0_INFOFRAME 0x60
61 #define NVIF_OUTP_V0_HDA_ELD 0x61
63 #define NVIF_OUTP_V0_DP_AUX_PWR 0x70
64 #define NVIF_OUTP_V0_DP_AUX_XFER 0x71
65 #define NVIF_OUTP_V0_DP_RATES 0x72
66 #define NVIF_OUTP_V0_DP_TRAIN 0x73
67 #define NVIF_OUTP_V0_DP_DRIVE 0x74
68 #define NVIF_OUTP_V0_DP_SST 0x75
69 #define NVIF_OUTP_V0_DP_MST_ID_GET 0x76
70 #define NVIF_OUTP_V0_DP_MST_ID_PUT 0x77
71 #define NVIF_OUTP_V0_DP_MST_VCPI 0x78
73 union nvif_outp_detect_args {
74 struct nvif_outp_detect_v0 {
76 #define NVIF_OUTP_DETECT_V0_NOT_PRESENT 0x00
77 #define NVIF_OUTP_DETECT_V0_PRESENT 0x01
78 #define NVIF_OUTP_DETECT_V0_UNKNOWN 0x02
83 union nvif_outp_edid_get_args {
84 struct nvif_outp_edid_get_v0 {
92 union nvif_outp_load_detect_args {
93 struct nvif_outp_load_detect_v0 {
97 __u32 data; /*TODO: move vbios loadval parsing into nvkm */
101 union nvif_outp_acquire_args {
102 struct nvif_outp_acquire_v0 {
104 #define NVIF_OUTP_ACQUIRE_V0_DAC 0x00
105 #define NVIF_OUTP_ACQUIRE_V0_SOR 0x01
106 #define NVIF_OUTP_ACQUIRE_V0_PIOR 0x02
119 union nvif_outp_inherit_args {
120 struct nvif_outp_inherit_v0 {
122 #define NVIF_OUTP_INHERIT_V0_RGB_CRT 0x00
123 #define NVIF_OUTP_INHERIT_V0_TV 0x01
124 #define NVIF_OUTP_INHERIT_V0_TMDS 0x02
125 #define NVIF_OUTP_INHERIT_V0_LVDS 0x03
126 #define NVIF_OUTP_INHERIT_V0_DP 0x04
127 // In/out. Input is one of the above values, output is the actual hw protocol
134 // TODO: Figure out padding, and whether we even want this field
141 union nvif_outp_release_args {
142 struct nvif_outp_release_vn {
146 union nvif_outp_bl_get_args {
147 struct nvif_outp_bl_get_v0 {
153 union nvif_outp_bl_set_args {
154 struct nvif_outp_bl_set_v0 {
160 union nvif_outp_lvds_args {
161 struct nvif_outp_lvds_v0 {
168 union nvif_outp_hdmi_args {
169 struct nvif_outp_hdmi_v0 {
176 __u8 scdc_scrambling;
182 union nvif_outp_infoframe_args {
183 struct nvif_outp_infoframe_v0 {
185 #define NVIF_OUTP_INFOFRAME_V0_AVI 0
186 #define NVIF_OUTP_INFOFRAME_V0_VSI 1
194 union nvif_outp_hda_eld_args {
195 struct nvif_outp_hda_eld_v0 {
203 union nvif_outp_dp_aux_pwr_args {
204 struct nvif_outp_dp_aux_pwr_v0 {
211 union nvif_outp_dp_aux_xfer_args {
212 struct nvif_outp_dp_aux_xfer_v0 {
222 union nvif_outp_dp_rates_args {
223 struct nvif_outp_dp_rates_v0 {
234 union nvif_outp_dp_train_args {
235 struct nvif_outp_dp_train_v0 {
243 __u8 dpcd[DP_RECEIVER_CAP_SIZE];
247 union nvif_outp_dp_drive_args {
248 struct nvif_outp_dp_drive_v0 {
257 union nvif_outp_dp_sst_args {
258 struct nvif_outp_dp_sst_v0 {
268 union nvif_outp_dp_mst_id_put_args {
269 struct nvif_outp_dp_mst_id_put_v0 {
276 union nvif_outp_dp_mst_id_get_args {
277 struct nvif_outp_dp_mst_id_get_v0 {
284 union nvif_outp_dp_mst_vcpi_args {
285 struct nvif_outp_dp_mst_vcpi_v0 {