1 /* 2 * SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 * SPDX-License-Identifier: MIT 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #pragma once 25 26 #include <nvtypes.h> 27 28 // 29 // This file was generated with FINN, an NVIDIA coding tool. 30 // Source file: ctrl/ctrl0073/ctrl0073specific.finn 31 // 32 33 #include "ctrl/ctrl0073/ctrl0073base.h" 34 35 #include "ctrl/ctrlxxxx.h" 36 /* NV04_DISPLAY_COMMON display-specific control commands and parameters */ 37 38 /* 39 * NV0073_CTRL_CMD_SPECIFIC_GET_TYPE 40 * 41 * This command can be used to determine the associated display type for 42 * the specified displayId. 43 * 44 * subDeviceInstance 45 * This parameter specifies the subdevice instance within the 46 * NV04_DISPLAY_COMMON parent device to which the operation should be 47 * directed. This parameter must specify a value between zero and the 48 * total number of subdevices within the parent device. This parameter 49 * should be set to zero for default behavior. 50 * displayId 51 * This parameter specifies the ID of the display for which the display 52 * type is to be returned. Only one display may be indicated in this 53 * parameter. 54 * displayType 55 * This parameter returns the display type associated with the specified 56 * displayId parameter. Valid displayType values are: 57 * NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_CRT 58 * NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_DFP 59 * NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_TV 60 * 61 * Possible status values returned are: 62 * NV_OK 63 * NV_ERR_INVALID_PARAM_STRUCT 64 * NV_ERR_INVALID_ARGUMENT 65 */ 66 #define NV0073_CTRL_CMD_SPECIFIC_GET_TYPE (0x730240U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS_MESSAGE_ID" */ 67 68 #define NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS_MESSAGE_ID (0x40U) 69 70 typedef struct NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS { 71 NvU32 subDeviceInstance; 72 NvU32 displayId; 73 NvU32 displayType; 74 } NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS; 75 76 /* valid display types */ 77 #define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_UNKNOWN (0x00000000U) 78 #define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_CRT (0x00000001U) 79 #define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_DFP (0x00000002U) 80 #define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_TV (0x00000003U) 81 82 /* 83 * NV0073_CTRL_CMD_SPECIFIC_GET_EDID_V2 84 * 85 * This command can be used to request the EDID for the specified displayId. 86 * 87 * [in] subDeviceInstance 88 * This parameter specifies the subdevice instance within the 89 * NV04_DISPLAY_COMMON parent device to which the operation should be 90 * directed. This parameter must specify a value between zero and the total 91 * number of subdevices within the parent device. This parameter should 92 * be set to zero for default behavior. 93 * [in] displayId 94 * This parameter specifies the display to read the EDID. The display ID 95 * must specify a display with a positive connect state as determined 96 * with the NV0073_CTRL_CMD_SYSTEM_GET_CONNECT_STATE command. Only one 97 * display may be indicated in this parameter. If a more than one 98 * display Id is used, the RM will return NV_ERR_INVALID_ARGUMENT. 99 * [out] bufferSize 100 * This parameter returns the number of bytes copied into edidBuffer after 101 * performing the requested EDID operations. 102 * [out] edidBuffer 103 * The array of EDIDs that RM will fill after the requested operations. If 104 * the size of the array is not large enough to hold the number of bytes to 105 * be copied, NV_ERR_INVALID_ARGUMENT will be returned. 106 * [in] flags 107 * This parameter defines the specific operations that will be performed 108 * in reading the EDID. 109 * Here are the current defined fields: 110 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE 111 * A client uses this field to indicate whether to return the cached 112 * copy of the EDID or to use DDC to read the EDID from the display. 113 * Possible values are: 114 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_NO 115 * The RM will use DDC to grab the EDID. 116 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_YES 117 * The RM will copy the last EDID found into the clients 118 * buffer. No DDC will be performed. 119 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE 120 * A client uses this field to indicate whether to read from 121 * the HW and return the EDID w/o any patching 122 * Possible values are: 123 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_COOKED 124 * Use the _COPY_CACHE policy 125 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_RAW 126 * Perform the read and return an unadulterated EDID. 127 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE 128 * A client uses this field to indicate whether to read EDID 129 * from SBIOS using ACPI sub function for display dynamic switching 130 * feature. This flag should only be set on internal display with 131 * dynamic switching feature enabled. 132 * Possible values are: 133 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_ACPI 134 * RM reads the EDID from SBIOS and returns the raw EDID provided 135 * by SBIOS. 136 * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_DEFAULT 137 * EDID is read based on rest of the 'flags' that are passed to 138 * this function. 139 * 140 * Possible status values returned are: 141 * NV_OK 142 * NV_ERR_INVALID_PARAM_STRUCT 143 * NV_ERR_INVALID_ARGUMENT 144 */ 145 #define NV0073_CTRL_CMD_SPECIFIC_GET_EDID_V2 (0x730245U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS_MESSAGE_ID" */ 146 147 #define NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES 2048U 148 149 #define NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS_MESSAGE_ID (0x45U) 150 151 typedef struct NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS { 152 NvU32 subDeviceInstance; 153 NvU32 displayId; 154 NvU32 bufferSize; 155 NvU32 flags; 156 NvU8 edidBuffer[NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES]; 157 } NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS; 158 159 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE 0:0 160 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_NO 0x00000000U 161 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_YES 0x00000001U 162 163 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE 1:1 164 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_COOKED 0x00000000U 165 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_RAW 0x00000001U 166 167 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE 3:2 168 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_DEFAULT 0x00000000U 169 #define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_ACPI 0x00000001U 170 171 /* 172 * NV0073_CTRL_CMD_SPECIFIC_SET_EDID_V2 173 * 174 * This command can be used to set or remove a complete EDID for the 175 * specified displayId. Once the EDID is set, any requests 176 * to read the EDID or use DDC detection will always use a cached copy of 177 * the EDID. That is, the EDID becomes static until disabled by calling 178 * this same function with edidBuffer. Note, that DDC based 179 * detection will always pass for any displayId that has set an EDID. Also, 180 * this path will not store any value across reboots. If an EDID needs to 181 * remain set after a reboot, RM clients must call this function again. 182 * 183 * subDeviceInstance 184 * This parameter specifies the subdevice instance within the 185 * NV04_DISPLAY_COMMON parent device to which the operation should be 186 * directed. This parameter must specify a value between zero and the total 187 * number of subdevices within the parent device. This parameter should 188 * be set to zero for default behavior. 189 * displayId 190 * This parameter specifies the display to store or the EDID. Only one 191 * display may be indicated in this parameter. If more than one displayId 192 * is used, the RM will return NV_ERR_INVALID_ARGUMENT. 193 * If the displayId does not use DDC and hence would not have an EDID, 194 * then the RM could also return NV_ERR_INVALID_ARGUMENT. 195 * bufferSize 196 * This parameter specifies the size of the EDID buffer pointed to by 197 * pEdidBuffer. If the EDID write contains more bytes than bufferSize, 198 * the RM will extend the bufferSize of the EDID inside the RM to match. 199 * Note a bufferSize of 0 would mean no bytes will be copied, but set the 200 * current cached EDID as static. 201 * edidBuffer 202 * This parameter specifies the EDID buffer that the RM will copy into 203 * the RM buffer. If the EDID buffer is empty, the RM will remove any 204 * previous set EDID and allow further detection and EDID reads to use DDC. 205 * The RM will not check to see if the EDID is valid here or not. 206 * The client should validate the EDID if needed before calling this function. 207 * 208 * Possible status values returned are: 209 * NV_OK 210 * NV_ERR_INVALID_PARAM_STRUCT 211 * NV_ERR_INVALID_ARGUMENT 212 * 213 */ 214 215 #define NV0073_CTRL_CMD_SPECIFIC_SET_EDID_V2 (0x730246U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS_MESSAGE_ID" */ 216 217 #define NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS_MESSAGE_ID (0x46U) 218 219 typedef struct NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS { 220 NvU32 subDeviceInstance; 221 NvU32 displayId; 222 NvU32 bufferSize; 223 NvU8 edidBuffer[NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES]; 224 } NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS; 225 226 /* 227 * NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE 228 * 229 * This Control Cmd is for providing the Faking device(s) support from RM. 230 * This command serves as the entry point for all interaction of RM with 231 * user mode component of the any internal [test] tool. The Faking framework 232 * in RM will be activated only after the usermode app sends in a proper ENABLE 233 * cmd first. Any attempt to issue other cmds while the faking code has not 234 * been enabled will result in RM err _INVALID_DATA. 235 * 236 * subDeviceInstance 237 * This parameter specifies the subdevice instance within the 238 * NV04_DISPLAY_COMMON parent device to which the operation should be 239 * directed. This parameter must specify a value between zero and the total 240 * number of subdevices within the parent device. This parameter should 241 * be set to zero for default behavior. 242 * cmd 243 * This field will carry the command to be executed by the framework. 244 * This includes Enabling/Disabling the test framework and faking devices 245 * like CRT/DVI/TV. 246 * data 247 * This field is to carry the data required for executing the cmd. 248 * Except for Enable and Disable, the other faking device commands will 249 * require the device mask of the device to be faked/removed. 250 * tvType 251 * This field specifies a specific TV type while faking a TV. 252 * Possible values are: 253 * NV0073_FAKE_DEVICE_TV_NONE 254 * NV0073_FAKE_DEVICE_TV_SVIDEO 255 * NV0073_FAKE_DEVICE_TV_COMPOSITE 256 * NV0073_FAKE_DEVICE_TV_COMPONENT 257 * 258 * Possible status values returned are: 259 * NV_OK 260 * NV_ERR_INVALID_PARAM_STRUCT 261 * NV_ERR_INVALID_DATA 262 * 263 */ 264 265 #define NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE (0x730243U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS_MESSAGE_ID" */ 266 267 /* valid fake device TV connector types */ 268 #define NV0073_FAKE_DEVICE_TV_NONE (0U) 269 #define NV0073_FAKE_DEVICE_TV_SVIDEO (1U) 270 #define NV0073_FAKE_DEVICE_TV_COMPOSITE (2U) 271 #define NV0073_FAKE_DEVICE_TV_COMPONENT (3U) 272 273 #define NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS_MESSAGE_ID (0x43U) 274 275 typedef struct NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS { 276 NvU32 subDeviceInstance; 277 NvU32 cmd; 278 NvU32 data; 279 NvU32 tvType; 280 } NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS; 281 282 /* Faking Support commands */ 283 /* some random value to enable/disable test code */ 284 #define NV0073_FAKE_DEVICE_SUPPORT_ENABLE 0x11faU 285 #define NV0073_FAKE_DEVICE_SUPPORT_DISABLE 0x99ceU 286 #define NV0073_FAKE_DEVICE_SUPPORT_ATTACH_DEVICES 0x100U 287 #define NV0073_FAKE_DEVICE_SUPPORT_REMOVE_DEVICES 0x101U 288 289 290 291 /* 292 * NV0073_CTRL_CMD_SPECIFIC_GET_I2C_PORTID 293 * 294 * This command returns the I2C portID for the specified display device. 295 * 296 * subDeviceInstance 297 * This parameter specifies the subdevice instance within the 298 * NV04_DISPLAY_COMMON parent device to which the operation should be 299 * directed. This parameter must specify a value between zero and the 300 * total number of subdevices within the parent device. This parameter 301 * should be set to zero for default behavior. 302 * displayId 303 * This parameter specifies the display for which information is to be 304 * returned. Only one display may be indicated in this parameter. 305 * If more than one displayId is used a failing status of 306 * NV_ERR_INVALID_ARGUMENT will be returned. 307 * commPortId 308 * This parameter returns the I2C communication port ID of the 309 * display device indicated by the displayId parameter. 310 * ddcPortId 311 * This parameter returns the I2C DDC port ID of the display device 312 * indicated by the displayId parameter. 313 * 314 * Possible status values returned are: 315 * NV_OK 316 * NV_ERR_INVALID_PARAM_STRUCT 317 * NV_ERR_INVALID_ARGUMENT 318 */ 319 320 #define NV0073_CTRL_CMD_SPECIFIC_GET_I2C_PORTID (0x730211U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS_MESSAGE_ID" */ 321 322 #define NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS_MESSAGE_ID (0x11U) 323 324 typedef struct NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS { 325 NvU32 subDeviceInstance; 326 NvU32 displayId; 327 NvU32 commPortId; 328 NvU32 ddcPortId; 329 } NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS; 330 331 #define NV0073_CTRL_SPECIFIC_I2C_PORT_NONE (0x0U) 332 333 334 335 336 /* 337 * NV0073_CTRL_CMD_SPECIFIC_GET_CONNECTOR_DATA 338 * 339 * This command can be used to get display connector data. 340 * 341 * subDeviceInstance 342 * This parameter specifies the subdevice instance within the 343 * NV04_DISPLAY_COMMON parent device to which the operation should be 344 * directed. This parameter must specify a value between zero and the 345 * total number of subdevices within the parent device. This parameter 346 * should be set to zero for default behavior. 347 * displayId 348 * This parameter specifies the display for which information is to be 349 * returned. Only one display may be indicated in this parameter. 350 * If more than one displayId is used a failing status of 351 * NV_ERR_INVALID_ARGUMENT will be returned. 352 * DDCPartners 353 * This parameter specifies an NV0073_DISPLAY_MASK value describing 354 * the set of displays that share the same DDC line as displayId. This 355 * parameter will always be returned even if we also return the 356 * NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT_NO flag. 357 * flags 358 * This parameter specifies optional flags to be used while retrieving 359 * the connector data for a given displayId. 360 * Legal values for this parameter include: 361 * NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT 362 * This flag describes whether the connector data is present 363 * inside the firmware. 364 * count 365 * This parameter returns the number of connectors associated with 366 * the displayId argument. This value indicates the number of 367 * valid entries returned in the data parameter. 368 * data 369 * This parameter returns an array of structures containing the connector 370 * data associated with each connector for the given displayId argument. 371 * The count field specifies how many entries in this array are returned. 372 * Each entry in the array contains the following members: 373 * index 374 * This value is the index associated with the given connector. If 375 * two displayIds share the same index, then they share the same 376 * connector. 377 * type 378 * This value defines the type of connector associated with the 379 * displayId argument. 380 * location 381 * This value provides a possible means to determine the relative 382 * location of the connector in association to other connectors. 383 * For desktop boards, a value of zero defines the south most 384 * connector (the connector closest to the bus slot into which 385 * the board is inserted). 386 * platform 387 * This value defines the type of system with which to associate the 388 * location of each connector. 389 * 390 * Possible status values returned are: 391 * NV_OK 392 * NV_ERR_INVALID_PARAM_STRUCT 393 * NV_ERR_INVALID_ARGUMENT 394 * 395 */ 396 397 #define NV0073_CTRL_CMD_SPECIFIC_GET_CONNECTOR_DATA (0x730250U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS_MESSAGE_ID" */ 398 399 /* maximum number of connectors */ 400 #define NV0073_CTRL_MAX_CONNECTORS 4U 401 402 #define NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS_MESSAGE_ID (0x50U) 403 404 typedef struct NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS { 405 NvU32 subDeviceInstance; 406 NvU32 displayId; 407 NvU32 flags; 408 NvU32 DDCPartners; 409 NvU32 count; 410 struct { 411 NvU32 index; 412 NvU32 type; 413 NvU32 location; 414 } data[NV0073_CTRL_MAX_CONNECTORS]; 415 NvU32 platform; 416 } NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS; 417 418 /* defines for the flags field */ 419 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT 0:0 420 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT_NO 0x00000000U 421 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT_YES 0x00000001U 422 423 /* defines for the data[].type field */ 424 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_VGA_15_PIN 0x00000000U 425 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_COMPOSITE 0x00000010U 426 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_SVIDEO 0x00000011U 427 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_HDTV_COMPONENT 0x00000013U 428 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_SCART 0x00000014U 429 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_COMPOSITE_SCART_OVER_EIAJ4120_BLUE 0x00000016U 430 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_HDTV_EIAJ4120 0x00000017U 431 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_PC_POD_HDTV_YPRPB 0x00000018U 432 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_PC_POD_SVIDEO 0x00000019U 433 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_PC_POD_COMPOSITE 0x0000001AU 434 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_I_TV_SVIDEO 0x00000020U 435 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_I_TV_COMPOSITE 0x00000021U 436 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_I 0x00000030U 437 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_D 0x00000031U 438 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_ADC 0x00000032U 439 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DVI_I_1 0x00000038U 440 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DVI_I_2 0x00000039U 441 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_SPWG 0x00000040U 442 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_OEM 0x00000041U 443 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_EXT 0x00000046U 444 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_INT 0x00000047U 445 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_MINI_EXT 0x00000048U 446 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_SERIALIZER 0x00000049U 447 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_HDMI_A 0x00000061U 448 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_HDMI_C_MINI 0x00000063U 449 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DP_1 0x00000064U 450 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DP_2 0x00000065U 451 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_VIRTUAL_WFD 0x00000070U 452 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_USB_C 0x00000071U 453 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DSI 0x00000072U 454 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_STEREO_3PIN_DIN 0x00000073U 455 #define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_UNKNOWN 0xFFFFFFFFU 456 457 /* defines for the platform field */ 458 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_DEFAULT_ADD_IN_CARD 0x00000000U 459 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_TWO_PLATE_ADD_IN_CARD 0x00000001U 460 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_CONFIGURABLE 0x00000002U 461 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_DESKTOP_FULL_DP 0x00000007U 462 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_ADD_IN_CARD 0x00000008U 463 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MXM 0x00000009U 464 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_BACK 0x00000010U 465 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_BACK_LEFT 0x00000011U 466 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_BACK_DOCK 0x00000018U 467 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_CRUSH_DEFAULT 0x00000020U 468 #define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_UNKNOWN 0xFFFFFFFFU 469 470 471 472 /* 473 * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_ENABLE 474 * 475 * This command is used to signal the resource manager that the upcoming mode 476 * shall be hdmi vs dvi. This is required since the resource manager 477 * does not read the display edid. The resource manager shall enable hdmi 478 * components such as turning on the audio engine for instance. This should 479 * be called prior to every modeset in which the displayId is capable of hdmi. 480 * displayId 481 * This parameter specifies the displayId of HDMI resource to configure. 482 * This comes as input to this command. 483 * subDeviceInstance 484 * This parameter specifies the subdevice instance within the 485 * NV04_DISPLAY_COMMON parent device to which operation should be directed. 486 * This parameter must specify a value between zero and the total number 487 * of subdevices within the parent device. This parameter should be set 488 * to zero for default behavior. 489 * enable 490 * This field specifies the legal values: 491 * NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_TRUE 492 * NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_FALSE 493 * 494 * Possible status values returned are: 495 * NV_OK 496 * NV_ERR_INVALID_PARAM_STRUCT 497 * NV_ERR_INVALID_ARGUMENT 498 */ 499 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_ENABLE (0x730273U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS_MESSAGE_ID" */ 500 501 #define NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS_MESSAGE_ID (0x73U) 502 503 typedef struct NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS { 504 NvU8 subDeviceInstance; 505 NvU32 displayId; 506 NvU8 enable; 507 } NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS; 508 509 #define NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_FALSE (0x00000000U) 510 #define NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_TRUE (0x00000001U) 511 512 /* 513 * NV0073_CTRL_CMD_SPECIFIC_CTRL_HDMI 514 * 515 * This command can be used to enable HDMI communication on the associated GPU. 516 * This should be called prior to every modeset in which the displayId is capable of HDMI. 517 * subDeviceInstance 518 * This parameter specifies the subdevice instance within the 519 * NV04_DISPLAY_COMMON parent device to which operation should be directed. 520 * This parameter must specify a value between zero and the total number 521 * of subdevices within the parent device. This parameter should be set 522 * to zero for default behavior. 523 * displayId 524 * This parameter specifies the displayId of HDMI resource to configure. 525 * This comes as input to this command. 526 * enable 527 * This field specifies the legal values: 528 * NV0073_CTRL_SPECIFIC_CTRL_HDMI_DISABLE 529 * NV0073_CTRL_SPECIFIC_CTRL_HDMI_ENABLE 530 * 531 * Possible status values returned are: 532 * NV_OK 533 * NV_ERR_INVALID_PARAM_STRUCT 534 * NV_ERR_INVALID_ARGUMENT 535 */ 536 #define NV0073_CTRL_CMD_SPECIFIC_CTRL_HDMI (0x730274U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS_MESSAGE_ID" */ 537 538 #define NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS_MESSAGE_ID (0x74U) 539 540 typedef struct NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS { 541 NvU8 subDeviceInstance; 542 NvU32 displayId; 543 NvBool bEnable; 544 } NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS; 545 546 #define NV0073_CTRL_SPECIFIC_CTRL_HDMI_DISABLE (0x00000000U) 547 #define NV0073_CTRL_SPECIFIC_CTRL_HDMI_ENABLE (0x00000001U) 548 549 /* 550 * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM 551 * 552 * This command is used to signal the resource manager that the audio stream 553 * is to be mute off or on. 554 * subDeviceInstance 555 * This parameter specifies the subdevice instance within the 556 * NV04_DISPLAY_COMMON parent device to which operation should be directed. 557 * This parameter must specify a value between zero and the total number 558 * of subdevices within the parent device. This parameter should be set 559 * to zero for default behavior. 560 * displayId 561 * This parameter specifies the displayId of HDMI resource to configure. 562 * This comes as input to this command. 563 * mute 564 * This field specifies the legal values: 565 * NV0073_CTRL_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_TRUE 566 * NV0073_CTRL_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_FALSE 567 * 568 * Possible status values returned are: 569 * NV_OK 570 * NV_ERR_INVALID_PARAM_STRUCT 571 * NV_ERR_INVALID_ARGUMENT 572 * NV_ERR_NOT_SUPPORTED 573 */ 574 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM (0x730275U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_PARAMS_MESSAGE_ID" */ 575 576 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_PARAMS_MESSAGE_ID (0x75U) 577 578 typedef struct NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_PARAMS { 579 NvU8 subDeviceInstance; 580 NvU32 displayId; 581 NvU8 mute; 582 } NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_PARAMS; 583 584 #define NV0073_CTRL_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_FALSE (0x00000000U) 585 #define NV0073_CTRL_SPECIFIC_SET_HDMI_AUDIO_MUTESTREAM_TRUE (0x00000001U) 586 587 588 589 /* 590 * NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING 591 * 592 * This structure defines the mapping between the ACPI ID and the corresponding 593 * display ID of a display device 594 * 595 * subDeviceInstance 596 * This parameter specifies the subdevice instance within the 597 * NV04_DISPLAY_COMMON parent device to which the operation should be 598 * directed. This parameter must specify a value between zero and the 599 * total number of subdevices within the parent device. This parameter 600 * should be set to zero for default behavior. 601 * acpiId 602 * The ACPI ID of the display device 603 * displayId 604 * The corresponding display ID 605 * dodIndex 606 * The corresponding DOD index 607 */ 608 typedef struct NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING { 609 NvU32 subDeviceInstance; 610 NvU32 acpiId; 611 NvU32 displayId; 612 NvU32 dodIndex; 613 } NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING; 614 615 /* 616 * NV0073_CTRL_CMD_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT 617 * 618 * This call will return the Display Port Attachment value 619 * per displayID as defined by Nvidia that is directly 620 * associated with the ACPI 3.0 _DOD entry's Display Port 621 * Attachment field. This should help clients map the 622 * _DOD ACPI ID to each displayID. Note, that some systems 623 * do not have a standard in place for this field. On those 624 * systems, the RM will return NV_ERR_NOT_SUPPORTED. 625 * 626 * Note that this "Display Port" attachment field has nothing 627 * to do with DisplayPort/DP. It's an unfortunate name inside 628 * the ACPI 3.0 spec that coincides with the name of DisplayPort. 629 * 630 * 631 * Possible status values returned are: 632 * NV_OK 633 * NV_ERR_INVALID_PARAM_STRUCT 634 * NV_ERR_NOT_SUPPORTED 635 * 636 */ 637 638 #define NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS_MESSAGE_ID (0x85U) 639 640 typedef struct NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS { 641 NvU32 subDeviceInstance; 642 NvU32 displayId; 643 NvU32 dispPortAttachment; 644 } NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS; 645 646 647 #define NV0073_CTRL_CMD_SPECIFIC_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT (0x730285U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS_MESSAGE_ID" */ 648 649 // defines for dispPortAttachment 650 #define NV0073_DISPLAY_PORT_ATTACHMENT_ANALOG (0x00000000U) 651 #define NV0073_DISPLAY_PORT_ATTACHMENT_LVDS (0x00000001U) 652 #define NV0073_DISPLAY_PORT_ATTACHMENT_DP_A (0x00000002U) 653 #define NV0073_DISPLAY_PORT_ATTACHMENT_DP_B (0x00000003U) 654 #define NV0073_DISPLAY_PORT_ATTACHMENT_DP_C (0x00000004U) 655 #define NV0073_DISPLAY_PORT_ATTACHMENT_DP_D (0x00000005U) 656 #define NV0073_DISPLAY_PORT_ATTACHMENT_UNKNOWN (0xFFFFFFFFU) 657 658 /* 659 * NV0073_CTRL_CMD_SPECIFIC_SET_ACPI_ID_MAPPING 660 * 661 * This call will update the RM data structure which holds the 662 * ACPI ID to display ID mapping of the display devices 663 * 664 * The input parameter is an array of structures of type 665 * NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING 666 * 667 * If some of the array elements remain unused, the acpiId field of the 668 * structure must be set to 0x0000 669 * 670 * The size of the array is given by 671 * NV0073_CTRL_SPECIFIC_MAX_ACPI_DEVICES (defined below) 672 * 673 * Possible status values returned are: 674 * NV_OK 675 * NV_ERR_INVALID_PARAM_STRUCT 676 * 677 */ 678 #define NV0073_CTRL_CMD_SPECIFIC_SET_ACPI_ID_MAPPING (0x730284U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS_MESSAGE_ID" */ 679 680 #define NV0073_CTRL_SPECIFIC_MAX_ACPI_DEVICES 16U 681 682 #define NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS_MESSAGE_ID (0x84U) 683 684 typedef struct NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS { 685 NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING mapTable[NV0073_CTRL_SPECIFIC_MAX_ACPI_DEVICES]; 686 } NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS; 687 688 /* 689 * NV0073_CTRL_CMD_SPECIFIC_GET_ALL_HEAD_MASK 690 * 691 * This call will return all head mask. 692 * 693 * subDeviceInstance 694 * This parameter specifies the subdevice instance within the 695 * NV04_DISPLAY_COMMON parent device to which the operation should be 696 * directed. This parameter must specify a value between zero and the 697 * total number of subdevices within the parent device. This parameter 698 * should be set to zero for default behavior. 699 * headMask 700 * headMask is the mask of all heads that are usable. For example, if 701 * head 0 and head 2 are present, headMask would be NVBIT(0)|NVBIT(2). This 702 * parameter returns to the client. 703 * 704 * Possible status values returned are: 705 * NV_OK 706 * NV_ERR_INVALID_ARGUMENT 707 * 708 */ 709 #define NV0073_CTRL_CMD_SPECIFIC_GET_ALL_HEAD_MASK (0x730287U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS_MESSAGE_ID" */ 710 711 #define NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS_MESSAGE_ID (0x87U) 712 713 typedef struct NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS { 714 NvU32 subDeviceInstance; 715 NvU32 headMask; 716 } NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS; 717 718 /* 719 * NV0073_CTRL_CMD_SPECIFIC_SET_OD_PACKET 720 * 721 * This command is used to program the display output packets. 722 * Currently it supports DP and HDMI. 723 * Common supported packets are AVI infoframes, Audio Infoframes, Gamma 724 * Metadata, Vendor Specific infoframes and General Control Packets (GCP). 725 * + GCP AVMute Enable should be performed before the start of the modeset. 726 * + GCP AVMute Disable should be performed after the end of the modeset. 727 * GCP AVMute should contain HDR + 7 bytes. 728 * + AVI infoframes should occur after the modeset but before a GCP AVMute 729 * Disable. AVI infoframe should contain HDR + 14 bytes 730 * + Audio infoframes should occur after the modeset but before a GCP AVMute 731 * Enable. 732 * Audio infoframe should contain HDR + 11 bytes. 733 * + Gamma Metadata packets should contain HDR + 28 bytes. 734 * + Vendor Specific packets are variable length. 735 * By HDMI 1.4 June 5 2009 spec, payload can be 5 bytes, 6 bytes, 7 bytes or 736 * 16 bytes, depending on the packets spec. 737 * Unused data bytes should be zero-ed out. 738 * 739 * displayID 740 * This parameter specifies the displayID for the display resource to 741 * configure. 742 * This comes as input to this command. 743 * subDeviceInstance 744 * This parameter specifies the subdevice instance within the 745 * NV04_DISPLAY_COMMON parent device to which the operation should be 746 * directed. 747 * This parameter must specify a value between zero and the total number 748 * of subdevices within the parent device. This parameter should be set 749 * to zero for default behavior. 750 * transmitControl 751 * This parameter controls how the packet is to be sent by setting the 752 * control bits. 753 * Possible flags are as follows: 754 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE 755 * Set to _ENABLE to start sending the packet at next frame, set to 756 * _DISABLE to stop sending. 757 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME 758 * Set to _ENABLE to send the packet at other frame, set to _DISABLE to 759 * send at every frame. 760 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME 761 * Set to _ENABLE to send once next frame, set to _DISABLE to send at 762 * every frame. 763 * Note: A setting to set both _OTHER_FRAME and _SINGLE_FRAME is invalid 764 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK 765 * Set to _ENABLE to send the packet once on next HBLANK, set to 766 * _DISABLE to send on VBLANK. 767 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE 768 * Set to _ENABLE to send the info frame packet as soon as possible. 769 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT 770 * Set to _SW_CONTROLLED to set HDMI_Video_Format field and 3D_Structure field 771 * from NV_PDISP_SF_HDMI_VSI_SUBPACK0_HIGH_PB4 and PB5, if it is set to _HW_CONTROLLED 772 * then HW will get them based on the state of the setHdmiCtrl method. 773 * Btw this applies only for stereo ovverides. 774 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY 775 * Set to TRUE to send Vendor specific info frame used for 3D stereo LR sync. 776 * Set PACKET_TYPE=pktType_VendorSpecInfoFrame along with this flag. 777 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING 778 * Set to TRUE to send Vendor specific info frame used for Self Refresh panels 779 * Set PACKET_TYPE=pktType_VendorSpecInfoFrame along with this flag. 780 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE 781 * HW provides support to program 2 generic infoframes per frame for DP with GP10X+. 782 * This flag indicates the INFOFRAME that needs to be programmed. 783 * Set to _INFOFRAME0 if RM should program GENERIC_INFOFRAME 784 * Set to _INFOFRAME1 if RM should program GENERIC_INFOFRAME1 785 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE 786 * This option is reserved for backward compatibility with 787 * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_PACKET and 788 * NV0073_CTRL_CMD_DP_SET_PACKET. 789 * It is temporal and will be deprecated soon. 790 * packetSize 791 * packet size of packets in pPacket to send, including header and payload. 792 * targetHead 793 * Specifies the target head number for which SDP needs to be updated. 794 * bUsePsrHeadforSdp 795 * Indicates use targetHead field for setting SDP or infoframe packet instead 796 * of deriving the active head from displayID. 797 * pPacket 798 * pPacket points to the packets to send. 799 * For HDMI 1.1, the maximum allowed bytes is 31. 800 * The packet array includes the 3 bytes of header + data depending on 801 * the type of packet. For an infoframe, the header bytes refer to type, 802 * version and length respectively. This comes as input to this command. 803 * 804 * Possible status values returned are: 805 * NV_OK 806 * NV_ERR_INVALID_PARAM_STRUCT 807 * NV_ERR_INVALID_ARGUMENT 808 */ 809 #define NV0073_CTRL_CMD_SPECIFIC_SET_OD_PACKET (0x730288U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS_MESSAGE_ID" */ 810 811 #define NV0073_CTRL_SET_OD_MAX_PACKET_SIZE 36U 812 813 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS_MESSAGE_ID (0x88U) 814 815 typedef struct NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS { 816 NvU32 subDeviceInstance; 817 NvU32 displayId; 818 NvU32 transmitControl; 819 NvU32 packetSize; 820 NvU32 targetHead; 821 NvBool bUsePsrHeadforSdp; 822 NvU8 aPacket[NV0073_CTRL_SET_OD_MAX_PACKET_SIZE]; 823 } NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS; 824 825 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE 0:0 826 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_NO (0x0000000U) 827 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_YES (0x0000001U) 828 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME 1:1 829 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_DISABLE (0x0000000U) 830 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_ENABLE (0x0000001U) 831 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME 2:2 832 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_DISABLE (0x0000000U) 833 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_ENABLE (0x0000001U) 834 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK 3:3 835 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_DISABLE (0x0000000U) 836 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_ENABLE (0x0000001U) 837 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE 4:4 838 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE_DISABLE (0x0000000U) 839 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE_ENABLE (0x0000001U) 840 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT 5:5 841 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT_SW_CONTROLLED (0x0000000U) 842 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT_HW_CONTROLLED (0x0000001U) 843 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY 6:6 844 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY_FALSE (0x0000000U) 845 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY_TRUE (0x0000001U) 846 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING 7:7 847 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_FALSE (0x0000000U) 848 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_TRUE (0x0000001U) 849 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE 9:8 850 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE_INFOFRAME0 (0x0000000U) 851 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE_INFOFRAME1 (0x0000001U) 852 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE 31:31 853 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_NO (0x0000000U) 854 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_YES (0x0000001U) 855 856 857 /* 858 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS 859 * 860 * This command is used to enable/disable sending of display output packets. 861 * Currently it supports HDMI only. 862 * Unused data bytes should be zero-ed out. 863 * 864 * displayID 865 * This parameter specifies the displayID for the display output resource to 866 * configure. 867 * This comes as input to this command. 868 * subDeviceInstance 869 * This parameter specifies the subdevice instance within the 870 * NV04_DISPLAY_COMMON parent device to which the operation should be directed. 871 * This parameter must specify a value between zero and the total number 872 * of subdevices within the parent device. This parameter should be set 873 * to zero for default behavior. 874 * type 875 * The client shall specify the type of display output packet. For HDMI, set 876 * this according to HDMI specification 1.4. 877 * This comes as input to this command. 878 * transmitControl 879 * This parameter controls how the packet is to be sent by setting the control 880 * bits. 881 * Possible flags are as follows: 882 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE 883 * Set to _ENABLE to start sending the packet at next frame, set to 884 * _DISABLE to stop sending. 885 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME 886 * Set to _ENABLE to send the packet at other frame, set to _DISABLE to 887 * send at every frame. 888 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME 889 * Set to _ENABLE to send once next frame, set to _DISABLE to send at 890 * every frame. 891 * Note: A setting to set both _OTHER_FRAME and _SINGLE_FRAME is invalid 892 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK 893 * Set to _ENABLE to send the packet once on next HBLANK, set to _DISABLE 894 * to send on VBLANK. 895 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_VIDEO_FMT 896 * Set to _SW_CONTROLLED to set HDMI_Video_Format field and 3D_Structure field 897 * from NV_PDISP_SF_HDMI_VSI_SUBPACK0_HIGH_PB4 and PB5, if it is set to _HW_CONTROLLED 898 * then HW will get them based on the state of the setHdmiCtrl method. 899 * Btw this applies only for stereo ovverides. 900 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_STEREO_POLARITY 901 * Set to TRUE to enable Vendor specific info frame used for 3D stereo LR sync 902 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING 903 * Set to TRUE to enable Vendor specific info frame used for Self Refresh panels 904 * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE 905 * This option is reserved for backward compatibility with 906 * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_PACKET and 907 * NV0073_CTRL_CMD_DP_SET_PACKET. 908 * It is temporal and will be deprecated soon. 909 * 910 * Possible status values returned are: 911 * NV_OK 912 * NV_ERR_INVALID_PARAM_STRUCT 913 * NV_ERR_INVALID_ARGUMENT 914 */ 915 #define NV0073_CTRL_CMD_SPECIFIC_SET_OD_PACKET_CTRL (0x730289U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS_MESSAGE_ID" */ 916 917 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS_MESSAGE_ID (0x89U) 918 919 typedef struct NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS { 920 NvU32 subDeviceInstance; 921 NvU32 displayId; 922 NvU32 type; 923 NvU32 transmitControl; 924 } NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS; 925 926 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE 927 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE_NO NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_NO 928 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE_YES NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_YES 929 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME 930 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME_DISABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_DISABLE 931 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_ENABLE 932 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME 933 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME_DISABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_DISABLE 934 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_ENABLE 935 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK 936 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK_DISABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_DISABLE 937 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_ENABLE 938 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_VIDEO_FMT NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT 939 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_VIDEO_FMT_SW_CONTROLLED NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT_SW_CONTROLLED 940 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_VIDEO_FMT_HW_CONTROLLED NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT_HW_CONTROLLED 941 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_STEREO_POLARITY NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY 942 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_STEREO_POLARITY_FALSE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY_FALSE 943 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_STEREO_POLARITY_TRUE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY_TRUE 944 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING 945 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_TRUE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_FALSE 946 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_FALSE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_TRUE 947 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE 948 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_NO NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_NO 949 #define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_YES NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_YES 950 951 /* 952 * NV0073_CTRL_CMD_SPECIFIC_GET_PCLK_LIMIT 953 * 954 * This command returns the maximum supported pixel clock rate that is 955 * supported by the specified display device. 956 * 957 * subDeviceInstance 958 * This parameter specifies the subdevice instance within the 959 * NV04_DISPLAY_COMMON parent device to which the operation should be 960 * directed. This parameter must specify a value between zero and the 961 * total number of subdevices within the parent device. This parameter 962 * should be set to zero for default behavior. 963 * displayId 964 * This parameter specifies the display for which information is to be 965 * returned. Only one display may be indicated in this parameter. 966 * If more than one displayId is used a failing status of 967 * NV_ERR_INVALID_ARGUMENT will be returned. 968 * pclkLimit 969 * This parameter returns the min of orPclkLimit and vbPclkLimit in KHz. 970 * It may be used for SLI configs that use a video bridge. For non-SLI 971 * configs and bridgeless SLI configs, the client should use orPclkLimit instead. 972 * orPclkLimit 973 * This parameter returns the maximum pixel clock frequency of OR in KHz. 974 * vbPclkLimit 975 * This parameter returns the maximum pixel clock frequency of the 976 * video bridge (SLI) in KHz (or zero if there is no video bridge). 977 * 978 * Possible status values returned are: 979 * NV_OK 980 * NV_ERR_INVALID_PARAM_STRUCT 981 * NV_ERR_INVALID_ARGUMENT 982 */ 983 #define NV0073_CTRL_CMD_SPECIFIC_GET_PCLK_LIMIT (0x73028aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS_MESSAGE_ID" */ 984 985 #define NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS_MESSAGE_ID (0x8AU) 986 987 typedef struct NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS { 988 NvU32 subDeviceInstance; 989 NvU32 displayId; 990 NvU32 pclkLimit; 991 NvU32 orPclkLimit; 992 NvU32 vbPclkLimit; 993 } NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS; 994 995 /* 996 * NV0073_CTRL_CMD_SPECIFIC_OR_GET_INFO 997 * 998 * This command returns output resource information for the specified display 999 * device. 1000 * 1001 * subDeviceInstance 1002 * This parameter specifies the subdevice instance within the 1003 * NV04_DISPLAY_COMMON parent device to which the operation should be 1004 * directed. This parameter must specify a value between zero and the 1005 * total number of subdevices within the parent device. This parameter 1006 * should be set to zero for default behavior. 1007 * displayId 1008 * This parameter specifies the display for which information is to be 1009 * returned. Only one display may be indicated in this parameter. 1010 * If more than one displayId is used a failing status of 1011 * NV_ERR_INVALID_ARGUMENT will be returned. 1012 * type 1013 * This parameter returns the output resource type. Legal values for 1014 * this parameter include: 1015 * NV0073_CTRL_SPECIFIC_OR_TYPE_DAC 1016 * The output resource is a DAC. 1017 * NV0073_CTRL_SPECIFIC_OR_TYPE_SOR 1018 * The output resource is a serial output resource. 1019 * NV0073_CTRL_SPECIFIC_OR_TYPE_DSI 1020 * The output resource is a Display Serial Interface output resource. 1021 * NV0073_CTRL_SPECIFIC_OR_TYPE_PIOR 1022 * The output resource is a parallel input output resource. 1023 * index 1024 * This parameter returns the type-specific index of the output 1025 * resource associated with the specified displayId. 1026 * protocol 1027 * This parameter returns the type-specific protocol used by the 1028 * output resource. Legal values for this parameter include: 1029 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DAC_RGB_CRT 1030 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_LVDS_CUSTOM 1031 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_A 1032 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_B 1033 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DUAL_TMDS 1034 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_A 1035 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_B 1036 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_PIOR_EXT_TMDS_ENC 1037 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DSI 1038 * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_UNKNOWN 1039 * ditherType 1040 * This parameter returns the dither type for the output resource. 1041 * Legal values for this parameter include: 1042 * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_6_BITS 1043 * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_8_BITS 1044 * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_10_BITS 1045 * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_OFF 1046 * ditherAlgo 1047 * This parameter returns the dithering algorithm used by the output 1048 * resource. Legal values for this parameter include: 1049 * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_DYNAMIC_ERR_ACC 1050 * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_STATIC_ERR_ACC 1051 * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_DYNAMIC_2X2 1052 * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_STATIC_2X2 1053 * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_TEMPORAL 1054 * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_UNKNOWN 1055 * location 1056 * This parameter returns the physical location of the output resource. 1057 * Legal values for this parameter include: 1058 * NV0073_CTRL_SPECIFIC_OR_LOCATION_CHIP 1059 * NV0073_CTRL_SPECIFIC_OR_LOCATION_BOARD 1060 * rootPortId 1061 * This parameter specifies the Root-Port ID for the given display. 1062 * dcbIndex 1063 * This parameter returns the DCB index of the display device. 1064 * vbiosAddress 1065 * This parameter is the VBIOS IP address which will have valid value 1066 * only if displayId is allocated by VBIOS. 1067 * bIsLitByVbios 1068 * This parameter specifies that whether displayID allocation was 1069 * requested by VBIOS or not. 1070 * bIsDispDynamic 1071 * Returns NV_TRUE if DisplayID is allocated Dynamically else NV_FALSE 1072 * 1073 * Possible status values returned are: 1074 * NV_OK 1075 * NV_ERR_INVALID_PARAM_STRUCT 1076 * NV_ERR_INVALID_ARGUMENT 1077 */ 1078 #define NV0073_CTRL_CMD_SPECIFIC_OR_GET_INFO (0x73028bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS_MESSAGE_ID" */ 1079 1080 #define NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS_MESSAGE_ID (0x8BU) 1081 1082 typedef struct NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS { 1083 NvU32 subDeviceInstance; 1084 NvU32 displayId; 1085 NvU32 index; 1086 NvU32 type; 1087 NvU32 protocol; 1088 NvU32 ditherType; 1089 NvU32 ditherAlgo; 1090 NvU32 location; 1091 NvU32 rootPortId; 1092 NvU32 dcbIndex; 1093 NV_DECLARE_ALIGNED(NvU64 vbiosAddress, 8); 1094 NvBool bIsLitByVbios; 1095 NvBool bIsDispDynamic; 1096 } NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS; 1097 1098 /* valid type values */ 1099 #define NV0073_CTRL_SPECIFIC_OR_TYPE_NONE (0x00000000U) 1100 #define NV0073_CTRL_SPECIFIC_OR_TYPE_DAC (0x00000001U) 1101 #define NV0073_CTRL_SPECIFIC_OR_TYPE_SOR (0x00000002U) 1102 #define NV0073_CTRL_SPECIFIC_OR_TYPE_PIOR (0x00000003U) 1103 1104 1105 #define NV0073_CTRL_SPECIFIC_OR_TYPE_DSI (0x00000005U) 1106 1107 /* valid DAC protocol values */ 1108 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DAC_RGB_CRT (0x00000000U) 1109 1110 1111 1112 /* valid SOR protocol values */ 1113 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_LVDS_CUSTOM (0x00000000U) 1114 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_A (0x00000001U) 1115 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_B (0x00000002U) 1116 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DUAL_TMDS (0x00000005U) 1117 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_A (0x00000008U) 1118 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_B (0x00000009U) 1119 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DSI (0x00000010U) 1120 1121 /* valid DSI protocol values */ 1122 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DSI (0x00000011U) 1123 1124 /* valid PIOR protocol values */ 1125 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_PIOR_EXT_TMDS_ENC (0x00000000U) 1126 1127 /* valid UNKNOWN protocol value */ 1128 #define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_UNKNOWN (0xFFFFFFFFU) 1129 1130 /* valid ditherType values */ 1131 #define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_6_BITS (0x00000000U) 1132 #define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_8_BITS (0x00000001U) 1133 #define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_10_BITS (0x00000002U) 1134 #define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_OFF (0x00000003U) 1135 1136 /* valid ditherAlgo values */ 1137 #define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_DYNAMIC_ERR_ACC (0x00000000U) 1138 #define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_STATIC_ERR_ACC (0x00000001U) 1139 #define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_DYNAMIC_2X2 (0x00000002U) 1140 #define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_STATIC_2X2 (0x00000003U) 1141 #define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_TEMPORAL (0x00000004U) 1142 #define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_UNKNOWN (0xFFFFFFFFU) 1143 1144 /* valid location values */ 1145 #define NV0073_CTRL_SPECIFIC_OR_LOCATION_CHIP (0x00000000U) 1146 #define NV0073_CTRL_SPECIFIC_OR_LOCATION_BOARD (0x00000001U) 1147 1148 1149 1150 /* 1151 * NV0073_CTRL_CMD_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS 1152 * NV0073_CTRL_CMD_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS 1153 * 1154 * These commands retrieve and set the user backlight brightness for 1155 * the specified display. 1156 * 1157 * subDeviceInstance 1158 * This parameter specifies the subdevice instance within the 1159 * NV04_DISPLAY_COMMON parent device to which the operation should be 1160 * directed. 1161 * displayId 1162 * Display for which brightness is to be retrieved or set. 1163 * brightness 1164 * The backlight brightness in the range [0,100], inclusive. This 1165 * is an input for SET_BACKLIGHT_BRIGHTNESS, and an output for 1166 * GET_BACKLIGHT_BRIGHTNESS. 1167 * brightnessType 1168 * This can take in one of the three parameters: 1169 * NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_TYPE_PERCENT100(for percentage brightness with value calibrated to 100 scale), 1170 * NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_TYPE_PERCENT1000(for percentage brightness with uncalibrated values), 1171 * NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_TYPE_NITS(used when panel supports Nits based) 1172 * based on the brightness control method to be used. 1173 * 1174 * Possible status values returned include: 1175 * NV_OK 1176 * NV_ERR_NOT_SUPPORTED 1177 */ 1178 #define NV0073_CTRL_CMD_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS (0x730291U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS_PARAMS_MESSAGE_ID" */ 1179 1180 #define NV0073_CTRL_BACKLIGHT_BRIGHTNESS_MIN_VALUE 0U 1181 #define NV0073_CTRL_BACKLIGHT_BRIGHTNESS_MAX_VALUE 100U 1182 1183 typedef struct NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS { 1184 NvU32 subDeviceInstance; 1185 NvU32 displayId; 1186 NvU32 brightness; 1187 NvBool bUncalibrated; 1188 NvU8 brightnessType; 1189 } NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS; 1190 #define NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_TYPE_PERCENT100 1 1191 #define NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_TYPE_PERCENT1000 2 1192 #define NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_TYPE_NITS 3 1193 1194 #define NV0073_CTRL_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS_PARAMS_MESSAGE_ID (0x91U) 1195 1196 typedef NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS NV0073_CTRL_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS_PARAMS; 1197 1198 #define NV0073_CTRL_CMD_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS (0x730292U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS_PARAMS_MESSAGE_ID" */ 1199 1200 #define NV0073_CTRL_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS_PARAMS_MESSAGE_ID (0x92U) 1201 1202 typedef NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS NV0073_CTRL_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS_PARAMS; 1203 1204 /* 1205 * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS 1206 * 1207 * This command is used to inform RM about the scrambling, clock mode, FRL and 1208 * DSC caps of the HDMI sink device. 1209 * 1210 * subDeviceInstance 1211 * This parameter specifies the subdevice instance within the 1212 * NV04_DISPLAY_COMMON parent device to which the operation should be 1213 * directed.. 1214 * displayID 1215 * This parameter specifies the displayID for the display output resource to 1216 * configure. 1217 * caps 1218 * This parameter specifies the sink caps. 1219 * GT_340MHZ_CLOCK_SUPPORTED refers to whether sink supports TMDS clock (sorClk) rate greater than 340 MHz 1220 * LTE_340MHZ_SCRAMBLING_SUPPORTED refers to whether scrambling is supported for clock rate at or below 340 MHz 1221 * SCDC_SUPPORTED refers to whether SCDC access is supported on sink 1222 * MAX_FRL_RATE_SUPPORTED refers to the maximum HDMI 2.1 FRL rate supported 1223 * DSC_12_SUPPORTED refers to whether VESA DSC v1.2a is supported 1224 * DSC_12_MAX_FRL_RATE_SUPPORTED refers to the maximum HDMI 2.1 FRL rate supported when VESA DSC v1.2a is supported 1225 * 1226 * 1227 * Possible status values returned include: 1228 * NV_OK 1229 * NV_ERR_NOT_SUPPORTED 1230 */ 1231 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS (0x730293U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS_MESSAGE_ID" */ 1232 1233 #define NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS_MESSAGE_ID (0x93U) 1234 1235 typedef struct NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS { 1236 NvU32 subDeviceInstance; 1237 NvU32 displayId; 1238 NvU32 caps; 1239 } NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS; 1240 1241 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_GT_340MHZ_CLOCK_SUPPORTED 0:0 1242 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_GT_340MHZ_CLOCK_SUPPORTED_FALSE (0x00000000U) 1243 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_GT_340MHZ_CLOCK_SUPPORTED_TRUE (0x00000001U) 1244 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_LTE_340MHZ_SCRAMBLING_SUPPORTED 1:1 1245 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_LTE_340MHZ_SCRAMBLING_SUPPORTED_FALSE (0x00000000U) 1246 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_LTE_340MHZ_SCRAMBLING_SUPPORTED_TRUE (0x00000001U) 1247 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_SCDC_SUPPORTED 2:2 1248 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_SCDC_SUPPORTED_FALSE (0x00000000U) 1249 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_SCDC_SUPPORTED_TRUE (0x00000001U) 1250 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED 5:3 1251 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_NONE (0x00000000U) 1252 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_3LANES_3G (0x00000001U) 1253 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_3LANES_6G (0x00000002U) 1254 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_6G (0x00000003U) 1255 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_8G (0x00000004U) 1256 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_10G (0x00000005U) 1257 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_12G (0x00000006U) 1258 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_12_SUPPORTED 6:6 1259 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_12_SUPPORTED_FALSE (0x00000000U) 1260 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_12_SUPPORTED_TRUE (0x00000001U) 1261 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED 9:7 1262 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_NONE (0x00000000U) 1263 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_3LANES_3G (0x00000001U) 1264 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_3LANES_6G (0x00000002U) 1265 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_6G (0x00000003U) 1266 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_8G (0x00000004U) 1267 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_10G (0x00000005U) 1268 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_12G (0x00000006U) 1269 1270 1271 1272 /* 1273 * NV0073_CTRL_CMD_SPECIFIC_SET_MONITOR_POWER 1274 * 1275 * This command sets monitor power on/off. 1276 * subDeviceInstance 1277 * This parameter specifies the subdevice instance within the 1278 * NV04_DISPLAY_COMMON parent device to which the operation should be 1279 * directed. 1280 * displayId 1281 * This parameter specifies the displayID for the display output resource to 1282 * configure. 1283 * powerState 1284 * This parameter should be one of the valid 1285 * NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_* values. 1286 * headIdx 1287 * The head id on which power operation needs to be done. 1288 * bForceMonitorState 1289 * Monitor power state that client wants to force in RM. 1290 * 1291 * Possible status values returned are: 1292 * NV_OK 1293 * NV_ERR_INVALID_PARAM_STRUCT 1294 * NV_ERR_INVALID_ARGUMENT 1295 */ 1296 #define NV0073_CTRL_CMD_SPECIFIC_SET_MONITOR_POWER (0x730295U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS_MESSAGE_ID" */ 1297 1298 #define NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS_MESSAGE_ID (0x95U) 1299 1300 typedef struct NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS { 1301 NvU32 subDeviceInstance; 1302 NvU32 displayId; 1303 NvU32 powerState; 1304 NvU32 headIdx; 1305 NvBool bForceMonitorState; 1306 } NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS; 1307 1308 #define NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_OFF (0x00000000U) 1309 #define NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_ON (0x00000001U) 1310 1311 1312 1313 /* 1314 * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_FRL_CONFIG 1315 * 1316 * This command is used to perform HDMI FRL link training and enable FRL mode for 1317 * the specified displayId. The link configuration will be returned after link 1318 * training success. 1319 * 1320 * subDeviceInstance 1321 * This parameter specifies the subdevice instance within the 1322 * NV04_DISPLAY_COMMON parent device to which the operation should be 1323 * directed. 1324 * displayID 1325 * This parameter specifies the displayID for the display output resource to 1326 * configure. 1327 * data 1328 * This parameter is an input and output to this command. 1329 * Here are the current defined fields: 1330 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE 1331 * This field specifies the desired setting for lane count. A client may 1332 * choose any lane count as long as it does not exceed the capability of 1333 * HDMI FRL sink as indicated in the sink capability field. 1334 * The valid values for this field are: 1335 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_NONE 1336 * For 0 lane configuration, link training is shut down (disable FRL). 1337 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_3G 1338 * For FRL 3-lane configuration and 3 Gbps bandwidth per lane. 1339 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_6G 1340 * For FRL 3-lane configuration and 6 Gbps bandwidth per lane. 1341 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_6G 1342 * For FRL 4-lane configuration and 6 Gbps bandwidth per lane. 1343 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_8G 1344 * For FRL 4-lane configuration and 8 Gbps bandwidth per lane. 1345 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_10G 1346 * For FRL 4-lane configuration and 10 Gbps bandwidth per lane. 1347 * NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_12G 1348 * For FRL 4-lane configuration and 12 Gbps bandwidth per lane. 1349 * On return, the link bandwidth setting is returned which may be 1350 * different from the requested input setting. 1351 * bFakeLt 1352 * This flag as input to this command. 1353 * It indicates the FRL link training is a fake link training or not. 1354 * TRUE if the FRL link training is fake and no real sink device attached. 1355 * bLtSkipped 1356 * The flag returned indicating whether link training is skipped or not. 1357 * TRUE if link training is skipped due to the link config is not changed. 1358 * 1359 * Possible status values returned include: 1360 * NV_OK - 1361 * Affter finishing link tranning, NV_OK status will be returned along with 1362 * the updated link congiration. In case of link training failure, FRL_RATE_NONE 1363 * will be returned with NV_OK. 1364 * NV_ERR_NOT_SUPPORTED - 1365 * If the GPU/sink is not capable for HDMI FRL, NV_ERR_NOT_SUPPORTED status 1366 * will be returned. 1367 * NV_ERR_INVALID_ARGUMENT 1368 * If any argument is valid for this control call, NV_ERR_INVALID_ARGUMENT 1369 * status will be returned. 1370 */ 1371 #define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_FRL_CONFIG (0x73029aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS_MESSAGE_ID" */ 1372 1373 #define NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS_MESSAGE_ID (0x9AU) 1374 1375 typedef struct NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS { 1376 NvU32 subDeviceInstance; 1377 NvU32 displayId; 1378 NvU32 data; 1379 NvBool bFakeLt; 1380 NvBool bLtSkipped; 1381 } NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS; 1382 1383 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE 2:0 1384 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_NONE (0x00000000U) 1385 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_3G (0x00000001U) 1386 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_6G (0x00000002U) 1387 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_6G (0x00000003U) 1388 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_8G (0x00000004U) 1389 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_10G (0x00000005U) 1390 #define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_12G (0x00000006U) 1391 1392 1393 1394 #define NV0073_CTRL_SPECIFIC_MAX_CRC_REGIONS 9U 1395 1396 #define NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS_MESSAGE_ID (0xA0U) 1397 1398 typedef struct NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS { 1399 NvU32 subDeviceInstance; 1400 NvU32 displayId; 1401 NvU32 regionCrcs[NV0073_CTRL_SPECIFIC_MAX_CRC_REGIONS]; 1402 NvU16 reqRegionCrcMask; 1403 } NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS; 1404 1405 /* 1406 * NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS 1407 * 1408 * This command is used to capture the active viewport region CRCs 1409 * 1410 * [in]subDeviceInstance 1411 * This parameter specifies the subdevice instance within the 1412 * NV04_DISPLAY_COMMON parent device to which the operation should be 1413 * directed. This parameter must specify a value between zero and the 1414 * total number of subdevices within the parent device. This parameter 1415 * should be set to zero for default behavior. 1416 * 1417 * [in]displayId 1418 * This parameter specifies the displayId of panel, for which region CRC to be captured 1419 .* 1420 * [out]regionCrcs 1421 * This field holds the region CRC values to be returned after successful completion of the control command. 1422 * 1423 * [in]reqRegionCrcMask 1424 * This parameter specifies BIT mask value of requested CRC regions. 1425 * 1426 * Possible status values returned are: 1427 * NV_OK 1428 * NV_ERR_GENERIC 1429 * NV_ERR_INVALID_ARGUMENT 1430 * 1431 */ 1432 #define NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS (0x7302a0U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS_MESSAGE_ID" */ 1433 1434 /* 1435 * NV0073_CTRL_CMD_SPECIFIC_APPLY_EDID_OVERRIDE_V2 1436 * 1437 * Apply EDID override on specific OD. 1438 * 1439 * subDeviceInstance 1440 * This parameter specifies the subdevice instance within the 1441 * NV04_DISPLAY_COMMON parent device to which the operation should be 1442 * directed. 1443 * displayId (in) 1444 * ID of panel on which the operation is to be performed. 1445 * bufferSize (in) 1446 * Size of the EDID buffer. 1447 * edidBuffer (in/out) 1448 * The buffer which stores the EDID before and after override. 1449 * 1450 * Possible status values returned are: 1451 * NV_OK 1452 * NV_ERR_INVALID_PARAMETER 1453 */ 1454 #define NV0073_CTRL_CMD_SPECIFIC_APPLY_EDID_OVERRIDE_V2 (0x7302a1U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS_MESSAGE_ID" */ 1455 1456 #define NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS_MESSAGE_ID (0xA1U) 1457 1458 typedef struct NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS { 1459 NvU32 subDeviceInstance; 1460 NvU32 displayId; 1461 NvU32 bufferSize; 1462 NvU8 edidBuffer[NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES]; 1463 } NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS; 1464 1465 /* 1466 * NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS 1467 * 1468 * This command is used to get the HDMI FRL caps of GPU side. 1469 * 1470 * subDeviceInstance 1471 * This parameter specifies the subdevice instance within the 1472 * NV04_DISPLAY_COMMON parent device to which the operation should be 1473 * directed. 1474 * caps 1475 * This parameter specifies the GPU caps. 1476 * MAX_FRL_RATE_SUPPORTED refers to the maximum HDMI 2.1 FRL link rate supported 1477 * 1478 * 1479 * Possible status values returned include: 1480 * NV_OK 1481 * NV_ERR_NOT_SUPPORTED 1482 */ 1483 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS (0x7302a2U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS_MESSAGE_ID" */ 1484 1485 #define NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS_MESSAGE_ID (0xA2U) 1486 1487 typedef struct NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS { 1488 NvU32 subDeviceInstance; 1489 NvU32 caps; 1490 } NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS; 1491 1492 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED 2:0 1493 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_NONE (0x00000000U) 1494 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_3LANES_3G (0x00000001U) 1495 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_3LANES_6G (0x00000002U) 1496 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_6G (0x00000003U) 1497 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_8G (0x00000004U) 1498 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_10G (0x00000005U) 1499 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_12G (0x00000006U) 1500 1501 1502 1503 /* 1504 * NV0073_CTRL_CMD_SPECIFIC_DISPLAY_CHANGE 1505 * 1506 * Notifies the system that a display change is about to begin/end. 1507 * Also performs the necessary synchronizations for the same. 1508 * 1509 * The command takes a NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS structure as an 1510 * argument with appropriate subDeviceInstance. 1511 * 1512 * [in]subDeviceInstance 1513 * The sub-device instance 1514 * [in]newDevices 1515 * Bitmask of devices that are planned on being enabled with the 1516 * pending device change. See NV_CFGEX_GET_DEVICES_CONFIGURATION for bit defs. 1517 * [in]properties 1518 * Bitmask of display attributes for new configuration (none used at the moment). 1519 * [in]enable 1520 * Parameter to decide between display change start and end. Can take values 1521 * NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_START or NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_END. 1522 * Possible return values: 1523 * NV_OK 1524 * NV_ERR_INVALID_ARGUMENT 1525 * 1526 */ 1527 1528 #define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS_MESSAGE_ID (0xA4U) 1529 1530 typedef struct NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS { 1531 1532 NvU32 subDeviceInstance; 1533 NvU32 newDevices; 1534 NvU32 properties; 1535 NvU32 enable; 1536 } NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS; 1537 1538 #define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_END (0x00000000U) 1539 #define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_START (0x00000001U) 1540 1541 #define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PROPERTIES_SPANNING (0x00000001U) 1542 1543 #define NV0073_CTRL_CMD_SPECIFIC_DISPLAY_CHANGE (0x7302a4U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS_MESSAGE_ID" */ 1544 1545 1546 1547 /* 1548 * NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA 1549 * 1550 * This command is used to get the HDMI sink status/caps via Status and Control 1551 * Data Channel (SCDC). 1552 * 1553 * subDeviceInstance 1554 * This parameter specifies the subdevice instance within the 1555 * NV04_DISPLAY_COMMON parent device to which the operation should be 1556 * directed. 1557 * displayId 1558 * This parameter specifies the displayId of HDMI sink. 1559 * offset 1560 * This parameter specifies the SCDC offset which the read operation 1561 * should be used. 1562 * data 1563 * This field specifies the return data from sink for reading the specified 1564 * SCDC offset. 1565 * 1566 * 1567 * Possible status values returned include: 1568 * NV_OK 1569 * NV_ERR_NOT_SUPPORTED 1570 */ 1571 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA (0x7302a6U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS_MESSAGE_ID" */ 1572 1573 #define NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS_MESSAGE_ID (0xA6U) 1574 1575 typedef struct NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS { 1576 NvU32 subDeviceInstance; 1577 NvU32 displayId; 1578 NvU8 offset; 1579 NvU8 data; 1580 } NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS; 1581 1582 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET 7:0 1583 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_NONE (0x00000000U) 1584 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SINK_VERSION (0x00000001U) 1585 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SOURCE_VERSION (0x00000002U) 1586 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_UPDATE_FLAGS_0 (0x00000010U) 1587 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_TMDS_CONFIGURATION (0x00000020U) 1588 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SCRAMBLER_STATUS (0x00000021U) 1589 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CONFIGURATION_0 (0x00000030U) 1590 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CONFIGURATION_1 (0x00000031U) 1591 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SOURCE_TEST_CONFIGURATION (0x00000035U) 1592 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_STATUS_FLAGS_0 (0x00000040U) 1593 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_STATUS_FLAGS_1 (0x00000041U) 1594 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_STATUS_FLAGS_2 (0x00000042U) 1595 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_0 (0x00000050U) 1596 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_1 (0x00000051U) 1597 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_2 (0x00000052U) 1598 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_3 (0x00000053U) 1599 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_4 (0x00000054U) 1600 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_5 (0x00000055U) 1601 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_6 (0x00000056U) 1602 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_7 (0x00000057U) 1603 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_8 (0x00000058U) 1604 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_RSED_0 (0x00000059U) 1605 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_RSED_1 (0x0000005AU) 1606 1607 /* 1608 * NV0073_CTRL_CMD_SPECIFIC_IS_DIRECTMODE_DISPLAY 1609 * 1610 * This command is used to query whether the specified monitor should be used 1611 * with directmode. 1612 * 1613 * [in]manufacturerID 1614 * This parameter specifies the 16-bit EDID Manufacturer ID. 1615 * [in]productID 1616 * This parameter specifies the 16-bit EDID Product ID. 1617 * [out]bIsDirectmode; 1618 * This indicates whether the monitor should be used with directmode. 1619 * Possible return values: 1620 * NV_OK 1621 */ 1622 1623 #define NV0073_CTRL_CMD_SPECIFIC_IS_DIRECTMODE_DISPLAY (0x7302a7U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS_MESSAGE_ID" */ 1624 1625 #define NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS_MESSAGE_ID (0xA7U) 1626 1627 typedef struct NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS { 1628 NvU16 manufacturerID; 1629 NvU16 productID; 1630 NvBool bIsDirectmode; 1631 } NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS; 1632 1633 /* 1634 * NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION 1635 * 1636 * This command is used to get the HDMI FRL capacity computation result. 1637 * 1638 * [in] cmd 1639 * This parameter specifies the command for the HDMI FRL capacity computation. 1640 * [in] input 1641 * This parameter specifies the input data for the HDMI FRL capacity 1642 * computation. 1643 * [out] result 1644 * This indicates the computation result of HDMI FRL capacity computation. 1645 * [in/out] preCalc 1646 * This indicates the pre-caculation result of HDMI FRL capacity computation. 1647 * [in/out] dsc 1648 * This indicates the DSC parameters of HDMI FRL capacity computation. 1649 * Possible return values: 1650 * NV_OK 1651 */ 1652 1653 #define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION (0x7302a8U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS_MESSAGE_ID" */ 1654 1655 typedef struct NV0073_CTRL_FRL_CAPACITY_COMPUTATION_PARAMS { 1656 NvU32 numLanes; 1657 NvU32 frlBitRateGbps; 1658 NvU32 pclk10KHz; 1659 NvU32 hTotal; 1660 NvU32 hActive; 1661 NvU32 bpc; 1662 NvU32 pixelPacking; 1663 NvU32 audioType; 1664 NvU32 numAudioChannels; 1665 NvU32 audioFreqKHz; 1666 1667 struct { 1668 NvU32 bppTargetx16; 1669 NvU32 hSlices; 1670 NvU32 sliceWidth; 1671 NvU32 dscTotalChunkKBytes; 1672 } compressionInfo; 1673 } NV0073_CTRL_FRL_CAPACITY_COMPUTATION_PARAMS; 1674 1675 typedef struct NV0073_CTRL_FRL_CAPACITY_COMPUTATION_RESULT { 1676 NvU32 frlRate; 1677 NvU32 bppTargetx16; 1678 NvBool engageCompression; 1679 NvBool isAudioSupported; 1680 NvBool dataFlowDisparityReqMet; 1681 NvBool dataFlowMeteringReqMet; 1682 NvBool isVideoTransportSupported; 1683 NvU32 triBytesBorrowed; 1684 NvU32 hcActiveBytes; 1685 NvU32 hcActiveTriBytes; 1686 NvU32 hcBlankTriBytes; 1687 NvU32 tBlankToTTotalX1k; 1688 } NV0073_CTRL_FRL_CAPACITY_COMPUTATION_RESULT; 1689 1690 typedef struct NV0073_CTRL_FRL_PRE_CALC_CONFIG { 1691 NvU32 vic; 1692 NvU32 packing; 1693 NvU32 bpc; 1694 NvU32 frlRate; 1695 NvU32 bppX16; 1696 NvBool bHasPreCalcFRLData; 1697 } NV0073_CTRL_FRL_PRE_CALC_CONFIG; 1698 1699 typedef struct NV0073_CTRL_IS_FRL_DSC_POSSIBLE_PARAMS { 1700 NvU32 maxSliceCount; 1701 NvU32 maxSliceWidth; 1702 NvBool bIsDSCPossible; 1703 } NV0073_CTRL_IS_FRL_DSC_POSSIBLE_PARAMS; 1704 1705 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS_MESSAGE_ID (0xA8U) 1706 1707 typedef struct NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS { 1708 NvU8 cmd; 1709 NV0073_CTRL_FRL_CAPACITY_COMPUTATION_PARAMS input; 1710 NV0073_CTRL_FRL_CAPACITY_COMPUTATION_RESULT result; 1711 NV0073_CTRL_FRL_PRE_CALC_CONFIG preCalc; 1712 NV0073_CTRL_IS_FRL_DSC_POSSIBLE_PARAMS dsc; 1713 } NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS; 1714 1715 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_NULL (0x00000000U) 1716 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_UNCOMPRESSED_VIDEO (0x00000001U) 1717 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_COMPRESSED_VIDEO (0x00000002U) 1718 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_HAS_PRECAL_FRL_DATA (0x00000003U) 1719 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_GET_PRECAL_UNCOMPRESSED_FRL_CONFIG (0x00000004U) 1720 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_GET_PRECAL_COMPRESSED_FRL_CONFIG (0x00000005U) 1721 #define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_IS_FRL_DSC_POSSIBLE (0x00000006U) 1722 1723 /* 1724 * NV0073_CTRL_CMD_SPECIFIC_SET_SHARED_GENERIC_PACKET 1725 * 1726 * This command is used to program the display output packets. 1727 * This generic packets can be used for both HDMI and DP. 1728 * HW has added 6 new generic packets for each head because some usecases have 1729 * requirement to send infoframe in particular location (vsync, vblank, loadV). 1730 * 1731 * Note: 1. Client first needs to reserve or acquire a free infoframe index 1732 * using NV0073_CTRL_CMD_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET. 1733 * 2. Client needs to update the SDP index for head through control call 1734 * NV0073_CTRL_CMD_SPECIFIC_SET_SHARED_GENERIC_PACKET 1735 * 3. Client needs to Release the infoframe index using control call 1736 * NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET 1737 * 1738 * [in]subDeviceInstance 1739 * This parameter specifies the subdevice instance within the 1740 * NV04_DISPLAY_COMMON parent device to which the operation should be 1741 * directed. 1742 * This parameter must specify a value between zero and the total number 1743 * of subdevices within the parent device. This parameter should be set 1744 * to zero for default behavior. 1745 * [in]transmitControl 1746 * This parameter controls how the packet is to be sent by setting the 1747 * control bits. 1748 * Possible flags are as follows: 1749 * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE 1750 * Setting this field to _YES will enable this generic infoframe, 1751 * Setting this field to _NO will disable this generic infoframe. 1752 * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE 1753 * Set to _YES will cause new infoframe to be transmitted exactly once. 1754 * Set to _NO will cause new infoframe to be transmitted every frame. 1755 * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC 1756 * SDP can be sent in 3 different locations: 1757 * VBLANK - new infoframe will be sent at Vblank. 1758 * VSYNC - new infoframe will be sent at Vsync. 1759 * LOADV - new infoframe will be triggered by LOADV, and sent at Vsync 1760 * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE 1761 * _ENABLE: override DB1 bit1 with existence of loadv (for Panel Self Refresh) 1762 * _DISABLE: do not override shared generic infoframe subpacker DB1 bit1. 1763 * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE 1764 * _ENABLE: override DB1 bit3 with existence of loadv (for Panel Replay) 1765 * _DISABLE: do not override shared generic infoframe subpacker DB1 bit3. 1766 * [in]packetSize 1767 * size of packets in Packet array to send, including header and payload. 1768 * [in]infoframeIndex 1769 * Specifies the target head number for which SDP needs to be updated. 1770 * [in]infoframeIndex 1771 * Specifies the index of infoframe. 1772 * [in]packet 1773 * pPacket points to the packets to send. 1774 * For HDMI 1.1, the maximum allowed bytes is 31. 1775 * The packet array includes the 3 bytes of header + data depending on 1776 * the type of packet. For an infoframe, the header bytes refer to type, 1777 * version and length respectively. This comes as input to this command. 1778 * 1779 * Possible status values returned are: 1780 * NV_OK 1781 * NV_ERR_INVALID_PARAM_STRUCT 1782 * NV_ERR_INVALID_ARGUMENT 1783 */ 1784 1785 #define NV0073_CTRL_CMD_SPECIFIC_SET_SHARED_GENERIC_PACKET (0x7302a9) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID" */ 1786 1787 #define NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID (0xA9U) 1788 1789 typedef struct NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS { 1790 NvU32 subDeviceInstance; 1791 NvU32 transmitControl; 1792 NvU32 packetSize; 1793 NvU32 targetHeadIndex; 1794 NvU32 infoframeIndex; 1795 NvU8 packet[NV0073_CTRL_SET_OD_MAX_PACKET_SIZE]; 1796 } NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS; 1797 1798 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE 0:0 1799 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE_NO (0x0000000) 1800 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE_YES (0x0000001) 1801 1802 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE 1:1 1803 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE_NO (0x0000000) 1804 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE_YES (0x0000001) 1805 1806 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC 5:2 1807 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC_VBLANK (0x0000000) 1808 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC_VSYNC (0x0000001) 1809 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC_LOADV (0x0000002) 1810 1811 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_STATE_OVERRIDE 6:6 1812 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_STATE_OVERRIDE_DISABLE (0x0000000) 1813 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_STATE_OVERRIDE_ENABLE (0x0000001) 1814 1815 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE 7:7 1816 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE_DISABLE (0x0000000) 1817 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE_ENABLE (0x0000001) 1818 1819 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE 8:8 1820 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE_DISABLE (0x0000000) 1821 #define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE_ENABLE (0x0000001) 1822 1823 /* 1824 * NV0073_CTRL_CMD_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET 1825 * 1826 * This command is used to reserve the infoframe for head and RM would assign 1827 * free infoframe index and return the index of infoframe. Later client needs 1828 * to call control call NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET 1829 * to release the index. 1830 * 1831 * [in]subDeviceInstance 1832 * This parameter specifies the subdevice instance within the 1833 * NV04_DISPLAY_COMMON parent device to which the operation should be 1834 * directed. 1835 * This parameter must specify a value between zero and the total number 1836 * of subdevices within the parent device. This parameter should be set 1837 * to zero for default behavior. 1838 * [in]targetHeadIndex 1839 * target Head for which SDP needs to be sent 1840 * [out]infoframeIndex 1841 * return Infoframe Index for head. 1842 * 1843 * Possible status values returned are: 1844 * NV_OK 1845 * NV_ERR_INVALID_PARAM_STRUCT 1846 * NV_ERR_INVALID_ARGUMENT 1847 * NV_ERR_INSUFFIENT_RESOURCES 1848 */ 1849 1850 #define NV0073_CTRL_CMD_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET (0x7302aa) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID" */ 1851 1852 #define NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID (0xAAU) 1853 1854 typedef struct NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS { 1855 NvU32 subDeviceInstance; 1856 NvU32 targetHeadIndex; 1857 NvU32 infoframeIndex; 1858 } NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS; 1859 1860 /* 1861 * NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET 1862 * 1863 * This command is used to release the infoframe index which was acquired by 1864 * client. 1865 * 1866 * [in]subDeviceInstance 1867 * This parameter specifies the subdevice instance within the 1868 * NV04_DISPLAY_COMMON parent device to which the operation should be 1869 * directed. 1870 * This parameter must specify a value between zero and the total number 1871 * of subdevices within the parent device. This parameter should be set 1872 * to zero for default behavior. 1873 * [in]targetHeadIndex 1874 * Specifies the target head number for which SDP needs to be updated. 1875 * [in]infoframeIndex 1876 * Infoframe index for the target head 1877 * Possible status values returned are: 1878 * NV_OK 1879 * NV_ERR_INVALID_PARAM_STRUCT 1880 * NV_ERR_INVALID_ARGUMENT 1881 */ 1882 1883 #define NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET (0x7302ab) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID" */ 1884 1885 #define NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID (0xABU) 1886 1887 typedef struct NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS { 1888 NvU32 subDeviceInstance; 1889 NvU32 targetHeadIndex; 1890 NvU32 infoframeIndex; 1891 } NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS; 1892 1893 /* 1894 * NV0073_CTRL_CMD_SPECIFIC_DISP_I2C_READ_WRITE 1895 * 1896 * This command is used to do I2C R/W to slave on display i2c instance. 1897 * 1898 * subDeviceInstance 1899 * This parameter specifies the subdevice instance within the 1900 * NV04_DISPLAY_COMMON parent device to which the operation should be 1901 * directed. This parameter must specify a value between zero and the 1902 * total number of subdevices within the parent device. This parameter 1903 * should be set to zero for default behavior. 1904 * i2cPort 1905 * This parameter specifies the I2C CCB port ID. 1906 * i2cSlaveAddress 1907 * This parameter specifies the I2C slave address. 1908 * readWriteFlag 1909 * This parameter specifies whether its read/write operation. 1910 * readWriteLen 1911 * This parameter specifies the length of the read/write buffer 1912 * readBuffer 1913 * This parameter reads the data from slave address and copies to this 1914 * buffer 1915 * writeBuffer 1916 * This parameter specifies this buffer data that would be written to 1917 * slave address 1918 * 1919 * Possible status values returned are: 1920 * NV_OK 1921 * NV_ERR_INVALID_PARAM_STRUCT 1922 * NV_ERR_INVALID_ARGUMENT 1923 */ 1924 1925 #define NV0073_CTRL_CMD_SPECIFIC_DISP_I2C_READ_WRITE (0x7302acU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS_MESSAGE_ID" */ 1926 1927 #define NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_BUF_LEN 128U 1928 1929 #define NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS_MESSAGE_ID (0xACU) 1930 1931 typedef struct NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS { 1932 NvU32 subDeviceInstance; 1933 NvU32 i2cPort; 1934 NvU32 i2cSlaveAddress; 1935 NvU32 readWriteFlag; 1936 NvU32 readWriteLen; 1937 NvU8 readBuffer[NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_BUF_LEN]; 1938 NvU8 writeBuffer[NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_BUF_LEN]; 1939 } NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS; 1940 1941 #define NV0073_CTRL_SPECIFIC_DISP_I2C_READ_MODE (0x00000001) 1942 #define NV0073_CTRL_SPECIFIC_DISP_I2C_WRITE_MODE (0x00000000) 1943 1944 /* 1945 * NV0073_CTRL_CMD_GET_VALID_HEAD_WINDOW_ASSIGNMENT 1946 * 1947 * This command returns the valid window head assignment mask 1948 * 1949 * windowHeadMask [out] 1950 * This out parameter is an array which holds the head mask for 1951 * each window. The Nth element in the array would be a bitmask 1952 * of which heads can possibly drive window N. 1953 * 1954 * Possible status values returned are: 1955 * NV_OK 1956 * NV_ERR_INVALID_ARGUMENT 1957 * NV_ERR_GENERIC 1958 */ 1959 #define NV0073_CTRL_CMD_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT (0x7302ad) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS_MESSAGE_ID" */ 1960 1961 #define NV0073_CTRL_SPECIFIC_MAX_WINDOWS 32U 1962 #define NV0073_CTRL_SPECIFIC_FLEXIBLE_HEAD_WINDOW_ASSIGNMENT (0xFFU) 1963 1964 #define NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS_MESSAGE_ID (0xADU) 1965 1966 typedef struct NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS { 1967 NvU32 subDeviceInstance; 1968 NvU8 windowHeadMask[NV0073_CTRL_SPECIFIC_MAX_WINDOWS]; 1969 } NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS; 1970 1971 /* 1972 * NV0073_CTRL_CMD_SPECIFIC_DEFAULT_ADAPTIVESYNC_DISPLAY 1973 * 1974 * This command is used to query whether the specified monitor should default 1975 * to adaptive sync. 1976 * 1977 * [in]manufacturerID 1978 * This parameter specifies the 16-bit EDID Manufacturer ID. 1979 * [in]productID 1980 * This parameter specifies the 16-bit EDID Product ID. 1981 * [out]bDefaultAdaptivesync; 1982 * This indicates whether the monitor should default to adaptive sync. 1983 * Possible return values: 1984 * NV_OK 1985 */ 1986 1987 #define NV0073_CTRL_CMD_SPECIFIC_DEFAULT_ADAPTIVESYNC_DISPLAY (0x7302aeU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_DEFAULT_ADAPTIVESYNC_DISPLAY_PARAMS_MESSAGE_ID" */ 1988 1989 #define NV0073_CTRL_SPECIFIC_DEFAULT_ADAPTIVESYNC_DISPLAY_PARAMS_MESSAGE_ID (0xAEU) 1990 1991 typedef struct NV0073_CTRL_SPECIFIC_DEFAULT_ADAPTIVESYNC_DISPLAY_PARAMS { 1992 NvU16 manufacturerID; 1993 NvU16 productID; 1994 NvBool bDefaultAdaptivesync; 1995 } NV0073_CTRL_SPECIFIC_DEFAULT_ADAPTIVESYNC_DISPLAY_PARAMS; 1996 1997 /* 1998 * NV0073_CTRL_CMD_SPECIFIC_GET_DISPLAY_BRIGHTNESS_LTM 1999 * NV0073_CTRL_CMD_SPECIFIC_SET_DISPLAY_BRIGHTNESS_LTM 2000 * These commands retrieve and set the brightness level and Local Tone Mapping (LTM) settings for 2001 * the specified display. 2002 * 2003 * subDeviceInstance 2004 * This parameter specifies the subdevice instance within the 2005 * NV04_DISPLAY_COMMON parent device to which the operation should be 2006 * directed. 2007 * 2008 * displayId 2009 * Display for which brightness/LTM settings is to be retrieved or set. 2010 * 2011 * brightnessMilliNits 2012 * the display brightness in the millinits units in the [0,10000000] range, inclusive. 2013 * 2014 * transitionTimeMs 2015 * the transition time for display brightness to transition from current brightness level to the brightnessMilliNits 2016 * 2017 * bUncalibrated 2018 * if true the parameter indicates brightnessMilliNits has to be interpreted as brightness % value, in 0.001% units 2019 * 2020 * bAdaptiveBrightness 2021 * if true the brightnessMilliNits is set by the OS in the response to the ambient light sensor (ALS) input (if present on the system) 2022 * 2023 * bBoostRange 2024 * if true the brightnessMilliNits value is set by the OS in the response to the ambient light sensor (ALS) input (if present on the system) 2025 * Indicating very bright ambient light environment 2026 * 2027 * ambientIlluminance 2028 * if bAdaptiveBrightness = true, ambientIlluminance represents an ambient illuminance value reported by the ALS sensor, in 0.001 Lux units 2029 * 2030 * ambientChromaticityX 2031 * if bAdaptiveBrightness = true, ambientChromaticityX represents X chromaticity value reported by ALS sensor, in 0.001 units of [0,1] range 2032 * 2033 * ambientChromaticityY 2034 * if bAdaptiveBrightness = true, ambientChromaticityY represents Y chromaticity value reported by ALS sensor, in 0.001 units of [0,1] range 2035 * 2036 * bLtmEnable 2037 * if set to true, enable LTM functionality in GPU display HW. Set to true by default. 2038 * 2039 * bEnhanceContrast 2040 * if bLtmEnable = true, and if set to true, enhance local contrast via LTM regardless of any other contrast enhancement driver policies. Set to false by default. 2041 * 2042 * contrastGain 2043 * if bLtmEnable = true, this is used to how gain we need to apply on the contrast. 2044 * 2045 * detailGain 2046 * if bLtmEnable = true, how much details needs to be boosted is indicated by this parameter. 2047 * 2048 * bContentAdaptiveBrightness 2049 * if bLtmEnable = true, and if set to true, modify display backlight level and adjust pixel values dynamically on per-frame basis to perform content adaptive brightness control to reduce display power. Set to false by default. 2050 * 2051 * bDynamicHdrTonemapping 2052 * if bLtmEnable = true, and if set to true, and output is HDR, enable dynamic per frame HDR tonemapping. Set to false by default. 2053 * 2054 * Possible status values returned include: 2055 * NV_OK 2056 * NV_ERR_NOT_SUPPORTED 2057 */ 2058 2059 typedef struct NV0073_CTRL_SPECIFIC_DISPLAY_BRIGHTNESS_LTM_PARAMS { 2060 NvU32 subDeviceInstance; 2061 NvU32 displayId; 2062 NvU32 brightnessMilliNits; 2063 NvU32 transitionTimeMs; 2064 NvBool bUncalibrated; 2065 NvBool bAdaptiveBrightness; 2066 NvBool bBoostRange; 2067 NvU32 ambientIlluminance; 2068 NvU32 ambientChromaticityX; 2069 NvU32 ambientChromaticityY; 2070 NvBool bEnhanceContrast; 2071 NvU16 contrastGain; 2072 NvU16 detailGain; 2073 NvBool bContentAdaptiveBrightness; 2074 NvBool bDynamicHdrTonemapping; 2075 } NV0073_CTRL_SPECIFIC_DISPLAY_BRIGHTNESS_LTM_PARAMS; 2076 2077 #define NV0073_CTRL_SPECIFIC_GET_DISPLAY_BRIGHTNESS_LTM_PARAMS_MESSAGE_ID (0xAFU) 2078 2079 typedef NV0073_CTRL_SPECIFIC_DISPLAY_BRIGHTNESS_LTM_PARAMS NV0073_CTRL_SPECIFIC_GET_DISPLAY_BRIGHTNESS_LTM_PARAMS; 2080 2081 #define NV0073_CTRL_CMD_SPECIFIC_GET_DISPLAY_BRIGHTNESS_LTM (0x7302afU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_GET_DISPLAY_BRIGHTNESS_LTM_PARAMS_MESSAGE_ID" */ 2082 2083 #define NV0073_CTRL_SPECIFIC_SET_DISPLAY_BRIGHTNESS_LTM_PARAMS_MESSAGE_ID (0xB0U) 2084 2085 typedef NV0073_CTRL_SPECIFIC_DISPLAY_BRIGHTNESS_LTM_PARAMS NV0073_CTRL_SPECIFIC_SET_DISPLAY_BRIGHTNESS_LTM_PARAMS; 2086 2087 #define NV0073_CTRL_CMD_SPECIFIC_SET_DISPLAY_BRIGHTNESS_LTM (0x7302b0U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | NV0073_CTRL_SPECIFIC_SET_DISPLAY_BRIGHTNESS_LTM_PARAMS_MESSAGE_ID" */ 2088 2089 /* _ctrl0073specific_h_ */ 2090