11b255f1cSBen Skeggs /* SPDX-License-Identifier: MIT */ 21b255f1cSBen Skeggs #ifndef __NVIF_IF0012_H__ 31b255f1cSBen Skeggs #define __NVIF_IF0012_H__ 41b255f1cSBen Skeggs 525feda6fSKees Cook #include <drm/display/drm_dp.h> 625feda6fSKees Cook 71b255f1cSBen Skeggs union nvif_outp_args { 81b255f1cSBen Skeggs struct nvif_outp_v0 { 91b255f1cSBen Skeggs __u8 version; 101b255f1cSBen Skeggs __u8 id; /* DCB device index. */ 111b255f1cSBen Skeggs __u8 pad02[6]; 121b255f1cSBen Skeggs } v0; 131b255f1cSBen Skeggs }; 14dfc4005fSBen Skeggs 15*21636b1aSBen Skeggs #define NVIF_OUTP_V0_ACQUIRE 0x11 16*21636b1aSBen Skeggs #define NVIF_OUTP_V0_RELEASE 0x12 17*21636b1aSBen Skeggs 18*21636b1aSBen Skeggs #define NVIF_OUTP_V0_LOAD_DETECT 0x20 19*21636b1aSBen Skeggs 20*21636b1aSBen Skeggs #define NVIF_OUTP_V0_INFOFRAME 0x60 21*21636b1aSBen Skeggs #define NVIF_OUTP_V0_HDA_ELD 0x61 22*21636b1aSBen Skeggs 23*21636b1aSBen Skeggs #define NVIF_OUTP_V0_DP_AUX_PWR 0x70 24*21636b1aSBen Skeggs #define NVIF_OUTP_V0_DP_RETRAIN 0x73 25*21636b1aSBen Skeggs #define NVIF_OUTP_V0_DP_MST_VCPI 0x78 26dfc4005fSBen Skeggs 27dfc4005fSBen Skeggs union nvif_outp_load_detect_args { 28dfc4005fSBen Skeggs struct nvif_outp_load_detect_v0 { 29dfc4005fSBen Skeggs __u8 version; 30dfc4005fSBen Skeggs __u8 load; 31dfc4005fSBen Skeggs __u8 pad02[2]; 32dfc4005fSBen Skeggs __u32 data; /*TODO: move vbios loadval parsing into nvkm */ 33dfc4005fSBen Skeggs } v0; 34dfc4005fSBen Skeggs }; 35ea6143a8SBen Skeggs 36ea6143a8SBen Skeggs union nvif_outp_acquire_args { 37ea6143a8SBen Skeggs struct nvif_outp_acquire_v0 { 38ea6143a8SBen Skeggs __u8 version; 39ea6143a8SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_RGB_CRT 0x00 40ea6143a8SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_TV 0x01 41ea6143a8SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_TMDS 0x02 42ea6143a8SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_LVDS 0x03 43ea6143a8SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_DP 0x04 44ea6143a8SBen Skeggs __u8 proto; 45ea6143a8SBen Skeggs __u8 or; 46ea6143a8SBen Skeggs __u8 link; 47ea6143a8SBen Skeggs __u8 pad04[4]; 48ea6143a8SBen Skeggs union { 49ea6143a8SBen Skeggs struct { 50f530bc60SBen Skeggs __u8 head; 51f530bc60SBen Skeggs __u8 hdmi; 52f530bc60SBen Skeggs __u8 hdmi_max_ac_packet; 53f530bc60SBen Skeggs __u8 hdmi_rekey; 54f530bc60SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_TMDS_HDMI_SCDC_SCRAMBLE (1 << 0) 55f530bc60SBen Skeggs #define NVIF_OUTP_ACQUIRE_V0_TMDS_HDMI_SCDC_DIV_BY_4 (1 << 1) 56f530bc60SBen Skeggs __u8 hdmi_scdc; 57f530bc60SBen Skeggs __u8 hdmi_hda; 58f530bc60SBen Skeggs __u8 pad06[2]; 59ea6143a8SBen Skeggs } tmds; 60ea6143a8SBen Skeggs struct { 619793083fSBen Skeggs __u8 dual; 629793083fSBen Skeggs __u8 bpc8; 639793083fSBen Skeggs __u8 pad02[6]; 649793083fSBen Skeggs } lvds; 659793083fSBen Skeggs struct { 6681344372SBen Skeggs __u8 link_nr; /* 0 = highest possible. */ 6781344372SBen Skeggs __u8 link_bw; /* 0 = highest possible, DP BW code otherwise. */ 68ea6143a8SBen Skeggs __u8 hda; 6981344372SBen Skeggs __u8 mst; 7081344372SBen Skeggs __u8 pad04[4]; 7125feda6fSKees Cook __u8 dpcd[DP_RECEIVER_CAP_SIZE]; 72ea6143a8SBen Skeggs } dp; 73ea6143a8SBen Skeggs }; 74ea6143a8SBen Skeggs } v0; 75ea6143a8SBen Skeggs }; 76ea6143a8SBen Skeggs 77ea6143a8SBen Skeggs union nvif_outp_release_args { 78ea6143a8SBen Skeggs struct nvif_outp_release_vn { 79ea6143a8SBen Skeggs } vn; 80ea6143a8SBen Skeggs }; 81f530bc60SBen Skeggs 82f530bc60SBen Skeggs union nvif_outp_infoframe_args { 83f530bc60SBen Skeggs struct nvif_outp_infoframe_v0 { 84f530bc60SBen Skeggs __u8 version; 85f530bc60SBen Skeggs #define NVIF_OUTP_INFOFRAME_V0_AVI 0 86f530bc60SBen Skeggs #define NVIF_OUTP_INFOFRAME_V0_VSI 1 87f530bc60SBen Skeggs __u8 type; 88f530bc60SBen Skeggs __u8 head; 89f530bc60SBen Skeggs __u8 pad03[5]; 90f530bc60SBen Skeggs __u8 data[]; 91f530bc60SBen Skeggs } v0; 92f530bc60SBen Skeggs }; 93a9f5d772SBen Skeggs 94a9f5d772SBen Skeggs union nvif_outp_hda_eld_args { 95a9f5d772SBen Skeggs struct nvif_outp_hda_eld_v0 { 96a9f5d772SBen Skeggs __u8 version; 97a9f5d772SBen Skeggs __u8 head; 98a9f5d772SBen Skeggs __u8 pad02[6]; 99a9f5d772SBen Skeggs __u8 data[]; 100a9f5d772SBen Skeggs } v0; 101a9f5d772SBen Skeggs }; 102a62b7493SBen Skeggs 103a62b7493SBen Skeggs union nvif_outp_dp_aux_pwr_args { 104a62b7493SBen Skeggs struct nvif_outp_dp_aux_pwr_v0 { 105a62b7493SBen Skeggs __u8 version; 106a62b7493SBen Skeggs __u8 state; 107a62b7493SBen Skeggs __u8 pad02[6]; 108a62b7493SBen Skeggs } v0; 109a62b7493SBen Skeggs }; 1108bb30c88SBen Skeggs 1118bb30c88SBen Skeggs union nvif_outp_dp_retrain_args { 1128bb30c88SBen Skeggs struct nvif_outp_dp_retrain_vn { 1138bb30c88SBen Skeggs } vn; 1148bb30c88SBen Skeggs }; 1158c7d980dSBen Skeggs 1168c7d980dSBen Skeggs union nvif_outp_dp_mst_vcpi_args { 1178c7d980dSBen Skeggs struct nvif_outp_dp_mst_vcpi_v0 { 1188c7d980dSBen Skeggs __u8 version; 1198c7d980dSBen Skeggs __u8 head; 1208c7d980dSBen Skeggs __u8 start_slot; 1218c7d980dSBen Skeggs __u8 num_slots; 1228c7d980dSBen Skeggs __u16 pbn; 1238c7d980dSBen Skeggs __u16 aligned_pbn; 1248c7d980dSBen Skeggs } v0; 1258c7d980dSBen Skeggs }; 1261b255f1cSBen Skeggs #endif 127