summaryrefslogtreecommitdiffstats
path: root/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 18:36:21 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-13 18:36:21 -0400
commit00e54c13c7c9030c4d5f7151467f2d85a3730e29 (patch)
tree17a45239df8d2e4912ff3697ed06e85a10b969de /userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073
downloadopen-iov-00e54c13c7c9030c4d5f7151467f2d85a3730e29.tar.gz
open-iov-00e54c13c7c9030c4d5f7151467f2d85a3730e29.zip
Initial commit: Open-IOV vGPU-IO complete stack
- Firmware decompilation: GSP 570.144W (28.5MB ELF, RV64IMAC), 132 decompiled C files - Kernel modules: nvidia.ko (34MB, OpenRM), open-iov-vfio.ko (2.8MB, VFIO mdev), gsp-vgpu.ko (1.8MB, guest driver) - Userspace: libiov.so/libvgpu.so (76KB), example_vgpu (28KB), rpc_emulator.c - PCI config space emulation (256B with PM, MSI, MSI-X, PCIe caps) - 12 RPC types fully mapped from firmware decompilation - BAR trap, WPR, scheduling, notification, migration emulation - Helper scripts: load_vgpu_stack, create_mdev, launch_qemu_vgpu, test_vgpu_stack, setup_guest_driver, unload_vgpu_stack - Architecture documentation - Wiki: 10 technical documents - Git LFS for large binaries (.ko, .bin, .iso, .img, .o, ghidra repos) - nvidia-open-gpu-kernel-modules as submodule
Diffstat (limited to 'userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073')
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073base.h60
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dfp.h1269
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dp.h2767
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dpu.h32
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073event.h32
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073internal.h47
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073psr.h32
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073specific.h1909
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073stereo.h166
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073svp.h32
-rw-r--r--userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073system.h1480
11 files changed, 7826 insertions, 0 deletions
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073base.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073base.h
new file mode 100644
index 0000000..970ea3b
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073base.h
@@ -0,0 +1,60 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2019-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073base.finn
+//
+
+#include "ctrl/ctrlxxxx.h"
+/* NV04_DISPLAY_COMMON control commands and parameters */
+
+#define NV0073_CTRL_CMD(cat,idx) NVXXXX_CTRL_CMD(0x0073, NV0073_CTRL_##cat, idx)
+
+/* NV04_DISPLAY_COMMON command categories (6bits) */
+#define NV0073_CTRL_RESERVED (0x00U)
+#define NV0073_CTRL_SYSTEM (0x01U)
+#define NV0073_CTRL_SPECIFIC (0x02U)
+#define NV0073_CTRL_EVENT (0x03U)
+#define NV0073_CTRL_INTERNAL (0x04U)
+#define NV0073_CTRL_DFP (0x11U)
+#define NV0073_CTRL_DP (0x13U)
+#define NV0073_CTRL_SVP (0x14U)
+#define NV0073_CTRL_DPU (0x15U)
+#define NV0073_CTRL_PSR (0x16U)
+#define NV0073_CTRL_STEREO (0x17U)
+
+/*
+ * NV0073_CTRL_CMD_NULL
+ *
+ * This command does nothing.
+ * This command does not take any parameters.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ */
+#define NV0073_CTRL_CMD_NULL (0x730000U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_RESERVED_INTERFACE_ID << 8) | 0x0" */
+
+/* _ctrl0073base_h_ */
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dfp.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dfp.h
new file mode 100644
index 0000000..347b478
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dfp.h
@@ -0,0 +1,1269 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2005-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073dfp.finn
+//
+
+#include "ctrl/ctrl0073/ctrl0073base.h"
+
+/* NV04_DISPLAY_COMMON dfp-display-specific control commands and parameters */
+
+/*
+ * NV0073_CTRL_CMD_DFP_GET_INFO
+ *
+ * This command can be used to determine the associated display type for
+ * the specified displayId.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must be a dfp display
+ * as determined with the NV0073_CTRL_CMD_SPECIFIC_GET_TYPE command.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * flags
+ * This parameter returns the information specific to this dfp. Here are
+ * the possible fields:
+ * NV0073_CTRL_DFP_FLAGS_SIGNAL
+ * This specifies the type of signal used for this dfp.
+ * NV0073_CTRL_DFP_FLAGS_LANES
+ * This specifies whether the board supports 1, 2, or 4 lanes
+ * for DISPLAYPORT signals.
+ * NV0073_CTRL_DFP_FLAGS_LIMIT
+ * Some GPUs were not qualified to run internal TMDS except at 60 HZ
+ * refresh rates. So, if LIMIT_60HZ_RR is set, then the client must
+ * make sure to only allow 60 HZ refresh rate modes to the OS/User.
+ * NV0073_CTRL_DFP_FLAGS_SLI_SCALER
+ * While running in SLI, if SLI_SCALER_DISABLE is set, the GPU cannot
+ * scale any resolutions. So, the output timing must match the
+ * memory footprint.
+ * NV0073_CTRL_DFP_FLAGS_HDMI_CAPABLE
+ * This specifies whether the DFP displayId is capable of
+ * transmitting HDMI.
+ * NV0073_CTRL_DFP_FLAGS_RANGE_LIMITED_CAPABLE
+ * This specifies whether the displayId is capable of sending a
+ * limited color range out from the board.
+ * NV0073_CTRL_DFP_FLAGS_RANGE_AUTO_CAPABLE
+ * This specifies whether the displayId is capable of auto-configuring
+ * the color range.
+ * NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR422_CAPABLE
+ * This specifies whether the displayId is capable of sending the
+ * YCBCR422 color format out from the board.
+ * NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR444_CAPABLE
+ * This specifies whether the displayId is capable of sending
+ * YCBCR444 color format out from the board.
+ * NV0073_CTRL_DFP_FLAGS_DP_LINK_BANDWIDTH
+ * This specifies whether the displayId is capable of doing high
+ * bit-rate (2.7Gbps) or low bit-rate (1.62Gbps) if the DFP is
+ * display port.
+ * NV0073_CTRL_DFP_FLAGS_HDMI_ALLOWED
+ * This specifies whether the DFP displayId is allowed to transmit HDMI
+ * based on the VBIOS settings.
+ * NV0073_CTRL_DFP_FLAGS_EMBEDDED_DISPLAYPORT
+ * This specifies whether the DFP displayId is actually an embedded display
+ * port based on VBIOS connector information AND ASSR cap.
+ * NV0073_CTRL_DFP_FLAGS_DP_LINK_CONSTRAINT
+ * This specifies whether the DFP displayId must be trained to RBR mode
+ * (if it is using DP protocol) whenever possible.
+ * NV0073_CTRL_DFP_FLAGS_LINK
+ * This specifies whether the board supports single or dual links
+ * for TMDS, LVDS, and SDI signals.
+ * NV0073_CTRL_DFP_FLAGS_DP_POST_CURSOR2_DISABLED
+ * This specifies if PostCursor2 is disabled in the VBIOS
+ * NV0073_CTRL_DFP_FLAGS_DSI_DEVICE_ID
+ * This indicates whether this SOR uses DSI-A, DSI-B or both (ganged mode).
+ * NV0073_CTRL_DFP_FLAGS_DYNAMIC_MUX_CAPABLE
+ * This indicates whether this DFP supports Dynamic MUX
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_DFP_GET_INFO (0x731140U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_GET_INFO_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_GET_INFO_PARAMS_MESSAGE_ID (0x40U)
+
+typedef struct NV0073_CTRL_DFP_GET_INFO_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 flags;
+} NV0073_CTRL_DFP_GET_INFO_PARAMS;
+
+/* valid display types */
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL 2:0
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL_TMDS (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL_LVDS (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL_SDI (0x00000002U)
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL_DISPLAYPORT (0x00000003U)
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL_DSI (0x00000004U)
+#define NV0073_CTRL_DFP_FLAGS_SIGNAL_WRBK (0x00000005U)
+#define NV0073_CTRL_DFP_FLAGS_LANE 5:3
+#define NV0073_CTRL_DFP_FLAGS_LANE_NONE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_LANE_SINGLE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_LANE_DUAL (0x00000002U)
+#define NV0073_CTRL_DFP_FLAGS_LANE_QUAD (0x00000003U)
+#define NV0073_CTRL_DFP_FLAGS_LANE_OCT (0x00000004U)
+#define NV0073_CTRL_DFP_FLAGS_LIMIT 6:6
+#define NV0073_CTRL_DFP_FLAGS_LIMIT_DISABLE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_LIMIT_60HZ_RR (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_SLI_SCALER 7:7
+#define NV0073_CTRL_DFP_FLAGS_SLI_SCALER_NORMAL (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_SLI_SCALER_DISABLE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_HDMI_CAPABLE 8:8
+#define NV0073_CTRL_DFP_FLAGS_HDMI_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_HDMI_CAPABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_RANGE_LIMITED_CAPABLE 9:9
+#define NV0073_CTRL_DFP_FLAGS_RANGE_LIMITED_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_RANGE_LIMITED_CAPABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_RANGE_AUTO_CAPABLE 10:10
+#define NV0073_CTRL_DFP_FLAGS_RANGE_AUTO_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_RANGE_AUTO_CAPABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR422_CAPABLE 11:11
+#define NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR422_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR422_CAPABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR444_CAPABLE 12:12
+#define NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR444_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_FORMAT_YCBCR444_CAPABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_HDMI_ALLOWED 14:14
+#define NV0073_CTRL_DFP_FLAGS_HDMI_ALLOWED_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_HDMI_ALLOWED_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_EMBEDDED_DISPLAYPORT 15:15
+#define NV0073_CTRL_DFP_FLAGS_EMBEDDED_DISPLAYPORT_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_EMBEDDED_DISPLAYPORT_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_CONSTRAINT 16:16
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_CONSTRAINT_NONE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_CONSTRAINT_PREFER_RBR (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_BW 19:17
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_BW_1_62GBPS (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_BW_2_70GBPS (0x00000002U)
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_BW_5_40GBPS (0x00000003U)
+#define NV0073_CTRL_DFP_FLAGS_DP_LINK_BW_8_10GBPS (0x00000004U)
+#define NV0073_CTRL_DFP_FLAGS_LINK 21:20
+#define NV0073_CTRL_DFP_FLAGS_LINK_NONE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_LINK_SINGLE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_LINK_DUAL (0x00000002U)
+#define NV0073_CTRL_DFP_FLAGS_DP_FORCE_RM_EDID 22:22
+#define NV0073_CTRL_DFP_FLAGS_DP_FORCE_RM_EDID_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_DP_FORCE_RM_EDID_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_DSI_DEVICE_ID 24:23
+#define NV0073_CTRL_DFP_FLAGS_DSI_DEVICE_ID_DSI_NONE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_DSI_DEVICE_ID_DSI_A (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_DSI_DEVICE_ID_DSI_B (0x00000002U)
+#define NV0073_CTRL_DFP_FLAGS_DSI_DEVICE_ID_DSI_GANGED (0x00000003U)
+#define NV0073_CTRL_DFP_FLAGS_DP_POST_CURSOR2_DISABLED 25:25
+#define NV0073_CTRL_DFP_FLAGS_DP_POST_CURSOR2_DISABLED_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_DP_POST_CURSOR2_DISABLED_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_FLAGS_DP_PHY_REPEATER_COUNT 29:26
+#define NV0073_CTRL_DFP_FLAGS_DYNAMIC_MUX_CAPABLE 30:30
+#define NV0073_CTRL_DFP_FLAGS_DYNAMIC_MUX_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_FLAGS_DYNAMIC_MUX_CAPABLE_TRUE (0x00000001U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_DFP_GET_DP2TMDS_DONGLE_INFO
+ *
+ * This command can be used to determine information about dongles attached
+ * to a displayport connection.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the dfp display which owns the
+ * panel power to adjust. The display ID must be a dfp display
+ * as determined with the NV0073_CTRL_CMD_SPECIFIC_GET_TYPE command.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * flags
+ * This parameter provide state information about the dongle attachments.
+ * NV0073_CTRL_DFP_GET_DP2TMDS_DONGLE_INFO_FLAGS_CAPABLE
+ * Specifies if the connection is capable of a dongle. This field
+ * returns false in all cases of signal types except for those capable
+ * of outputting TMDS. Even then the if a gpio is not defined, the
+ * the a statement of false will also be returned.
+ * NV0073_CTRL_DFP_GET_DP2TMDS_DONGLE_INFO_FLAGS_ATTACHED
+ * When attached, this value specifies that a dongle is detected and
+ * attached. The client should read the _TYPE field to determine
+ * if it is a dp2hdmi or dp2dvi dongle.
+ * NV0073_CTRL_DFP_GET_DP2TMDS_DONGLE_INFO_FLAGS_TYPE
+ * _DP2DVI: no response to i2cAddr 0x80 per DP interop guidelines.
+ * clients MUST avoid outputting HDMI even if capable.
+ * _DP2HDMI: dongle responds to i2cAddr 0x80 per DP interop guidelines.
+ * client is allowed to output HDMI when possible.
+ * _LFH_DVI: DMS59-DVI breakout dongle is in use.
+ * _LFH_VGA: DMS59-VGA breakout dongle is in use.
+ * NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_DP2TMDS_DONGLE_TYPE
+ * _1: Max TMDS Clock rate is 165 MHz for both DVI and HDMI.
+ * _2: Max TMDS Clock rate will be specified in the dongle
+ * address space at device address 0x80.
+ * DVI is up to 165 MHz
+ * HDMI is up to 300 MHz
+ * There are type 2 devices that support beyond 600 MHz
+ * though not defined in the spec.
+ * maxTmdsClkRateHz
+ * This defines the max TMDS clock rate for dual mode adaptor in Hz.
+ */
+#define NV0073_CTRL_CMD_DFP_GET_DISPLAYPORT_DONGLE_INFO (0x731142U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_PARAMS_MESSAGE_ID (0x42U)
+
+typedef struct NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 flags;
+ NvU32 maxTmdsClkRateHz;
+} NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_PARAMS;
+
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_CAPABLE 0:0
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_CAPABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_CAPABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_ATTACHED 1:1
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_ATTACHED_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_ATTACHED_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_TYPE 7:4
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_TYPE_DP2DVI (0x00000000U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_TYPE_DP2HDMI (0x00000001U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_TYPE_LFH_DVI (0x00000002U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_TYPE_LFH_VGA (0x00000003U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_DP2TMDS_DONGLE_TYPE 8:8
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_DP2TMDS_DONGLE_TYPE_1 (0x00000000U)
+#define NV0073_CTRL_DFP_GET_DISPLAYPORT_DONGLE_INFO_FLAGS_DP2TMDS_DONGLE_TYPE_2 (0x00000001U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_DFP_SET_ELD_AUDIO_CAPS
+ *
+ * This command is used to inform hardware the receiver's audio capabilities
+ * using the new EDID Like Data (ELD) memory structure. The ELD memory
+ * structure is read by the audio driver by issuing the ELD Data command verb.
+ * This mechanism is used for passing sink device' audio EDID information
+ * from graphics software to audio software. ELD contents will contain a
+ * subset of the sink device's EDID information.
+ * The client should inform hardware at initial boot, a modeset, and whenever
+ * a hotplug event occurs.
+ *
+ * displayId
+ * This parameter indicates the digital display device's
+ * mask. This comes as input to this command.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * numELDSize
+ * This parameter specifies how many bytes of data RM should write to the
+ * ELD buffer. Section 7.3.3.36 of the ECN specifies that the ELD buffer
+ * size of zero based. HDAudio driver will then use this information to
+ * determine how many bytes of the ELD buffer the HDAudio should read.
+ * The maximum size of the buffer is 96 bytes.
+ * bufferELD
+ * This buffer contains data as defined in the ECR HDMI ELD memory structure.
+ * Refer to the ELD Memory Structure Specification for more details.
+ * The format should be:
+ * - Header block is fixed at 4 bytes
+ * The header block contains the ELD version and baseline ELD len as
+ * well as some reserved fields.
+ * - Baseline block for audio descriptors is 76 bytes
+ * (15 SAD; each SAD=3 bytes requiring 45 bytes with 31 bytes to spare)
+ * As well as some other bits used to denote the CEA version,
+ * the speaker allocation data, monitor name, connector type, and
+ * hdcp capabilities.
+ * - Vendor specific block of 16 bytes
+ * maxFreqSupported
+ * Supply the maximum frequency supported for the overall audio caps.
+ * This value should match CEA861-X defines for sample freq.
+ * ctrl:
+ * NV0073_CTRL_DFP_SET_ELD_AUDIO_CAPS_CTRL_PD:
+ * Specifies the presence detect of the receiver. On a hotplug
+ * or modeset client should set this bit to TRUE.
+ * NV0073_CTRL_DFP_SET_ELD_AUDIO_CAPS_CTRL_ELDV:
+ * Specifies whether the ELD buffer contents are valid.
+ * An intrinsic unsolicited response (UR) is generated whenever
+ * the ELDV bit changes in value and the PD=1. When _PD=1(hotplug),
+ * RM will set the ELDV bit after ELD buffer contents are written.
+ * If _ELDV bit is set to false such as during a unplug, then the
+ * contents of the ELD buffer will be cleared.
+ * deviceEntry:
+ * The deviceEntry number from which the SF should accept packets.
+ * _NONE if disabling audio.
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_DFP_SET_ELD_AUDIO_CAPS (0x731144U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_SET_ELD_AUDIO_CAP_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_ELD_BUFFER 96U
+
+#define NV0073_CTRL_DFP_SET_ELD_AUDIO_CAP_PARAMS_MESSAGE_ID (0x44U)
+
+typedef struct NV0073_CTRL_DFP_SET_ELD_AUDIO_CAP_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 numELDSize;
+ NvU8 bufferELD[NV0073_CTRL_DFP_ELD_AUDIO_CAPS_ELD_BUFFER];
+ NvU32 maxFreqSupported;
+ NvU32 ctrl;
+ NvU32 deviceEntry;
+} NV0073_CTRL_DFP_SET_ELD_AUDIO_CAP_PARAMS;
+
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_0320KHZ (0x00000001U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_0441KHZ (0x00000002U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_0480KHZ (0x00000003U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_0882KHZ (0x00000004U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_0960KHZ (0x00000005U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_1764KHZ (0x00000006U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_MAX_FREQ_SUPPORTED_1920KHZ (0x00000007U)
+
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_CTRL_PD 0:0
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_CTRL_PD_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_CTRL_PD_TRUE (0x00000001U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_CTRL_ELDV 1:1
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_CTRL_ELDV_FALSE (0x00000000U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_CTRL_ELDV_TRUE (0x00000001U)
+
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_DEVICE_ENTRY_0 (0x00000000U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_DEVICE_ENTRY_1 (0x00000001U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_DEVICE_ENTRY_2 (0x00000002U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_DEVICE_ENTRY_3 (0x00000003U)
+#define NV0073_CTRL_DFP_ELD_AUDIO_CAPS_DEVICE_ENTRY_NONE (0x00000007U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_DFP_GET_SPREAD_SPECTRUM_STATUS
+ *
+ * This command is used to get spread spectrum status for a display device.
+ *
+ * displayId
+ * Display ID for which the spread spectrum status is needed.
+ * checkRMSsState
+ * Default is to check in Vbios. This flag lets this control call to check in register.
+ * status
+ * Return status value.
+ */
+
+#define NV0073_CTRL_CMD_DFP_GET_SPREAD_SPECTRUM (0x73114cU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_GET_SPREAD_SPECTRUM_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_GET_SPREAD_SPECTRUM_PARAMS_MESSAGE_ID (0x4CU)
+
+typedef struct NV0073_CTRL_DFP_GET_SPREAD_SPECTRUM_PARAMS {
+ NvU32 displayId;
+ NvBool enabled;
+} NV0073_CTRL_DFP_GET_SPREAD_SPECTRUM_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DFP_UPDATE_DYNAMIC_DFP_CACHE
+ *
+ * Update the Dynamic DFP with Bcaps read from remote display.
+ * Also updates hdcpFlags, gpu hdcp capable flags in DFP.
+ * If bResetDfp is true, all the flags are reset before making changes.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+#define NV0073_CTRL_CMD_DFP_UPDATE_DYNAMIC_DFP_CACHE (0x73114eU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_PARAMS_MESSAGE_ID (0x4EU)
+
+typedef struct NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 headIndex;
+ NvU8 bcaps;
+ NvU8 bksv[5];
+ NvU32 hdcpFlags;
+ NvBool bHdcpCapable;
+ NvBool bResetDfp;
+ NvU8 updateMask;
+} NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_PARAMS;
+
+#define NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_MASK_BCAPS 0x01U
+#define NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_MASK_BKSV 0x02U
+#define NV0073_CTRL_DFP_UPDATE_DYNAMIC_DFP_CACHE_MASK_FLAGS 0x03U
+
+/*
+ * NV0073_CTRL_CMD_DFP_SET_AUDIO_ENABLE
+ *
+ * This command sets the audio enable state of the DFP. When disabled,
+ * no audio stream packets or audio timestamp packets will be sent.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * audio should be enabled or disabled. The display ID must be a dfp display.
+ * If the displayId is not a dfp, this call will return
+ * NV_ERR_INVALID_ARGUMENT.
+ * enable
+ * This parameter specifies whether to enable (NV_TRUE) or disable (NV_FALSE)
+ * audio to the display.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ *
+ */
+#define NV0073_CTRL_CMD_DFP_SET_AUDIO_ENABLE (0x731150U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_SET_AUDIO_ENABLE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_SET_AUDIO_ENABLE_PARAMS_MESSAGE_ID (0x50U)
+
+typedef struct NV0073_CTRL_DFP_SET_AUDIO_ENABLE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool enable;
+} NV0073_CTRL_DFP_SET_AUDIO_ENABLE_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_DFP_ASSIGN_SOR_LINKCONFIG
+ *
+ * This enum defines default/primary/secondary sor sublinks to be configured.
+ * These access modes are:
+ *
+ * NV0073_CTRL_DFP_ASSIGN_SOR_FORCE_NONE
+ * Default link config
+ * NV0073_CTRL_DFP_ASSIGN_SOR_FORCE_PRIMARY_SOR_LINK
+ * Primary sor sublink to be configured
+ * NV0073_CTRL_DFP_ASSIGN_SOR_FORCE_SECONDARY_SOR_LINK
+ * Secondary sor sublink to be configured
+ */
+typedef enum NV0073_CTRL_DFP_ASSIGN_SOR_LINKCONFIG {
+ NV0073_CTRL_DFP_ASSIGN_SOR_FORCE_NONE = 0,
+ NV0073_CTRL_DFP_ASSIGN_SOR_FORCE_PRIMARY_SOR_LINK = 1,
+ NV0073_CTRL_DFP_ASSIGN_SOR_FORCE_SECONDARY_SOR_LINK = 2,
+} NV0073_CTRL_DFP_ASSIGN_SOR_LINKCONFIG;
+
+/*
+ * NV0073_CTRL_DFP_ASSIGN_SOR_INFO
+ *
+ * This structure describes info about assigned SOR
+ *
+ * displayMask
+ * The displayMask for the SOR corresponding to its HW routings
+ * sorType
+ * This parameter specifies the SOR type
+ * Here are the current defined fields:
+ * NV0073_CTRL_DFP_SOR_TYPE_NONE
+ * Unallocated SOR
+ * NV0073_CTRL_DFP_SOR_TYPE_2H1OR_PRIMARY
+ * Primary SOR for 2H1OR stream
+ * NV0073_CTRL_DFP_SOR_TYPE_2H1OR_SECONDARY
+ * Secondary SOR for 2H1OR stream
+ * NV0073_CTRL_DFP_SOR_TYPE_SINGLE
+ * Default Single SOR
+ * Note - sorType should only be referred to identify 2H1OR Primary and Secondary SOR
+ *
+ */
+
+typedef struct NV0073_CTRL_DFP_ASSIGN_SOR_INFO {
+ NvU32 displayMask;
+ NvU32 sorType;
+} NV0073_CTRL_DFP_ASSIGN_SOR_INFO;
+
+#define NV0073_CTRL_DFP_SOR_TYPE_NONE (0x00000000U)
+#define NV0073_CTRL_DFP_SOR_TYPE_SINGLE (0x00000001U)
+#define NV0073_CTRL_DFP_SOR_TYPE_2H1OR_PRIMARY (0x00000002U)
+#define NV0073_CTRL_DFP_SOR_TYPE_2H1OR_SECONDARY (0x00000003U)
+
+/*
+ * NV0073_CTRL_CMD_DFP_ASSIGN_SOR
+ *
+ * This command is used by the clients to assign SOR to DFP for CROSS-BAR
+ * when the default SOR-DFP routing that comes from vbios is not considered.
+ * SOR shall be assigned to a DFP at the runtime. This call should be called
+ * before a modeset is done on any dfp display and also before LinkTraining for DP displays.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * DisplayId of the primary display for which SOR is to be assigned. However, if
+ * displayId is 0 then RM shall return the XBAR config it has stored in it's structures.
+ * sorExcludeMask
+ * sorMask of the SORs which should not be used for assignment. If this is 0,
+ * then SW is free to allocate any available SOR.
+ * slaveDisplayId
+ * displayId of the slave device in case of dualSST mode. This ctrl call will
+ * allocate SORs to both slave and the master if slaveDisplayId is set.
+ * forceSublinkConfig
+ * forces RM to configure primary or secondary sor sublink on the given diaplayId.
+ * If not set, then RM will do the default configurations.
+ * bIs2Head1Or
+ * Specifies that SOR allocation is required for 2 head 1 OR. This will allocate
+ * 2 SOR for same displayId - one Master and one Slave. Slave SOR would be disconnected
+ * from any padlink and get feedback clock from Master SOR's padlink.
+ * sorAssignList[NV0073_CTRL_CMD_DFP_ASSIGN_SOR_MAX_SORS]
+ * returns the displayMask for all SORs corresponding to their HW routings.
+ * sorAssignListWithTag[NV0073_CTRL_CMD_DFP_ASSIGN_SOR_MAX_SORS]
+ * returns the displayMask for all SORs corresponding to their HW routings along with
+ * SOR type to identify 2H1OR Primary and Secondary SORs. SOR type would be identified by
+ * NV0073_CTRL_DFP_SOR_TYPE. sorAssignList would look as below -
+ * sorAssignListWithTag[] = { DisplayMask, SOR Type
+ * {0x100, SECONDARY_SOR}
+ * {0x200, SINGLE_SOR}
+ * {0x100, PRIMARY_SOR}
+ * {0, NONE}}
+ * }
+ * Here, for display id = 0x100, SOR2 is Primary and SOR0 is Secondary.
+ * Note - sorAssignList parameter would be removed after Bug 200749158 is resolved
+ * reservedSorMask
+ * returns the sorMask reserved for the internal panels.
+ * flags
+ * Other detail settings.
+ * _AUDIO_OPTIMAL: Client requests trying to get audio SOR if possible.
+ * If there's no audio capable SOR and OD is HDMI/DP,
+ * RM will fail the control call.
+ * _AUDIO_DEFAULT: RM does not check audio-capability of SOR.
+ *
+ * _ACTIVE_SOR_NOT_AUDIO_CAPABLE_YES : RM returns Active SOR which is not Audio capable.
+ * _ACTIVE_SOR_NOT_AUDIO_CAPABLE_NO : RM is not returning 'Active non-audio capable SOR'.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+
+#define NV0073_CTRL_CMD_DFP_ASSIGN_SOR (0x731152U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_ASSIGN_SOR_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_ASSIGN_SOR_MAX_SORS 4U
+
+#define NV0073_CTRL_DFP_ASSIGN_SOR_PARAMS_MESSAGE_ID (0x52U)
+
+typedef struct NV0073_CTRL_DFP_ASSIGN_SOR_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU8 sorExcludeMask;
+ NvU32 slaveDisplayId;
+ NV0073_CTRL_DFP_ASSIGN_SOR_LINKCONFIG forceSublinkConfig;
+ NvBool bIs2Head1Or;
+ NvU32 sorAssignList[NV0073_CTRL_CMD_DFP_ASSIGN_SOR_MAX_SORS];
+ NV0073_CTRL_DFP_ASSIGN_SOR_INFO sorAssignListWithTag[NV0073_CTRL_CMD_DFP_ASSIGN_SOR_MAX_SORS];
+ NvU8 reservedSorMask;
+ NvU32 flags;
+} NV0073_CTRL_DFP_ASSIGN_SOR_PARAMS;
+
+#define NV0073_CTRL_DFP_ASSIGN_SOR_FLAGS_AUDIO 0:0
+#define NV0073_CTRL_DFP_ASSIGN_SOR_FLAGS_AUDIO_OPTIMAL (0x00000001U)
+#define NV0073_CTRL_DFP_ASSIGN_SOR_FLAGS_AUDIO_DEFAULT (0x00000000U)
+#define NV0073_CTRL_DFP_ASSIGN_SOR_FLAGS_ACTIVE_SOR_NOT_AUDIO_CAPABLE 1:1
+#define NV0073_CTRL_DFP_ASSIGN_SOR_FLAGS_ACTIVE_SOR_NOT_AUDIO_CAPABLE_NO (0x00000000U)
+#define NV0073_CTRL_DFP_ASSIGN_SOR_FLAGS_ACTIVE_SOR_NOT_AUDIO_CAPABLE_YES (0x00000001U)
+
+/*
+* NV0073_CTRL_CMD_DFP_GET_PADLINK_MASK
+*
+* This command will only be used by chipTB tests to get the padlinks corresponding
+* to the given displayId. RM gets this information from vbios. This control call is
+* only for verif purpose.
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed. This parameter must specify a value between zero and the
+* total number of subdevices within the parent device. This parameter
+* should be set to zero for default behavior.
+* displayId
+* DisplayId of the display for which the client needs analog link Mask
+* padlinkMask
+* analogLinkMask for the given displayId. This value returned is 0xffffffff if
+* the given displayId is invalid else RM returns the corresponding padlinkMask.
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_NOT_SUPPORTED
+*/
+
+
+#define NV0073_CTRL_CMD_DFP_GET_PADLINK_MASK (0x731153U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_GET_PADLINK_MASK_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_GET_PADLINK_MASK_PARAMS_MESSAGE_ID (0x53U)
+
+typedef struct NV0073_CTRL_DFP_GET_PADLINK_MASK_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 padlinkMask;
+} NV0073_CTRL_DFP_GET_PADLINK_MASK_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE
+ * This enum defines the functions that are supported for which a
+ * corresponding GPIO pin number could be retrieved
+ * Values copied from objgpio.h GPIO_FUNC_TYPE_LCD_*. Please keep the
+ * values in sync between the 2 files
+ */
+
+typedef enum NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE {
+ // GPIO types of LCD GPIO functions common to all internal panels
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE_LCD_BACKLIGHT = 268435456,
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE_LCD_POWER = 285212672,
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE_LCD_POWER_OK = 301989888,
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE_LCD_SELF_TEST = 318767104,
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE_LCD_LAMP_STATUS = 335544320,
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE_LCD_BRIGHTNESS = 352321536,
+} NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE;
+
+/*
+ * NV0073_CTRL_CMD_DFP_GET_LCD_GPIO_PIN_NUM
+ *
+ * This command can be used to get the GPIO pin number that corresponds to one
+ * of the LCD functions
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NVOS_STATUS_ERROR_INVALID_ARGUMENT.
+ * funcType
+ * The LDC function for which the GPIO pin number is needed
+ * lcdGpioPinNum
+ * The GPIO pin number that corresponds to the LCD function.
+ *
+*/
+#define NV0073_CTRL_CMD_DFP_GET_LCD_GPIO_PIN_NUM (0x731154U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_GET_LCD_GPIO_PIN_NUM_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_GET_LCD_GPIO_PIN_NUM_PARAMS_MESSAGE_ID (0x54U)
+
+typedef struct NV0073_CTRL_DFP_GET_LCD_GPIO_PIN_NUM_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NV0073_CTRL_CMD_DFP_LCD_GPIO_FUNC_TYPE funcType;
+ NvU32 lcdGpioPinNum;
+} NV0073_CTRL_DFP_GET_LCD_GPIO_PIN_NUM_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_DFP_CONFIG_TWO_HEAD_ONE_OR
+ *
+ * This command is used for configuration of 2 head 1 OR.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * Display Id of the panel for which Two Head One OR is going to be used
+ * bEnable
+ * Enable/Disable 2 Head 1 OR
+ * masterSorIdx
+ * Master SOR Index which will send pixels to panel
+ * slaveSorIdx
+ * Slave SOR Index which will take feedback clock from Master SOR's
+ * padlink
+ * Possible status values returned are:
+ * NVOS_STATUS_SUCCESS
+ * NVOS_STATUS_ERROR_INVALID_ARGUMENT
+ * NVOS_STATUS_ERROR_NOT_SUPPORTED
+ */
+
+
+#define NV0073_CTRL_CMD_DFP_CONFIG_TWO_HEAD_ONE_OR (0x731156U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_CONFIG_TWO_HEAD_ONE_OR_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_CONFIG_TWO_HEAD_ONE_OR_PARAMS_MESSAGE_ID (0x56U)
+
+typedef struct NV0073_CTRL_DFP_CONFIG_TWO_HEAD_ONE_OR_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bEnable;
+ NvU32 masterSorIdx;
+ NvU32 slaveSorIdx;
+} NV0073_CTRL_DFP_CONFIG_TWO_HEAD_ONE_OR_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DFP_DSC_CRC_CONTROL
+ *
+ * This command is used to enable/disable CRC on the GPU or query the registers
+ * related to it
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * headIndex
+ * index of the head
+ * cmd
+ * specifying if setup or querying is done
+ * bEnable
+ * enable or disable CRC on the GPU
+ * gpuCrc0
+ * 0-indexed CRC register of the GPU
+ * gpuCrc1
+ * 1-indexed CRC register of the GPU
+ * gpuCrc0
+ * 2-indexed CRC register of the GPU
+ * Possible status values returned are:
+ * NVOS_STATUS_SUCCESS
+ * NVOS_STATUS_ERROR_NOT_SUPPORTED
+ */
+
+
+#define NV0073_CTRL_CMD_DFP_DSC_CRC_CONTROL (0x731157U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_DFP_DSC_CRC_CONTROL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DFP_DSC_CRC_CONTROL_PARAMS_MESSAGE_ID (0x57U)
+
+typedef struct NV0073_CTRL_DFP_DSC_CRC_CONTROL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 headIndex;
+ NvU32 cmd;
+ NvBool bEnable;
+ NvU16 gpuCrc0;
+ NvU16 gpuCrc1;
+ NvU16 gpuCrc2;
+} NV0073_CTRL_DFP_DSC_CRC_CONTROL_PARAMS;
+
+#define NV0073_CTRL_DP_CRC_CONTROL_CMD 0:0
+#define NV0073_CTRL_DP_CRC_CONTROL_CMD_SETUP (0x00000000U)
+#define NV0073_CTRL_DP_CRC_CONTROL_CMD_QUERY (0x00000001U)
+
+/*
+ * NV0073_CTRL_CMD_DFP_INIT_MUX_DATA
+ *
+ * This control call is used to configure the display MUX related data
+ * for the given display device. Clients to RM are expected to call this
+ * control call to initialize the data related to MUX before any MUX related
+ * operations such mux switch or PSR entry/ exit are performed.
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId (in)
+ * ID of the display device for which the mux state has to be initialized
+ * manfId (in)
+ * Specifies the manufacturer ID of panel obtained from the EDID. This
+ * parameter is expected to be non-zero only in case of internal panel.
+ * productId (in)
+ * Specifies the product ID of panel obtained from the EDID. This
+ * parameter is expected to be non-zero only in case of internal panel.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+#define NV0073_CTRL_CMD_DFP_INIT_MUX_DATA (0x731158U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DFP_INIT_MUX_DATA_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_INIT_MUX_DATA_PARAMS_MESSAGE_ID (0x58U)
+
+typedef struct NV0073_CTRL_CMD_DFP_INIT_MUX_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU16 manfId;
+ NvU16 productId;
+} NV0073_CTRL_CMD_DFP_INIT_MUX_DATA_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_DFP_SWITCH_DISP_MUX
+ *
+ * This command is used to switch the dynamic display mux between
+ * integrated GPU and discrete GPU.
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId (in)
+ * ID of the display device for which the display MUX has to be switched
+ * flags (in)
+ * Flags indicating the action to be performed. Here are the possible
+ * valid values-
+ * NV0073_CTRL_DFP_DISP_MUX_SWITCH_IGPU_TO_DGPU
+ * When set mux is switched from integrated to discrete GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_SWITCH_DGPU_TO_IGPU
+ * When set mux is switched from discrete to integrated GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_SWITCH_SKIP_SIDEBAND_ACCESS
+ * Set to true for PSR panels as we skip sideband access.
+ * auxSettleDelay (in)
+ * Time, in milliseconds, necessary for AUX channel to settle and become
+ * accessible after a mux switch. Set to zero to use the default delay.
+ * muxSwitchLatencyMs (out)
+ * mux switch latency stats in milli-seconds
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+#define NV0073_CTRL_CMD_DFP_SWITCH_DISP_MUX (0x731160U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DFP_SWITCH_DISP_MUX_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_SWITCH_DISP_MUX_PARAMS_MESSAGE_ID (0x60U)
+
+typedef struct NV0073_CTRL_CMD_DFP_SWITCH_DISP_MUX_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 flags;
+ NvU32 auxSettleDelay;
+ NvU32 muxSwitchLatencyMs;
+} NV0073_CTRL_CMD_DFP_SWITCH_DISP_MUX_PARAMS;
+
+/* valid flags*/
+#define NV0073_CTRL_DFP_DISP_MUX_SWITCH 0:0
+#define NV0073_CTRL_DFP_DISP_MUX_SWITCH_IGPU_TO_DGPU 0x00000000
+#define NV0073_CTRL_DFP_DISP_MUX_SWITCH_DGPU_TO_IGPU 0x00000001
+#define NV0073_CTRL_DFP_DISP_MUX_SWITCH_SKIP_SIDEBAND_ACCESS 1:1
+#define NV0073_CTRL_DFP_DISP_MUX_SWITCH_SKIP_SIDEBAND_ACCESS_YES 0x00000001
+#define NV0073_CTRL_DFP_DISP_MUX_SWITCH_SKIP_SIDEBAND_ACCESS_NO 0x00000000
+
+/*
+ * NV0073_CTRL_CMD_DFP_RUN_PRE_DISP_MUX_OPERATIONS
+ *
+ * This command is used to perform all the operations that need to be
+ * performed before a mux switch is started.
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId (in)
+ * ID of the display device for which the pre mux switch operations have
+ * to be performed.
+ * flags (in)
+ * Flags indicating the action to be performed. Here are the possible
+ * valid values -
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE_IGPU_TO_DGPU
+ * Indicates a switch from i to d is initiated
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE_DGPU_TO_IGPU
+ * Indicates a switch from d to i is initiated
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_ENTER_SKIP_NO
+ * When set RM will execute the PSR enter sequence. By default RM will
+ * not skip SR enter sequence
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_ENTER_SKIP_YES
+ * When set RM will skip the PSR enter sequence
+ * iGpuBrightness (in)
+ * iGPU brightness value (scale 0~100) before switching mux from I2D.
+ * This is used to match brightness after switching mux to dGPU
+ * preOpsLatencyMs (out)
+ * premux switch operations latency stats in milli-seconds. This includes -
+ * - disabling SOR sequencer and enable BL GPIO control
+ * - toggling LCD VDD, BL EN and PWM MUX GPIOs
+ * - PSR entry, if not skipped
+ * psrEntryLatencyMs (out)
+ * psr entry latency stats in milli-seconds
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+#define NV0073_CTRL_CMD_DFP_RUN_PRE_DISP_MUX_OPERATIONS (0x731161U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DFP_RUN_PRE_DISP_MUX_OPERATIONS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_RUN_PRE_DISP_MUX_OPERATIONS_PARAMS_MESSAGE_ID (0x61U)
+
+typedef struct NV0073_CTRL_CMD_DFP_RUN_PRE_DISP_MUX_OPERATIONS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 flags;
+ NvU32 iGpuBrightness;
+ NvU32 preOpsLatencyMs;
+ NvU32 psrEntryLatencyMs;
+} NV0073_CTRL_CMD_DFP_RUN_PRE_DISP_MUX_OPERATIONS_PARAMS;
+
+/* valid flags*/
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE 0:0
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE_IGPU_TO_DGPU 0x00000000U
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE_DGPU_TO_IGPU 0x00000001U
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_ENTER_SKIP 1:1
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_ENTER_SKIP_NO 0x00000000U
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_ENTER_SKIP_YES 0x00000001U
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_MUX_SWITCH_IGPU_POWER_TIMING 2:2
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_MUX_SWITCH_IGPU_POWER_TIMING_KNOWN 0x00000000
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_MUX_SWITCH_IGPU_POWER_TIMING_UNKNOWN 0x00000001
+
+#define NV0073_CTRL_DISP_MUX_BACKLIGHT_BRIGHTNESS_MIN 0U
+#define NV0073_CTRL_DISP_MUX_BACKLIGHT_BRIGHTNESS_MAX 100U
+
+/*
+ * NV0073_CTRL_CMD_DFP_RUN_POST_DISP_MUX_OPERATIONS
+ *
+ * This command is used to perform all the operations that need to be
+ * performed after a successful mux switch is completed.
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId (in)
+ * ID of the display device for which the post mux switch operations have
+ * to be performed.
+ * flags (in)
+ * Flags indicating the action to be performed. Here are the possible
+ * valid values -
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE_IGPU_TO_DGPU
+ * Indicates a switch from i to d is initiated
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE_DGPU_TO_IGPU
+ * Indicates a switch from d to i is initiated
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_EXIT_SKIP_NO
+ * When set RM will execute the PSR exit sequence. By default RM will
+ * not skip SR exit sequence
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_EXIT_SKIP_YES
+ * When set RM will skip the PSR exit sequence
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_MUX_SWITCH_IGPU_POWER_TIMING_KNOWN
+ * Indicates mux switches where we know when igpu powers up
+ * NV0073_CTRL_DFP_DISP_MUX_FLAGS_MUX_SWITCH_IGPU_POWER_TIMING_UNKNOWN
+ * Indicates mux switches where we don't know when igpu powers up
+ * postOpsLatencyMs (out)
+ * postmux switch operations latency stats in milli-seconds. This includes -
+ * - restoring SOR sequencer and BL GPIO control
+ * - toggling LCD VDD, BL EN and PWM MUX GPIOs
+ * - PSR exit, if not skipped
+ * psrExitLatencyMs (out)
+ * psr exit latency stats in milli-seconds
+ * psrExitTransitionToInactiveLatencyMs (out)
+ * psr exit latency stats in milli-seconds, from state 2 (SR active) to state 4 (transition to inactive)
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ * NV_ERR_TIMEOUT in case of SR exit failure
+ */
+
+#define NV0073_CTRL_CMD_DFP_RUN_POST_DISP_MUX_OPERATIONS (0x731162U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DFP_RUN_POST_DISP_MUX_OPERATIONS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_RUN_POST_DISP_MUX_OPERATIONS_PARAMS_MESSAGE_ID (0x62U)
+
+typedef struct NV0073_CTRL_CMD_DFP_RUN_POST_DISP_MUX_OPERATIONS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 flags;
+ NvU32 postOpsLatencyMs;
+ NvU32 psrExitLatencyMs;
+ NvU32 psrExitTransitionToInactiveLatencyMs;
+} NV0073_CTRL_CMD_DFP_RUN_POST_DISP_MUX_OPERATIONS_PARAMS;
+
+/* valid flags*/
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SWITCH_TYPE 0:0
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_EXIT_SKIP 1:1
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_EXIT_SKIP_NO 0x00000000U
+#define NV0073_CTRL_DFP_DISP_MUX_FLAGS_SR_EXIT_SKIP_YES 0x00000001U
+
+/*
+ * NV0073_CTRL_CMD_DFP_GET_DISP_MUX_STATUS
+ *
+ * This command is used to query the display mux status for the given
+ * display device
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId (in)
+ * ID of the display device for which the post mux switch operations have
+ * to be performed.
+ * muxStatus (out)
+ * status indicating the current state of the mux.
+ * valid values -
+ * NV0073_CTRL_DFP_DISP_MUX_STATE_INTEGRATED_GPU
+ * Indicates that the MUX is currently switched to integrated GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_STATE_DISCRETE_GPU
+ * Indicates that the MUX is currently switched to discrete GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_MODE_DISCRETE_ONLY
+ * Indicates that the MUX mode is set to discrete mode, where all displays
+ * are driven by discrete GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_MODE_INTEGRATED_ONLY
+ * Indicates that the MUX mode is set to integrated mode, where all
+ * displays are driven by Integrated GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_MODE_HYBRID
+ * Indicates that the MUX mode is set to hybrid, where internal panel is
+ * driven by integrated GPU, while external displays might be driven by
+ * discrete GPU.
+ * NV0073_CTRL_DFP_DISP_MUX_MODE_DYNAMIC
+ * Indicates that the MUX mode is dynamic. It is only in this mode, the
+ * display MUX can be toggled between discrete and hybrid dynamically.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+#define NV0073_CTRL_CMD_DFP_GET_DISP_MUX_STATUS (0x731163U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DFP_GET_DISP_MUX_STATUS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_GET_DISP_MUX_STATUS_PARAMS_MESSAGE_ID (0x63U)
+
+typedef struct NV0073_CTRL_CMD_DFP_GET_DISP_MUX_STATUS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 muxStatus;
+} NV0073_CTRL_CMD_DFP_GET_DISP_MUX_STATUS_PARAMS;
+
+/* valid flags */
+#define NV0073_CTRL_DFP_DISP_MUX_STATE 1:0
+#define NV0073_CTRL_DFP_DISP_MUX_STATE_INVALID 0x00000000U
+#define NV0073_CTRL_DFP_DISP_MUX_STATE_INTEGRATED_GPU 0x00000001U
+#define NV0073_CTRL_DFP_DISP_MUX_STATE_DISCRETE_GPU 0x00000002U
+#define NV0073_CTRL_DFP_DISP_MUX_MODE 4:2
+#define NV0073_CTRL_DFP_DISP_MUX_MODE_INVALID 0x00000000U
+#define NV0073_CTRL_DFP_DISP_MUX_MODE_INTEGRATED_ONLY 0x00000001U
+#define NV0073_CTRL_DFP_DISP_MUX_MODE_DISCRETE_ONLY 0x00000002U
+#define NV0073_CTRL_DFP_DISP_MUX_MODE_HYBRID 0x00000003U
+#define NV0073_CTRL_DFP_DISP_MUX_MODE_DYNAMIC 0x00000004U
+
+
+
+/*
+* NV0073_CTRL_CMD_DFP_GET_DSI_MODE_TIMING
+*
+* This command can be used to get DSI mode timing parameters.
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed. This parameter must specify a value between zero and the
+* total number of subdevices within the parent device. This parameter
+* should be set to zero for default behavior.
+* displayId
+* This parameter specifies the ID of the display on which the DSI
+* info will be set. The display ID must be a DSI-capable display.
+* hActive
+* This parameter specifies the horizontal length of the active pixel
+* data in the raster.
+* vActive
+* This parameter specifies the vertical lines of the active pixel
+* data in the raster.
+* hFrontPorch
+* This parameter specifies the number of horizontal front porch
+* blanking pixels in the raster.
+* vFrontPorch
+* This parameter specifies the numer of lines of the vertical front
+* porch in the raster.
+* hBackPorch
+* This parameter specifies the number of horizontal back porch
+* blanking pixels in the raster.
+* vBackPorch
+* This parameter specifies the numer of lines of the vertical back
+* porch in the raster.
+* hSyncWidth
+* This parameter specifies the number of horizontal sync pixels in
+* the raster.
+* vSyncWidth
+* This parameter specifies the numer of lines of the vertical sync
+* in the raster.
+* bpp
+* This parameter specifies the depth (Bits per Pixel) of the output
+* display stream.
+* refresh
+* This parameter specifies the refresh rate of the panel (in Hz).
+* pclkHz
+* This parameter specifies the pixel clock rate in Hz.
+* numLanes
+* Number of DSI data lanes.
+* dscEnable
+* Flag to indicate if DSC an be enabled, which in turn indicates if
+* panel supports DSC.
+* dscBpp
+* DSC Bits per pixel
+* dscNumSlices
+* Number of slices for DSC.
+* dscDuaDsc
+* Flag to indicate if panel supports DSC streams from two DSI
+* controllers.
+* dscSliceHeight
+* Height of DSC slices.
+* dscBlockPrediction
+* Flag to indicate if DSC Block Prediction needs to be enabled.
+* dscDecoderVersionMajor
+* Major version number of DSC decoder on Panel.
+* dscDecoderVersionMinor
+* Minor version number of DSC decoder on Panel.
+* dscUseCustomPPS
+* Flag to indicate if Panel uses custom PPS values which deviate from standard values.
+* dscCustomPPSData
+* 32 bytes of custom PPS data required by Panel.
+* dscEncoderCaps
+* Capabilities of DSC encoder in SoC.
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_NOT_SUPPORTED
+*/
+
+#define NV0073_CTRL_CMD_DFP_GET_DSI_MODE_TIMING (0x731166U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DFP_GET_DSI_MODE_TIMING_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DFP_DSI_CUSTOM_PPS_DATA_COUNT 32U
+
+#define NV0073_CTRL_CMD_DFP_GET_DSI_MODE_TIMING_PARAMS_MESSAGE_ID (0x66U)
+
+typedef struct NV0073_CTRL_CMD_DFP_GET_DSI_MODE_TIMING_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 hActive;
+ NvU32 vActive;
+ NvU32 hFrontPorch;
+ NvU32 vFrontPorch;
+ NvU32 hBackPorch;
+ NvU32 vBackPorch;
+ NvU32 hSyncWidth;
+ NvU32 vSyncWidth;
+ NvU32 bpp;
+ NvU32 refresh;
+ NvU32 pclkHz;
+ NvU32 numLanes;
+ NvU32 dscEnable;
+ NvU32 dscBpp;
+ NvU32 dscNumSlices;
+ NvU32 dscDualDsc;
+ NvU32 dscSliceHeight;
+ NvU32 dscBlockPrediction;
+ NvU32 dscDecoderVersionMajor;
+ NvU32 dscDecoderVersionMinor;
+ NvBool dscUseCustomPPS;
+ NvU32 dscCustomPPSData[NV0073_CTRL_CMD_DFP_DSI_CUSTOM_PPS_DATA_COUNT];
+
+ struct {
+ NvBool bDscSupported;
+ NvU32 encoderColorFormatMask;
+ NvU32 lineBufferSizeKB;
+ NvU32 rateBufferSizeKB;
+ NvU32 bitsPerPixelPrecision;
+ NvU32 maxNumHztSlices;
+ NvU32 lineBufferBitDepth;
+ } dscEncoderCaps;
+} NV0073_CTRL_CMD_DFP_GET_DSI_MODE_TIMING_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_DFP_GET_FIXED_MODE_TIMING
+ *
+ * This control call is used to retrieve the display mode timing info that's
+ * specified for a given DFP from an offline configuration blob (e.g., Device Tree).
+ * This display timing info is intended to replace the timings exposed in a
+ * sink's EDID.
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId (in)
+ * ID of the display device for which the timings should be retrieved.
+ * stream (in)
+ * For MST connectors with static topologies (e.g., DP serializers),
+ * this parameter further identifies the video stream for which the
+ * timings should be retrieved.
+ * valid (out)
+ * Indicates whether a valid display timing was found for this DFP.
+ * hActive (out)
+ * Horizontal active width in pixels
+ * hFrontPorch (out)
+ * Horizontal front porch
+ * hSyncWidth (out)
+ * Horizontal sync width
+ * hBackPorch (out)
+ * Horizontal back porch
+ * vActive (out)
+ * Vertical active height in lines
+ * vFrontPorch (out)
+ * Vertical front porch
+ * vSyncWidth (out)
+ * Vertical sync width
+ * vBackPorch (out)
+ * Vertical back porch
+ * pclkKHz (out)
+ * Pixel clock frequency in KHz
+ * rrx1k (out)
+ * Refresh rate in units of 0.001Hz
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_DFP_GET_FIXED_MODE_TIMING (0x731172) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DFP_INTERFACE_ID << 8 | NV0073_CTRL_DFP_GET_FIXED_MODE_TIMING_PARAMS_MESSAGE_ID)" */
+
+#define NV0073_CTRL_DFP_GET_FIXED_MODE_TIMING_PARAMS_MESSAGE_ID (0x72U)
+
+typedef struct NV0073_CTRL_DFP_GET_FIXED_MODE_TIMING_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU8 stream;
+
+ NvBool valid;
+
+ NvU16 hActive;
+ NvU16 hFrontPorch;
+ NvU16 hSyncWidth;
+ NvU16 hBackPorch;
+
+ NvU16 vActive;
+ NvU16 vFrontPorch;
+ NvU16 vSyncWidth;
+ NvU16 vBackPorch;
+
+ NvU32 pclkKHz;
+ NvU32 rrx1k;
+} NV0073_CTRL_DFP_GET_FIXED_MODE_TIMING_PARAMS;
+
+/* _ctrl0073dfp_h_ */
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dp.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dp.h
new file mode 100644
index 0000000..e593227
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dp.h
@@ -0,0 +1,2767 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2005-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073dp.finn
+//
+
+#include "ctrl/ctrl0073/ctrl0073base.h"
+
+/* NV04_DISPLAY_COMMON dfp-display-specific control commands and parameters */
+
+/*
+ * NV0073_CTRL_CMD_DP_AUXCH_CTRL
+ *
+ * This command can be used to perform an aux channel transaction to the
+ * displayPort receiver.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * bAddrOnly
+ * If set to NV_TRUE, this parameter prompts an address-only
+ * i2c-over-AUX transaction to be issued, if supported. Else the
+ * call fails with NVOS_STATUS_ERR_NOT_SUPPORTED. The size parameter is
+ * expected to be 0 for address-only transactions.
+ * cmd
+ * This parameter is an input to this command. The cmd parameter follows
+ * Section 2.4 AUX channel syntax in the DisplayPort spec.
+ * Here are the current defined fields:
+ * NV0073_CTRL_DP_AUXCH_CMD_TYPE
+ * This specifies the request command transaction
+ * NV0073_CTRL_DP_AUXCH_CMD_TYPE_I2C
+ * Set this value to indicate a I2C transaction.
+ * NV0073_CTRL_DP_AUXCH_CMD_TYPE_AUX
+ * Set this value to indicate a DisplayPort transaction.
+ * NV0073_CTRL_DP_AUXCH_CMD_I2C_MOT
+ * This field is dependent on NV0073_CTRL_DP_AUXCH_CMD_TYPE.
+ * It is only valid if NV0073_CTRL_DP_AUXCH_CMD_TYPE_I2C
+ * is specified above and indicates a middle of transaction.
+ * In the case of AUX, this field should be set to zero. The valid
+ * values are:
+ * NV0073_CTRL_DP_AUXCH_CMD_I2C_MOT_FALSE
+ * The I2C transaction is not in the middle of a transaction.
+ * NV0073_CTRL_DP_AUXCH_CMD_I2C_MOT_TRUE
+ * The I2C transaction is in the middle of a transaction.
+ * NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE
+ * The request type specifies if we are doing a read/write or write
+ * status request:
+ * NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE_READ
+ * An I2C or AUX channel read is requested.
+ * NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE_WRITE
+ * An I2C or AUX channel write is requested.
+ * NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE_WRITE_STATUS
+ * An I2C write status request desired. This value should
+ * not be set in the case of an AUX CH request and only applies
+ * to I2C write transaction command.
+ * addr
+ * This parameter is an input to this command. The addr parameter follows
+ * Section 2.4 in DisplayPort spec and the client should refer to the valid
+ * address in DisplayPort spec. Only the first 20 bits are valid.
+ * data[]
+ * In the case of a read transaction, this parameter returns the data from
+ * transaction request. In the case of a write transaction, the client
+ * should write to this buffer for the data to send. The max # of bytes
+ * allowed is NV0073_CTRL_DP_AUXCH_MAX_DATA_SIZE.
+ * size
+ * Specifies how many data bytes to read/write depending on the transaction type.
+ * The input size value should be indexed from 0. That means if you want to read
+ * 1 byte -> size = 0, 2 bytes -> size = 1, 3 bytes -> size = 2, up to 16 bytes
+ * where size = 15. On return, this parameter returns total number of data bytes
+ * successfully read/written from/to the transaction (indexed from 1). That is,
+ * if you successfully requested 1 byte, you would send down size = 0. On return,
+ * you should expect size = 1 if all 1 byte were successfully read. (Note that
+ * it is valid for a display to reply with fewer than the requested number of
+ * bytes; in that case, it is up to the client to make a new request for the
+ * remaining bytes.)
+ * replyType
+ * This parameter is an output to this command. It returns the auxChannel
+ * status after the end of the aux Ch transaction. The valid values are
+ * based on the DisplayPort spec:
+ * NV0073_CTRL_DP_AUXCH_REPLYTYPE_ACK
+ * In the case of a write,
+ * AUX: write transaction completed and all data bytes written.
+ * I2C: return size bytes has been written to i2c slave.
+ * In the case of a read, return of ACK indicates ready to reply
+ * another read request.
+ * NV0073_CTRL_DP_AUXCH_REPLYTYPE_NACK
+ * In the case of a write, first return size bytes have been written.
+ * In the case of a read, implies that does not have requested data
+ * for the read request transaction.
+ * NV0073_CTRL_DP_AUXCH_REPLYTYPE_DEFER
+ * Not ready for the write/read request and client should retry later.
+ * NV0073_CTRL_DP_DISPLAYPORT_AUXCH_REPLYTYPE_I2CNACK
+ * Applies to I2C transactions only. For I2C write transaction:
+ * has written the first return size bytes to I2C slave before getting
+ * NACK. For a read I2C transaction, the I2C slave has NACKED the I2C
+ * address.
+ * NV0073_CTRL_DP_AUXCH_REPLYTYPE_I2CDEFER
+ * Applicable to I2C transactions. For I2C write and read
+ * transactions, I2C slave has yet to ACK or NACK the I2C transaction.
+ * NV0073_CTRL_DP_AUXCH_REPLYTYPE_TIMEOUT
+ * The receiver did not respond within the timeout period defined in
+ * the DisplayPort 1.1a specification.
+ * retryTimeMs
+ * This parameter is an output to this command. In case of
+ * NVOS_STATUS_ERROR_RETRY return status, this parameter returns the time
+ * duration in milli-seconds after which client should retry this command.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NVOS_STATUS_ERROR_RETRY
+ */
+#define NV0073_CTRL_CMD_DP_AUXCH_CTRL (0x731341U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_AUXCH_CTRL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_AUXCH_MAX_DATA_SIZE 16U
+#define NV0073_CTRL_DP_AUXCH_CTRL_PARAMS_MESSAGE_ID (0x41U)
+
+typedef struct NV0073_CTRL_DP_AUXCH_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bAddrOnly;
+ NvU32 cmd;
+ NvU32 addr;
+ NvU8 data[NV0073_CTRL_DP_AUXCH_MAX_DATA_SIZE];
+ NvU32 size;
+ NvU32 replyType;
+ NvU32 retryTimeMs;
+} NV0073_CTRL_DP_AUXCH_CTRL_PARAMS;
+
+#define NV0073_CTRL_DP_AUXCH_CMD_TYPE 3:3
+#define NV0073_CTRL_DP_AUXCH_CMD_TYPE_I2C (0x00000000U)
+#define NV0073_CTRL_DP_AUXCH_CMD_TYPE_AUX (0x00000001U)
+#define NV0073_CTRL_DP_AUXCH_CMD_I2C_MOT 2:2
+#define NV0073_CTRL_DP_AUXCH_CMD_I2C_MOT_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_AUXCH_CMD_I2C_MOT_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE 1:0
+#define NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE_WRITE (0x00000000U)
+#define NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE_READ (0x00000001U)
+#define NV0073_CTRL_DP_AUXCH_CMD_REQ_TYPE_WRITE_STATUS (0x00000002U)
+
+#define NV0073_CTRL_DP_AUXCH_ADDR 20:0
+
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE 3:0
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_ACK (0x00000000U)
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_NACK (0x00000001U)
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_DEFER (0x00000002U)
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_TIMEOUT (0x00000003U)
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_I2CNACK (0x00000004U)
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_I2CDEFER (0x00000008U)
+
+//This is not the register field, this is software failure case when we
+//have invalid argument
+#define NV0073_CTRL_DP_AUXCH_REPLYTYPE_INVALID_ARGUMENT (0xffffffffU)
+
+/*
+ * NV0073_CTRL_CMD_DP_AUXCH_SET_SEMA
+ *
+ * This command can be used to set the semaphore in order to gain control of
+ * the aux channel. This control is only used in HW verification.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display
+ * as determined with the NV0073_CTRL_CMD_SPECIFIC_GET_TYPE command.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * owner
+ * This parameter is an input to this command.
+ * Here are the current defined fields:
+ * NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_RM
+ * Write the aux channel semaphore for resource manager to own the
+ * the aux channel.
+ * NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_VBIOS
+ * Write the aux channel semaphore for vbios/efi to own the
+ * the aux channel. This value is used only for HW verification
+ * and should not be used in normal driver operation.
+ * NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_PMU
+ * Write the aux channel semaphore for pmu to own the
+ * the aux channel. This value is used only by pmu
+ * and should not be used in normal driver operation.
+ * NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_DPU
+ * Write the aux channel semaphore for dpu to own the
+ * the aux channel and should not be used in normal
+ * driver operation.
+ * NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_SEC2
+ * Write the aux channel semaphore for sec2 to own the
+ * the aux channel and should not be used in normal
+ * driver operation.
+ * NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_RELEASE
+ * Write the aux channel semaphore for hardware to own the
+ * the aux channel. This value is used only for HW verification
+ * and should not be used in normal driver operation.
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#define NV0073_CTRL_CMD_DP_AUXCH_SET_SEMA (0x731342U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_AUXCH_SET_SEMA_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_PARAMS_MESSAGE_ID (0x42U)
+
+typedef struct NV0073_CTRL_DP_AUXCH_SET_SEMA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 owner;
+} NV0073_CTRL_DP_AUXCH_SET_SEMA_PARAMS;
+
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER 2:0
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_RELEASE (0x00000000U)
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_RM (0x00000001U)
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_VBIOS (0x00000002U)
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_PMU (0x00000003U)
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_DPU (0x00000004U)
+#define NV0073_CTRL_DP_AUXCH_SET_SEMA_OWNER_SEC2 (0x00000005U)
+
+/*
+ * NV0073_CTRL_CMD_DP_CTRL
+ *
+ * This command is used to set various displayPort configurations for
+ * the specified displayId such a lane count and link bandwidth. It
+ * is assumed that link training has already occurred.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * cmd
+ * This parameter is an input to this command.
+ * Here are the current defined fields:
+ * NV0073_CTRL_DP_CMD_SET_LANE_COUNT
+ * Set to specify the number of displayPort lanes to configure.
+ * NV0073_CTRL_DP_CMD_SET_LANE_COUNT_FALSE
+ * No request to set the displayport lane count.
+ * NV0073_CTRL_DP_CMD_SET_LANE_COUNT_TRUE
+ * Set this value to indicate displayport lane count change.
+ * NV0073_CTRL_DP_CMD_SET_LINK_BANDWIDTH
+ * Set to specify a request to change the link bandwidth.
+ * NV0073_CTRL_DP_CMD_SET_LINK_BANDWIDTH_FALSE
+ * No request to set the displayport link bandwidth.
+ * NV0073_CTRL_DP_CMD_SET_LINK_BANDWIDTH_TRUE
+ * Set this value to indicate displayport link bandwidth change.
+ * NV0073_CTRL_DP_CMD_SET_LINK_BANDWIDTH
+ * Set to specify a request to change the link bandwidth.
+ * NV0073_CTRL_DP_CMD_SET_LINK_BANDWIDTH_FALSE
+ * No request to set the displayport link bandwidth.
+ * NV0073_CTRL_DP_CMD_SET_LINK_BANDWIDTH_TRUE
+ * Set this value to indicate displayport link bandwidth change.
+ * NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD
+ * Set to disable downspread during link training.
+ * NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD_FALSE
+ * Downspread will be enabled.
+ * NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD_TRUE
+ * Downspread will be disabled (e.g. for compliance testing).
+ * NV0073_CTRL_DP_CMD_SET_FORMAT_MODE
+ * This field specifies the DP stream mode.
+ * NV0073_CTRL_DP_CMD_SET_FORMAT_MODE_SINGLE_STREAM
+ * This value indicates that single stream mode is specified.
+ * NV0073_CTRL_DP_CMD_SET_FORMAT_MODE_MULTI_STREAM
+ * This value indicates that multi stream mode is specified.
+ * NV0073_CTRL_DP_CMD_FAST_LINK_TRAINING
+ * Set to do Fast link training (avoid AUX transactions for link
+ * training). We need to restore all the previous trained link settings
+ * (e.g. the drive current/preemphasis settings) before doing FLT.
+ * During FLT, we send training pattern 1 followed by training pattern 2
+ * each for a period of 500us.
+ * NV0073_CTRL_DP_CMD_FAST_LINK_TRAINING_NO
+ * Not a fast link training scenario.
+ * NV0073_CTRL_DP_CMD_FAST_LINK_TRAINING_YES
+ * Do fast link training.
+ * NV0073_CTRL_DP_CMD_NO_LINK_TRAINING
+ * Set to do No link training. We need to restore all the previous
+ * trained link settings (e.g. the drive current/preemphasis settings)
+ * before doing NLT, but we don't need to do the Clock Recovery and
+ * Channel Equalization. (Please refer to NVIDIA PANEL SELFREFRESH
+ * CONTROLLER SPECIFICATION 3.1.6 for detail flow)
+ * NV0073_CTRL_DP_CMD_NO_LINK_TRAINING_NO
+ * Not a no link training scenario.
+ * NV0073_CTRL_DP_CMD_NO_LINK_TRAINING_YES
+ * Do no link training.
+ * NV0073_CTRL_DP_CMD_USE_DOWNSPREAD_SETTING
+ * Specifies whether RM should use the DP Downspread setting specified by
+ * NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD command regardless of what the Display
+ * is capable of. This is used along with the Fake link training option so that
+ * we can configure the GPU to enable/disable spread when a real display is
+ * not connected.
+ * NV0073_CTRL_DP_CMD_USE_DOWNSPREAD_SETTING_FORCE
+ * RM Always use the DP Downspread setting specified.
+ * NV0073_CTRL_DP_CMD_USE_DOWNSPREAD_SETTING_DEFAULT
+ * RM will enable Downspread only if the display supports it. (default)
+ * NV0073_CTRL_DP_CMD_SKIP_HW_PROGRAMMING
+ * Specifies whether RM should skip HW training of the link.
+ * If this is the case then RM only updates its SW state without actually
+ * touching any HW registers. Clients should use this ONLY if it has determined -
+ * a. link is trained and not lost
+ * b. desired link config is same as current trained link config
+ * c. link is not in D3 (should be in D0)
+ * NV0073_CTRL_DP_CMD_SKIP_HW_PROGRAMMING_NO
+ * RM doesn't skip HW LT as the current Link Config is not the same as the
+ * requested Link Config.
+ * NV0073_CTRL_DP_CMD_SKIP_HW_PROGRAMMING_YES
+ * RM skips HW LT and only updates its SW state as client has determined that
+ * the current state of the link and the requested Link Config is the same.
+ * NV0073_CTRL_DP_CMD_DISABLE_LINK_CONFIG
+ * Set if the client does not want link training to happen.
+ * This should ONLY be used for HW verification.
+ * NV0073_CTRL_DP_CMD_DISABLE_LINK_CONFIG_FALSE
+ * This is normal production behaviour which shall perform
+ * link training or follow the normal procedure for lane count
+ * reduction.
+ * NV0073_CTRL_DP_CMD_DISABLE_LINK_CONFIG_TRUE
+ * Set this value to not perform link config steps, this should
+ * only be turned on for HW verif testing. If _LINK_BANDWIDTH
+ * or _LANE_COUNT is set, RM will only write to the TX DP registers
+ * and perform no link training.
+ * NV0073_CTRL_DP_CMD_POST_LT_ADJ_REQ_GRANTED
+ * This field specifies if source grants Post Link training Adjustment request or not.
+ * NV0073_CTRL_DP_CMD_POST_LT_ADJ_REQ_GRANTED_NO
+ * Source does not grant Post Link training Adjustment request
+ * NV0073_CTRL_DP_CMD_POST_LT_ADJ_REQ_GRANTED_YES
+ * Source grants Post Link training Adjustment request
+ * Source wants to link train LT Tunable Repeaters
+ * NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING
+ * This field specifies if fake link training is to be done. This will
+ * program enough of the hardware to avoid any hardware hangs and
+ * depending upon option chosen by the client, OR will be enabled for
+ * transmisssion.
+ * NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING_NO
+ * No Fake LT will be performed
+ * NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING_DONOT_TOGGLE_TRANSMISSION
+ * SOR will be not powered up during Fake LT
+ * NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING_TOGGLE_TRANSMISSION_ON
+ * SOR will be powered up during Fake LT
+ * NV0073_CTRL_DP_CMD_TRAIN_PHY_REPEATER
+ * This field specifies if source wants to link train LT Tunable Repeaters or not.
+ * NV0073_CTRL_DP_CMD_TRAIN_PHY_REPEATER_NO
+ * Source does not want to link train LT Tunable Repeaters
+ * NV0073_CTRL_DP_CMD_TRAIN_PHY_REPEATER_YES
+ * NV0073_CTRL_DP_CMD_BANDWIDTH_TEST
+ * Set if the client wants to reset the link after the link
+ * training is done. As a part of uncommtting a DP display.
+ * NV0073_CTRL_DP_CMD_BANDWIDTH_TEST_NO
+ * This is for normal operation, if DD decided not to reset the link.
+ * NV0073_CTRL_DP_CMD_BANDWIDTH_TEST_YES
+ * This is to reset the link, if DD decided to uncommit the display because
+ * the link is no more required to be enabled, as in a DP compliance test.
+ * NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE
+ * Set if the client does not want link training to happen.
+ * This should ONLY be used for HW verification if necessary.
+ * NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE_FALSE
+ * This is normal production behaviour which shall perform
+ * pre link training checks such as if both rx and tx are capable
+ * of the requested config for lane and link bw.
+ * NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE_TRUE
+ * Set this value to bypass link config check, this should
+ * only be turned on for HW verif testing. If _LINK_BANDWIDTH
+ * or _LANE_COUNT is set, RM will not check TX and DX caps.
+ * NV0073_CTRL_DP_CMD_FALLBACK_CONFIG
+ * Set if requested config by client fails and if link if being
+ * trained for the fallback config.
+ * NV0073_CTRL_DP_CMD_FALLBACK_CONFIG_FALSE
+ * This is the normal case when the link is being trained for a requested config.
+ * NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE_TRUE
+ * Set this value in case the link configuration for requested config fails
+ * and the link is being trained for a fallback config.
+ * NV0073_CTRL_DP_CMD_ENABLE_FEC
+ * Specifies whether RM should set NV_DPCD14_FEC_CONFIGURATION_FEC_READY
+ * before link training if client has determined that FEC is required(for DSC).
+ * If required to be enabled RM sets FEC enable bit in panel, start link training.
+ * Enabling/disabling FEC on GPU side is not done during Link training
+ * and RM Ctrl call NV0073_CTRL_CMD_DP_CONFIGURE_FEC has to be called
+ * explicitly to enable/disable FEC after LT(including PostLT LQA).
+ * If enabled, FEC would be disabled while powering down the link.
+ * Client has to make sure to account for 3% overhead of transmitting
+ * FEC symbols while calculating DP bandwidth.
+ * NV0073_CTRL_DP_CMD_ENABLE_FEC_FALSE
+ * This is the normal case when FEC is not required
+ * NV0073_CTRL_DP_CMD_ENABLE_FEC_TRUE
+ * Set this value in case FEC needs to be enabled
+ * data
+ * This parameter is an input and output to this command.
+ * Here are the current defined fields:
+ * NV0073_CTRL_DP_DATA_SET_LANE_COUNT
+ * This field specifies the desired setting for lane count. A client
+ * may choose any lane count as long as it does not exceed the
+ * capability of DisplayPort receiver as indicated in the
+ * receiver capability field. The valid values for this field are:
+ * NV0073_CTRL_DP_DATA_SET_LANE_COUNT_0
+ * For zero-lane configurations, link training is shut down.
+ * NV0073_CTRL_DP_DATA_SET_LANE_COUNT_1
+ * For one-lane configurations, lane0 is used.
+ * NV0073_CTRL_DP_DATA_SET_LANE_COUNT_2
+ * For two-lane configurations, lane0 and lane1 is used.
+ * NV0073_CTRL_DP_DATA_SET_LANE_COUNT_4
+ * For four-lane configurations, all lanes are used.
+ * NV0073_CTRL_DP_DATA_SET_LANE_COUNT_8
+ * For devices that supports 8-lane DP.
+ * On return, the lane count setting is returned which may be
+ * different from the requested input setting.
+ * NV0073_CTRL_DP_DATA_SET_LINK_BW
+ * This field specifies the desired setting for link bandwidth. There
+ * are only four supported main link bandwidth settings. The
+ * valid values for this field are:
+ * NV0073_CTRL_DP_DATA_SET_LINK_BW_1_62GBPS
+ * NV0073_CTRL_DP_DATA_SET_LINK_BW_2_70GBPS
+ * NV0073_CTRL_DP_DATA_SET_LINK_BW_5_40GBPS
+ * NV0073_CTRL_DP_DATA_SET_LINK_BW_8_10GBPS
+ * On return, the link bandwidth setting is returned which may be
+ * different from the requested input setting.
+ * NV0073_CTRL_DP_DATA_TARGET
+ * This field specifies which physical repeater or sink to be trained.
+ * Client should make sure
+ * 1. Physical repeater should be targeted in order, start from the one closest to GPU.
+ * 2. All physical repeater is properly trained before targets sink.
+ * The valid values for this field are:
+ * NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_X
+ * 'X' denotes physical repeater index. It's a 1-based index to
+ * reserve 0 for _SINK.
+ * 'X' can't be more than 8.
+ * NV0073_CTRL_DP_DATA_TARGET_SINK
+ * err
+ * This parameter specifies provides info regarding the outcome
+ * of this calling control call. If zero, no errors were found.
+ * Otherwise, this parameter will specify the error detected.
+ * The valid parameter is broken down as follows:
+ * NV0073_CTRL_DP_ERR_SET_LANE_COUNT
+ * If set to _ERR, set lane count failed.
+ * NV0073_CTRL_DP_ERR_SET_LINK_BANDWIDTH
+ * If set to _ERR, set link bandwidth failed.
+ * NV0073_CTRL_DP_ERR_DISABLE_DOWNSPREAD
+ * If set to _ERR, disable downspread failed.
+ * NV0073_CTRL_DP_ERR_INVALID_PARAMETER
+ * If set to _ERR, at least one of the calling functions
+ * failed due to an invalid parameter.
+ * NV0073_CTRL_DP_ERR_SET_LINK_TRAINING
+ * If set to _ERR, link training failed.
+ * NV0073_CTRL_DP_ERR_TRAIN_PHY_REPEATER
+ * If set to _ERR, the operation to Link Train repeater is failed.
+ * NV0073_CTRL_DP_ERR_ENABLE_FEC
+ * If set to _ERR, the operation to enable FEC is failed.
+ * retryTimeMs
+ * This parameter is an output to this command. In case of
+ * NVOS_STATUS_ERROR_RETRY return status, this parameter returns the time
+ * duration in milli-seconds after which client should retry this command.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NVOS_STATUS_ERROR_RETRY
+ */
+
+#define NV0073_CTRL_CMD_DP_CTRL (0x731343U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_CTRL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_CTRL_PARAMS_MESSAGE_ID (0x43U)
+
+typedef struct NV0073_CTRL_DP_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 cmd;
+ NvU32 data;
+ NvU32 err;
+ NvU32 retryTimeMs;
+ NvU32 eightLaneDpcdBaseAddr;
+} NV0073_CTRL_DP_CTRL_PARAMS;
+
+#define NV0073_CTRL_DP_CMD_SET_LANE_COUNT 0:0
+#define NV0073_CTRL_DP_CMD_SET_LANE_COUNT_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_SET_LANE_COUNT_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_SET_LINK_BW 1:1
+#define NV0073_CTRL_DP_CMD_SET_LINK_BW_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_SET_LINK_BW_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD 2:2
+#define NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_DISABLE_DOWNSPREAD_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_UNUSED 3:3
+#define NV0073_CTRL_DP_CMD_SET_FORMAT_MODE 4:4
+#define NV0073_CTRL_DP_CMD_SET_FORMAT_MODE_SINGLE_STREAM (0x00000000U)
+#define NV0073_CTRL_DP_CMD_SET_FORMAT_MODE_MULTI_STREAM (0x00000001U)
+#define NV0073_CTRL_DP_CMD_FAST_LINK_TRAINING 5:5
+#define NV0073_CTRL_DP_CMD_FAST_LINK_TRAINING_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_FAST_LINK_TRAINING_YES (0x00000001U)
+#define NV0073_CTRL_DP_CMD_NO_LINK_TRAINING 6:6
+#define NV0073_CTRL_DP_CMD_NO_LINK_TRAINING_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_NO_LINK_TRAINING_YES (0x00000001U)
+#define NV0073_CTRL_DP_CMD_SET_ENHANCED_FRAMING 7:7
+#define NV0073_CTRL_DP_CMD_SET_ENHANCED_FRAMING_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_SET_ENHANCED_FRAMING_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_USE_DOWNSPREAD_SETTING 8:8
+#define NV0073_CTRL_DP_CMD_USE_DOWNSPREAD_SETTING_DEFAULT (0x00000000U)
+#define NV0073_CTRL_DP_CMD_USE_DOWNSPREAD_SETTING_FORCE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_SKIP_HW_PROGRAMMING 9:9
+#define NV0073_CTRL_DP_CMD_SKIP_HW_PROGRAMMING_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_SKIP_HW_PROGRAMMING_YES (0x00000001U)
+#define NV0073_CTRL_DP_CMD_POST_LT_ADJ_REQ_GRANTED 10:10
+#define NV0073_CTRL_DP_CMD_POST_LT_ADJ_REQ_GRANTED_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_POST_LT_ADJ_REQ_GRANTED_YES (0x00000001U)
+#define NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING 12:11
+#define NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING_DONOT_TOGGLE_TRANSMISSION (0x00000001U)
+#define NV0073_CTRL_DP_CMD_FAKE_LINK_TRAINING_TOGGLE_TRANSMISSION_ON (0x00000002U)
+#define NV0073_CTRL_DP_CMD_TRAIN_PHY_REPEATER 13:13
+#define NV0073_CTRL_DP_CMD_TRAIN_PHY_REPEATER_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_TRAIN_PHY_REPEATER_YES (0x00000001U)
+#define NV0073_CTRL_DP_CMD_FALLBACK_CONFIG 14:14
+#define NV0073_CTRL_DP_CMD_FALLBACK_CONFIG_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_FALLBACK_CONFIG_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_ENABLE_FEC 15:15
+#define NV0073_CTRL_DP_CMD_ENABLE_FEC_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_ENABLE_FEC_TRUE (0x00000001U)
+
+#define NV0073_CTRL_DP_CMD_BANDWIDTH_TEST 29:29
+#define NV0073_CTRL_DP_CMD_BANDWIDTH_TEST_NO (0x00000000U)
+#define NV0073_CTRL_DP_CMD_BANDWIDTH_TEST_YES (0x00000001U)
+#define NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE 30:30
+#define NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_LINK_CONFIG_CHECK_DISABLE_TRUE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_DISABLE_LINK_CONFIG 31:31
+#define NV0073_CTRL_DP_CMD_DISABLE_LINK_CONFIG_FALSE (0x00000000U)
+#define NV0073_CTRL_DP_CMD_DISABLE_LINK_CONFIG_TRUE (0x00000001U)
+
+#define NV0073_CTRL_DP_DATA_SET_LANE_COUNT 4:0
+#define NV0073_CTRL_DP_DATA_SET_LANE_COUNT_0 (0x00000000U)
+#define NV0073_CTRL_DP_DATA_SET_LANE_COUNT_1 (0x00000001U)
+#define NV0073_CTRL_DP_DATA_SET_LANE_COUNT_2 (0x00000002U)
+#define NV0073_CTRL_DP_DATA_SET_LANE_COUNT_4 (0x00000004U)
+#define NV0073_CTRL_DP_DATA_SET_LANE_COUNT_8 (0x00000008U)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW 15:8
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_1_62GBPS (0x00000006U)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_2_16GBPS (0x00000008U)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_2_43GBPS (0x00000009U)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_2_70GBPS (0x0000000AU)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_3_24GBPS (0x0000000CU)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_4_32GBPS (0x00000010U)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_5_40GBPS (0x00000014U)
+#define NV0073_CTRL_DP_DATA_SET_LINK_BW_8_10GBPS (0x0000001EU)
+#define NV0073_CTRL_DP_DATA_SET_ENHANCED_FRAMING 18:18
+#define NV0073_CTRL_DP_DATA_SET_ENHANCED_FRAMING_NO (0x00000000U)
+#define NV0073_CTRL_DP_DATA_SET_ENHANCED_FRAMING_YES (0x00000001U)
+#define NV0073_CTRL_DP_DATA_TARGET 22:19
+#define NV0073_CTRL_DP_DATA_TARGET_SINK (0x00000000U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_0 (0x00000001U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_1 (0x00000002U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_2 (0x00000003U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_3 (0x00000004U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_4 (0x00000005U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_5 (0x00000006U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_6 (0x00000007U)
+#define NV0073_CTRL_DP_DATA_TARGET_PHY_REPEATER_7 (0x00000008U)
+
+#define NV0073_CTRL_DP_ERR_SET_LANE_COUNT 0:0
+#define NV0073_CTRL_DP_ERR_SET_LANE_COUNT_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_SET_LANE_COUNT_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_SET_LINK_BW 1:1
+#define NV0073_CTRL_DP_ERR_SET_LINK_BW_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_SET_LINK_BW_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_DISABLE_DOWNSPREAD 2:2
+#define NV0073_CTRL_DP_ERR_DISABLE_DOWNSPREAD_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_DISABLE_DOWNSPREAD_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_UNUSED 3:3
+#define NV0073_CTRL_DP_ERR_CLOCK_RECOVERY 4:4
+#define NV0073_CTRL_DP_ERR_CLOCK_RECOVERY_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_CLOCK_RECOVERY_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_CHANNEL_EQUALIZATION 5:5
+#define NV0073_CTRL_DP_ERR_CHANNEL_EQUALIZATION_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_CHANNEL_EQUALIZATION_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_TRAIN_PHY_REPEATER 6:6
+#define NV0073_CTRL_DP_ERR_TRAIN_PHY_REPEATER_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_TRAIN_PHY_REPEATER_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_ENABLE_FEC 7:7
+#define NV0073_CTRL_DP_ERR_ENABLE_FEC_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_ENABLE_FEC_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_CR_DONE_LANE 11:8
+#define NV0073_CTRL_DP_ERR_CR_DONE_LANE_0_LANE (0x00000000U)
+#define NV0073_CTRL_DP_ERR_CR_DONE_LANE_1_LANE (0x00000001U)
+#define NV0073_CTRL_DP_ERR_CR_DONE_LANE_2_LANE (0x00000002U)
+#define NV0073_CTRL_DP_ERR_CR_DONE_LANE_4_LANE (0x00000004U)
+#define NV0073_CTRL_DP_ERR_CR_DONE_LANE_8_LANE (0x00000008U)
+#define NV0073_CTRL_DP_ERR_EQ_DONE_LANE 15:12
+#define NV0073_CTRL_DP_ERR_EQ_DONE_LANE_0_LANE (0x00000000U)
+#define NV0073_CTRL_DP_ERR_EQ_DONE_LANE_1_LANE (0x00000001U)
+#define NV0073_CTRL_DP_ERR_EQ_DONE_LANE_2_LANE (0x00000002U)
+#define NV0073_CTRL_DP_ERR_EQ_DONE_LANE_4_LANE (0x00000004U)
+#define NV0073_CTRL_DP_ERR_EQ_DONE_LANE_8_LANE (0x00000008U)
+#define NV0073_CTRL_DP_ERR_INVALID_PARAMETER 30:30
+#define NV0073_CTRL_DP_ERR_INVALID_PARAMETER_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_INVALID_PARAMETER_ERR (0x00000001U)
+#define NV0073_CTRL_DP_ERR_LINK_TRAINING 31:31
+#define NV0073_CTRL_DP_ERR_LINK_TRAINING_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ERR_LINK_TRAINING_ERR (0x00000001U)
+
+/*
+ * NV0073_CTRL_DP_LANE_DATA_PARAMS
+ *
+ * This structure provides lane characteristics.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * numLanes
+ * Indicates number of lanes for which the data is valid
+ * data
+ * This parameter is an input to this command.
+ * Here are the current defined fields:
+ * NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS
+ * This field specifies the preemphasis level set in the lane.
+ * The valid values for this field are:
+ * NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_NONE
+ * No-preemphais for this lane.
+ * NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_LEVEL1
+ * Preemphasis set to 3.5 dB.
+ * NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_LEVEL2
+ * Preemphasis set to 6.0 dB.
+ * NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_LEVEL3
+ * Preemphasis set to 9.5 dB.
+ * NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT
+ * This field specifies the drive current set in the lane.
+ * The valid values for this field are:
+ * NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL0
+ * Drive current level is set to 8 mA
+ * NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL1
+ * Drive current level is set to 12 mA
+ * NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL2
+ * Drive current level is set to 16 mA
+ * NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL3
+ * Drive current level is set to 24 mA
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_MAX_LANES 8U
+
+typedef struct NV0073_CTRL_DP_LANE_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 numLanes;
+ NvU32 data[NV0073_CTRL_MAX_LANES];
+} NV0073_CTRL_DP_LANE_DATA_PARAMS;
+
+#define NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS 1:0
+#define NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_NONE (0x00000000U)
+#define NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_LEVEL1 (0x00000001U)
+#define NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_LEVEL2 (0x00000002U)
+#define NV0073_CTRL_DP_LANE_DATA_PREEMPHASIS_LEVEL3 (0x00000003U)
+#define NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT 3:2
+#define NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL0 (0x00000000U)
+#define NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL1 (0x00000001U)
+#define NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL2 (0x00000002U)
+#define NV0073_CTRL_DP_LANE_DATA_DRIVECURRENT_LEVEL3 (0x00000003U)
+
+/*
+ * NV0073_CTRL_CMD_GET_DP_LANE_DATA
+ *
+ * This command is used to get the current pre-emphasis and drive current
+ * level values for the specified number of lanes.
+ *
+ * The command takes a NV0073_CTRL_DP_LANE_DATA_PARAMS structure as the
+ * argument with the appropriate subDeviceInstance and displayId filled.
+ * The arguments of this structure and the format of preemphasis and drive-
+ * current levels are described above.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ * NOTE: This control call is only for testing purposes and
+ * should not be used in normal DP operations. Preemphais
+ * and drive current level will be set during Link training
+ * in normal DP operations
+ *
+ */
+
+#define NV0073_CTRL_CMD_DP_GET_LANE_DATA (0x731345U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | 0x45" */
+
+
+/*
+ * NV0073_CTRL_CMD_SET_DP_LANE_DATA
+ *
+ * This command is used to set the pre-emphasis and drive current
+ * level values for the specified number of lanes.
+ *
+ * The command takes a NV0073_CTRL_DP_LANE_DATA_PARAMS structure as the
+ * argument with the appropriate subDeviceInstance, displayId, number of
+ * lanes, preemphasis and drive current values filled in.
+ * The arguments of this structure and the format of preemphasis and drive-
+ * current levels are described above.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ * NOTE: This control call is only for testing purposes and
+ * should not be used in normal DP operations. Preemphais
+ * and drivecurrent will be set during Link training in
+ * normal DP operations
+ *
+ */
+
+#define NV0073_CTRL_CMD_DP_SET_LANE_DATA (0x731346U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | 0x46" */
+
+/*
+ * NV0073_CTRL_DP_CSTM
+ *
+ * This structure specifies the 80 bit DP CSTM Test Pattern data
+ * The fields of this structure are to be specified as follows:
+ * lower takes bits 31:0
+ * middle takes bits 63:32
+ * upper takes bits 79:64
+ *
+ */
+typedef struct NV0073_CTRL_DP_CSTM {
+ NvU32 lower;
+ NvU32 middle;
+ NvU32 upper;
+} NV0073_CTRL_DP_CSTM;
+
+/*
+ * NV0073_CTRL_DP_TESTPATTERN
+ *
+ * This structure specifies the possible test patterns available in
+ * display port. The field testPattern can be one of the following
+ * values.
+ * NV0073_CTRL_DP_SET_TESTPATTERN_DATA_NONE
+ * No test pattern on the main link
+ * NV0073_CTRL_DP_SET_TESTPATTERN_DATA_D10_2
+ * D10.2 pattern on the main link
+ * NV0073_CTRL_DP_SET_TESTPATTERN_DATA_SERMP
+ * SERMP pattern on main link
+ * NV0073_CTRL_DP_SET_TESTPATTERN_DATA_PRBS_7
+ * PRBS7 pattern on the main link
+ *
+ */
+
+typedef struct NV0073_CTRL_DP_TESTPATTERN {
+ NvU32 testPattern;
+} NV0073_CTRL_DP_TESTPATTERN;
+
+#define NV0073_CTRL_DP_TESTPATTERN_DATA 2:0
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_NONE (0x00000000U)
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_D10_2 (0x00000001U)
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_SERMP (0x00000002U)
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_PRBS_7 (0x00000003U)
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_CSTM (0x00000004U)
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_HBR2COMPLIANCE (0x00000005U)
+#define NV0073_CTRL_DP_TESTPATTERN_DATA_CP2520PAT3 (0x00000006U)
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_TESTPATTERN
+ *
+ * This command forces the main link to output the selected test patterns
+ * supported in DP specs.
+ *
+ * The command takes a NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS structure as the
+ * argument with the appropriate subDeviceInstance, displayId and test pattern
+ * to be set as inputs.
+ * The arguments of this structure and the format of test patterns are
+ * described above.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * testPattern
+ * This parameter is of type NV0073_CTRL_DP_TESTPATTERN and specifies
+ * the testpattern to set on displayport. The format of this structure
+ * is described above.
+ * laneMask
+ * This parameter specifies the bit mask of DP lanes on which test
+ * pattern is to be applied.
+ * lower
+ * This parameter specifies the lower 64 bits of the CSTM test pattern
+ * upper
+ * This parameter specifies the upper 16 bits of the CSTM test pattern
+ * bIsHBR2
+ * This Boolean parameter is set to TRUE if HBR2 compliance test is
+ * being performed.
+ * bSkipLaneDataOverride
+ * skip override of pre-emp and drive current
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ * NOTE: This control call is only for testing purposes and
+ * should not be used in normal DP operations. Preemphais
+ * and drivecurrent will be set during Link training in
+ * normal DP operations
+ *
+ */
+
+#define NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS_MESSAGE_ID (0x47U)
+
+typedef struct NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NV0073_CTRL_DP_TESTPATTERN testPattern;
+ NvU8 laneMask;
+ NV0073_CTRL_DP_CSTM cstm;
+ NvBool bIsHBR2;
+ NvBool bSkipLaneDataOverride;
+} NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_SET_TESTPATTERN (0x731347U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS_CSTM0 31:0
+#define NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS_CSTM1 63:32
+#define NV0073_CTRL_DP_SET_TESTPATTERN_PARAMS_CSTM2 15:0
+
+/*
+ * NV0073_CTRL_CMD_GET_DP_TESTPATTERN
+ *
+ * This command returns the current test pattern set on the main link of
+ * Display Port.
+ *
+ * The command takes a NV0073_CTRL_DP_GET_TESTPATTERN_PARAMS structure as the
+ * argument with the appropriate subDeviceInstance, displayId as inputs and
+ * returns the current test pattern in testPattern field of the structure.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * testPattern
+ * This parameter is of type NV0073_CTRL_DP_TESTPATTERN and specifies the
+ * testpattern set on displayport. The format of this structure is
+ * described above.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ * NOTE: This control call is only for testing purposes and
+ * should not be used in normal DP operations.
+ *
+ */
+
+#define NV0073_CTRL_DP_GET_TESTPATTERN_PARAMS_MESSAGE_ID (0x48U)
+
+typedef struct NV0073_CTRL_DP_GET_TESTPATTERN_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NV0073_CTRL_DP_TESTPATTERN testPattern;
+} NV0073_CTRL_DP_GET_TESTPATTERN_PARAMS;
+
+
+#define NV0073_CTRL_CMD_DP_GET_TESTPATTERN (0x731348U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_TESTPATTERN_PARAMS_MESSAGE_ID" */
+
+/*
+ * NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA
+ *
+ * This structure specifies the Pre-emphasis/Drive Current/Postcursor2/TxPu information
+ * for a display port device. These are the the current values that RM is
+ * using to map the levels for Pre-emphasis and Drive Current for Link
+ * Training.
+ * preEmphasis
+ * This field specifies the preemphasis values.
+ * driveCurrent
+ * This field specifies the driveCurrent values.
+ * postcursor2
+ * This field specifies the postcursor2 values.
+ * TxPu
+ * This field specifies the pull-up current source drive values.
+ */
+#define NV0073_CTRL_MAX_DRIVECURRENT_LEVELS 4U
+#define NV0073_CTRL_MAX_PREEMPHASIS_LEVELS 4U
+#define NV0073_CTRL_MAX_POSTCURSOR2_LEVELS 4U
+
+typedef struct NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_1 {
+ NvU32 preEmphasis;
+ NvU32 driveCurrent;
+ NvU32 postCursor2;
+ NvU32 TxPu;
+} NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_1;
+
+typedef NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_1 NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_SLICE1[NV0073_CTRL_MAX_PREEMPHASIS_LEVELS];
+
+typedef NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_SLICE1 NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_SLICE2[NV0073_CTRL_MAX_DRIVECURRENT_LEVELS];
+
+typedef NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_SLICE2 NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA[NV0073_CTRL_MAX_POSTCURSOR2_LEVELS];
+
+
+/*
+ * NV0073_CTRL_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA
+ *
+ * This command is used to override the Pre-emphasis/Drive Current/PostCursor2/TxPu
+ * data in the RM.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the digital display for which the
+ * data should be returned. The display ID must a digital display.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * dpData
+ * This parameter is of type NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA
+ * and specifies the Pre-emphasis/Drive Current/Postcursor2/TxPu information
+ * for a display port device.
+ * The command takes a NV0073_CTRL_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS
+ * structure as the argument with the appropriate subDeviceInstance, displayId,
+ * and dpData. The fields of this structure are described above.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+#define NV0073_CTRL_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS_MESSAGE_ID (0x51U)
+
+typedef struct NV0073_CTRL_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA dpData;
+} NV0073_CTRL_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA (0x731351U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_SET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS_MESSAGE_ID" */
+
+/*
+ * NV0073_CTRL_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA
+ *
+ * This command is used to get the Pre-emphasis/Drive Current/PostCursor2/TxPu data.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the digital display for which the
+ * data should be returned. The display ID must a digital display.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * The command takes a NV0073_CTRL_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS
+ * structure as the argument with the appropriate subDeviceInstance, displayId,
+ * and dpData. The fields of this structure are described above.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+#define NV0073_CTRL_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS_MESSAGE_ID (0x52U)
+
+typedef struct NV0073_CTRL_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NV0073_CTRL_DP_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA dpData;
+} NV0073_CTRL_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA (0x731352U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_PREEMPHASIS_DRIVECURRENT_POSTCURSOR2_DATA_PARAMS_MESSAGE_ID" */
+
+
+
+/*
+ * NV0073_CTRL_CMD_DP_MAIN_LINK_CTRL
+ *
+ * This command is used to set various Main Link configurations for
+ * the specified displayId such as powering up/down Main Link.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the DP display which owns
+ * the Main Link to be adjusted. The display ID must a DP display
+ * as determined with the NV0073_CTRL_CMD_SPECIFIC_GET_TYPE command.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * ctrl
+ * Here are the current defined fields:
+ * NV0073_CTRL_DP_MAIN_LINK_CTRL_POWER_STATE_POWERDOWN
+ * This value will power down Main Link.
+ * NV0073_CTRL_DP_MAIN_LINK_CTRL_POWER_STATE_POWERUP
+ * This value will power up Main Link.
+ *
+*/
+#define NV0073_CTRL_CMD_DP_MAIN_LINK_CTRL (0x731356U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_MAIN_LINK_CTRL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_MAIN_LINK_CTRL_PARAMS_MESSAGE_ID (0x56U)
+
+typedef struct NV0073_CTRL_DP_MAIN_LINK_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 ctrl;
+} NV0073_CTRL_DP_MAIN_LINK_CTRL_PARAMS;
+
+#define NV0073_CTRL_DP_MAIN_LINK_CTRL_POWER_STATE 0:0
+#define NV0073_CTRL_DP_MAIN_LINK_CTRL_POWER_STATE_POWERDOWN (0x00000000U)
+#define NV0073_CTRL_DP_MAIN_LINK_CTRL_POWER_STATE_POWERUP (0x00000001U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_DP_GET_AUDIO_MUTESTREAM
+ *
+ * This command returns the current audio mute state on the main link of Display Port
+ *
+ * The command takes a NV0073_CTRL_DP_GET_AUDIO_MUTESTREAM_PARAMS structure as the
+ * argument with the appropriate subDeviceInstance, displayId as inputs and returns the
+ * current mute status in mute field of the structure.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the audio stream
+ * state should be returned. The display ID must a DP display.
+ * If the display ID is invalid or if it is not a DP display,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * mute
+ * This parameter will return one of the following values:
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_DISABLE
+ * Audio mute is currently disabled.
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_ENABLE
+ * Audio mute is currently enabled.
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_AUTO
+ * Audio mute is automatically controlled by hardware.
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_UNKNOWN
+ * Audio mute is currently in an unknown state.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ *
+ */
+#define NV0073_CTRL_CMD_DP_GET_AUDIO_MUTESTREAM (0x731358U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_AUDIO_MUTESTREAM_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_GET_AUDIO_MUTESTREAM_PARAMS_MESSAGE_ID (0x58U)
+
+typedef struct NV0073_CTRL_DP_GET_AUDIO_MUTESTREAM_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 mute;
+} NV0073_CTRL_DP_GET_AUDIO_MUTESTREAM_PARAMS;
+
+#define NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_DISABLE (0x00000000U)
+#define NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_ENABLE (0x00000001U)
+#define NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_AUTO (0x00000002U)
+#define NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_UNKNOWN (0x00000003U)
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_AUDIO_MUTESTREAM
+ *
+ * This command sets the current audio mute state on the main link of Display Port
+ *
+ * The command takes a NV0073_CTRL_DP_SET_AUDIO_MUTESTREAM_PARAMS structure as the
+ * argument with the appropriate subDeviceInstance, displayId as inputs and whether to enable
+ * or disable mute in the parameter - mute.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the audio stream
+ * state should be returned. The display ID must a DP display.
+ * If the display ID is invalid or if it is not a DP display,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * mute
+ * This parameter is an input to this command.
+ * Here are the current defined values:
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_DISABLE
+ * Audio mute will be disabled.
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_ENABLE
+ * Audio mute will be enabled.
+ * NV0073_CTRL_DP_AUDIO_MUTESTREAM_MUTE_AUTO
+ * Audio mute will be automatically controlled by hardware.
+ *
+ * Note: Any other value for mute in NV0073_CTRL_DP_SET_AUDIO_MUTESTREAM_PARAMS is not allowed and
+ * the API will return an error.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SET_AUDIO_MUTESTREAM (0x731359U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_SET_AUDIO_MUTESTREAM_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_SET_AUDIO_MUTESTREAM_PARAMS_MESSAGE_ID (0x59U)
+
+typedef struct NV0073_CTRL_DP_SET_AUDIO_MUTESTREAM_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 mute;
+} NV0073_CTRL_DP_SET_AUDIO_MUTESTREAM_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_ASSR_CTRL
+ *
+ * This command is used to control and query DisplayPort ASSR
+ * settings for the specified displayId.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the DP display which owns
+ * the Main Link to be adjusted. The display ID must a DP display
+ * as determined with the NV0073_CTRL_CMD_SPECIFIC_GET_TYPE command.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * cmd
+ * This input parameter specifies the command to execute. Legal
+ * values for this parameter include:
+ * NV0073_CTRL_DP_ASSR_CMD_QUERY_STATE
+ * This field can be used to query ASSR state. When used the ASSR
+ * state value is returned in the data parameter.
+ * NV0073_CTRL_DP_ASSR_CMD_DISABLE
+ * This field can be used to control the ASSR disable state.
+ * NV0073_CTRL_DP_ASSR_CMD_FORCE_STATE
+ * This field can be used to control ASSR State without looking at
+ * whether the display supports it. Used in conjunction with
+ * Fake link training. Note that this updates the state on the
+ * source side only. The sink is assumed to be configured for ASSR
+ * by the client (DD).
+ * data
+ * This parameter specifies the data associated with the cmd
+ * parameter.
+ * NV0073_CTRL_DP_ASSR_DATA_STATE_ENABLED
+ * This field indicates the state of ASSR when queried using cmd
+ * parameter. When used to control the State, it indicates whether
+ * ASSR should be enabled or disabled.
+ * NV0073_CTRL_DP_ASSR_DATA_STATE_ENABLED_NO
+ * When queried this flag indicates that ASSR is not enabled on the sink.
+ * When used as the data for CMD_FORCE_STATE, it requests ASSR to
+ * to be disabled on the source side.
+ * NV0073_CTRL_DP_ASSR_DATA_STATE_ENABLED_YES
+ * When queried this flag indicates that ASSR is not enabled on the sink.
+ * When used as the data for CMD_FORCE_STATE, it requests ASSR to
+ * to be enabled on the source side.
+ * err
+ * This output parameter specifies any errors associated with the cmd
+ * parameter.
+ * NV0073_CTRL_DP_ASSR_ERR_CAP
+ * This field indicates the error pertaining to ASSR capability of
+ * the sink device.
+ * NV0073_CTRL_DP_ASSR_ERR_CAP_NOERR
+ * This flag indicates there is no error.
+ * NV0073_CTRL_DP_ASSR_ERR_CAP_ERR
+ * This flag indicates that the sink is not ASSR capable.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+#define NV0073_CTRL_CMD_DP_ASSR_CTRL (0x73135aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_ASSR_CTRL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_ASSR_CTRL_PARAMS_MESSAGE_ID (0x5AU)
+
+typedef struct NV0073_CTRL_DP_ASSR_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 cmd;
+ NvU32 data;
+ NvU32 err;
+} NV0073_CTRL_DP_ASSR_CTRL_PARAMS;
+
+#define NV0073_CTRL_DP_ASSR_CMD 31:0
+#define NV0073_CTRL_DP_ASSR_CMD_QUERY_STATE (0x00000001U)
+#define NV0073_CTRL_DP_ASSR_CMD_DISABLE (0x00000002U)
+#define NV0073_CTRL_DP_ASSR_CMD_FORCE_STATE (0x00000003U)
+#define NV0073_CTRL_DP_ASSR_CMD_ENABLE (0x00000004U)
+#define NV0073_CTRL_DP_ASSR_DATA_STATE_ENABLED 0:0
+#define NV0073_CTRL_DP_ASSR_DATA_STATE_ENABLED_NO (0x00000000U)
+#define NV0073_CTRL_DP_ASSR_DATA_STATE_ENABLED_YES (0x00000001U)
+#define NV0073_CTRL_DP_ASSR_ERR_CAP 0:0
+#define NV0073_CTRL_DP_ASSR_ERR_CAP_NOERR (0x00000000U)
+#define NV0073_CTRL_DP_ASSR_ERR_CAP_ERR (0x00000001U)
+
+/*
+ * NV0073_CTRL_CMD_DP_TOPOLOGY_ALLOCATE_DISPLAYID
+ *
+ * This command is used to assign a displayId from the free pool
+ * to a specific AUX Address in a DP 1.2 topology. The topology
+ * is uniquely identified by the DisplayId of the DP connector.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This is the DisplayId of the DP connector to which the topology
+ * is rooted.
+ * preferredDisplayId
+ * Client can sent a preferredDisplayID which RM can use during allocation
+ * if available. If this Id is a part of allDisplayMask in RM then we return
+ * a free available Id to the client. However, if this is set to
+ * NV0073_CTRL_CMD_DP_INVALID_PREFERRED_DISPLAY_ID then we return allDisplayMask value.
+ * useBFM
+ * Set to true if DP-BFM is used during emulation/RTL Sim.
+ *
+ * [out] displayIdAssigned
+ * This is the out field that will receive the new displayId. If the
+ * function fails this is guaranteed to be 0.
+ * [out] allDisplayMask
+ * This is allDisplayMask RM variable which is returned only when
+ * preferredDisplayId is set to NV0073_CTRL_CMD_DP_INVALID_PREFERRED_DISPLAY_ID
+ *
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ *
+ */
+#define NV0073_CTRL_CMD_DP_TOPOLOGY_ALLOCATE_DISPLAYID (0x73135bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_TOPOLOGY_ALLOCATE_DISPLAYID_PARAMS_MESSAGE_ID" */
+
+/*
+ * There cannot be more than 128 devices in a topology (also by DP 1.2 specification)
+ * NOTE: Temporarily lowered to pass XAPI RM tests. Should be reevaluated!
+ */
+#define NV0073_CTRL_CMD_DP_MAX_TOPOLOGY_NODES 120U
+#define NV0073_CTRL_CMD_DP_INVALID_PREFERRED_DISPLAY_ID 0xffffffffU
+
+#define NV0073_CTRL_CMD_DP_TOPOLOGY_ALLOCATE_DISPLAYID_PARAMS_MESSAGE_ID (0x5BU)
+
+typedef struct NV0073_CTRL_CMD_DP_TOPOLOGY_ALLOCATE_DISPLAYID_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 preferredDisplayId;
+
+ NvBool force;
+ NvBool useBFM;
+
+ NvU32 displayIdAssigned;
+ NvU32 allDisplayMask;
+} NV0073_CTRL_CMD_DP_TOPOLOGY_ALLOCATE_DISPLAYID_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_TOPOLOGY_FREE_DISPLAYID
+ *
+ * This command is used to return a multistream displayid to the unused pool.
+ * You must not call this function while either the ARM or ASSEMBLY state cache
+ * refers to this display-id. The head must not be attached.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This is the displayId to free.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ *
+ *
+ */
+#define NV0073_CTRL_CMD_DP_TOPOLOGY_FREE_DISPLAYID (0x73135cU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_TOPOLOGY_FREE_DISPLAYID_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_TOPOLOGY_FREE_DISPLAYID_PARAMS_MESSAGE_ID (0x5CU)
+
+typedef struct NV0073_CTRL_CMD_DP_TOPOLOGY_FREE_DISPLAYID_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+} NV0073_CTRL_CMD_DP_TOPOLOGY_FREE_DISPLAYID_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_DP_GET_LINK_CONFIG
+ *
+ * This command is used to query DisplayPort link config
+ * settings on the transmitter side.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the DP display which owns
+ * the Main Link to be queried.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * laneCount
+ * Number of lanes the DP transmitter hardware is set up to drive.
+ * linkBW
+ * The BW of each lane that the DP transmitter hardware is set up to drive.
+ * The values returned will be according to the DP specifications.
+ *
+ */
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG (0x731360U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_LINK_CONFIG_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_GET_LINK_CONFIG_PARAMS_MESSAGE_ID (0x60U)
+
+typedef struct NV0073_CTRL_DP_GET_LINK_CONFIG_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 laneCount;
+ NvU32 linkBW;
+} NV0073_CTRL_DP_GET_LINK_CONFIG_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LANE_COUNT 3:0
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LANE_COUNT_0 (0x00000000U)
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LANE_COUNT_1 (0x00000001U)
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LANE_COUNT_2 (0x00000002U)
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LANE_COUNT_4 (0x00000004U)
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LINK_BW 3:0
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LINK_BW_1_62GBPS (0x00000006U)
+#define NV0073_CTRL_CMD_DP_GET_LINK_CONFIG_LINK_BW_2_70GBPS (0x0000000aU)
+
+/*
+ * NV0073_CTRL_CMD_DP_GET_EDP_DATA
+ *
+ * This command is used to query Embedded DisplayPort information.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the eDP display which owns
+ * the Main Link to be queried.
+ * If more than one displayId bit is set or the displayId is not a eDP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * data
+ * This output parameter specifies the data associated with the eDP display.
+ * It is only valid if this function returns NV_OK.
+ * NV0073_CTRL_CMD_DP_GET_EDP_DATA_PANEL_POWER
+ * This field indicates the state of the eDP panel power.
+ * NV0073_CTRL_CMD_DP_GET_EDP_DATA_PANEL_POWER_OFF
+ * This eDP panel is powered off.
+ * NV0073_CTRL_CMD_DP_GET_EDP_DATA_PANEL_POWER_ON
+ * This eDP panel is powered on.
+ * NV0073_CTRL_CMD_DP_GET_EDP_DATA_DPCD_POWER_OFF
+ * This field tells the client if DPCD power off command
+ * should be used for the current eDP panel.
+ * NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_OFF_ENABLE
+ * This eDP panel can use DPCD to power off the panel.
+ * NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_OFF_DISABLE
+ * This eDP panel cannot use DPCD to power off the panel.
+ * NV0073_CTRL_DP_GET_EDP_DATA_DPCD_SET_POWER
+ * This field tells the client current eDP panel DPCD SET_POWER (0x600) status
+ * NV0073_CTRL_DP_GET_EDP_DATA_DPCD_SET_POWER_D0
+ * This eDP panel is current up and in full power mode.
+ * NV0073_CTRL_DP_GET_EDP_DATA_DPCD_SET_POWER_D3
+ * This eDP panel is current standby.
+ */
+#define NV0073_CTRL_CMD_DP_GET_EDP_DATA (0x731361U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_EDP_DATA_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_GET_EDP_DATA_PARAMS_MESSAGE_ID (0x61U)
+
+typedef struct NV0073_CTRL_DP_GET_EDP_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 data;
+} NV0073_CTRL_DP_GET_EDP_DATA_PARAMS;
+
+#define NV0073_CTRL_DP_GET_EDP_DATA_PANEL_POWER 0:0
+#define NV0073_CTRL_DP_GET_EDP_DATA_PANEL_POWER_OFF (0x00000000U)
+#define NV0073_CTRL_DP_GET_EDP_DATA_PANEL_POWER_ON (0x00000001U)
+#define NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_OFF 1:1
+#define NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_OFF_ENABLE (0x00000000U)
+#define NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_OFF_DISABLE (0x00000001U)
+#define NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_STATE 2:2
+#define NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_STATE_D0 (0x00000000U)
+#define NV0073_CTRL_DP_GET_EDP_DATA_DPCD_POWER_STATE_D3 (0x00000001U)
+/*
+ * NV0073_CTRL_CMD_DP_CONFIG_STREAM
+ *
+ * This command sets various multi/single stream related params for
+ * for a given head.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * Head
+ * Specifies the head index for the stream.
+ * sorIndex
+ * Specifies the SOR index for the stream.
+ * dpLink
+ * Specifies the DP link: either 0 or 1 (A , B)
+ * bEnableOverride
+ * Specifies whether we're manually configuring this stream.
+ * If not set, none of the remaining settings have any effect.
+ * bMST
+ * Specifies whether in Multistream or Singlestream mode.
+ * MST/SST
+ * Structures for passing in either Multistream or Singlestream params
+ * slotStart
+ * Specifies the start value of the timeslot
+ * slotEnd
+ * Specifies the end value of the timeslot
+ * PBN
+ * Specifies the PBN for the timeslot.
+ * minHBlank
+ * Specifies the min HBlank
+ * minVBlank
+ * Specifies the min VBlank
+ * sendACT -- deprecated. A new control call has been added.
+ * Specifies whether ACT has to be sent or not.
+ * tuSize
+ * Specifies TU size value
+ * watermark
+ * Specifies stream watermark.
+ * linkClkFreqHz -- moving to MvidWarParams. Use that instead.
+ * Specifies the link freq in Hz. Note that this is the byte clock.
+ * eg: = (5.4 Ghz / 10)
+ * actualPclkHz; -- moving to MvidWarParams. Use that instead.
+ * Specifies the actual pclk freq in Hz.
+ * mvidWarEnabled
+ * Specifies whether MVID WAR is enabled.
+ * MvidWarParams
+ * Is valid if mvidWarEnabled is true.
+ * bEnableTwoHeadOneOr
+ * Whether two head one OR is enabled. If this is set then RM will
+ * replicate SF settings of Master head on Slave head. Head index
+ * passed should be of Master Head.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_GENERIC: when this command has already been called
+ *
+ */
+#define NV0073_CTRL_CMD_DP_CONFIG_STREAM (0x731362U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_CONFIG_STREAM_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_CONFIG_STREAM_PARAMS_MESSAGE_ID (0x62U)
+
+typedef struct NV0073_CTRL_CMD_DP_CONFIG_STREAM_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvU32 sorIndex;
+ NvU32 dpLink;
+
+ NvBool bEnableOverride;
+ NvBool bMST;
+ NvU32 singleHeadMultistreamMode;
+ NvU32 hBlankSym;
+ NvU32 vBlankSym;
+ NvU32 colorFormat;
+ NvBool bEnableTwoHeadOneOr;
+
+ struct {
+ NvU32 slotStart;
+ NvU32 slotEnd;
+ NvU32 PBN;
+ NvU32 Timeslice;
+ NvBool sendACT; // deprecated -Use NV0073_CTRL_CMD_DP_SEND_ACT
+ NvU32 singleHeadMSTPipeline;
+ NvBool bEnableAudioOverRightPanel;
+ } MST;
+
+ struct {
+ NvBool bEnhancedFraming;
+ NvU32 tuSize;
+ NvU32 waterMark;
+ NvU32 actualPclkHz; // deprecated -Use MvidWarParams
+ NvU32 linkClkFreqHz; // deprecated -Use MvidWarParams
+ NvBool bEnableAudioOverRightPanel;
+ struct {
+ NvU32 activeCnt;
+ NvU32 activeFrac;
+ NvU32 activePolarity;
+ NvBool mvidWarEnabled;
+ struct {
+ NvU32 actualPclkHz;
+ NvU32 linkClkFreqHz;
+ } MvidWarParams;
+ } Legacy;
+ } SST;
+} NV0073_CTRL_CMD_DP_CONFIG_STREAM_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_RATE_GOV
+ *
+ * This command enables rate governing for a MST.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * Head
+ * Specifies the head index for the stream.
+ * sorIndex
+ * Specifies the SOR index for the stream.
+ * flags
+ * Specifies Rate Governing, trigger type and wait on trigger and operation type.
+ *
+ * _FLAGS_OPERATION: whether this control call should program or check for status of previous operation.
+ *
+ * _FLAGS_STATUS: Out only. Caller should check the status for _FLAGS_OPERATION_CHECK_STATUS through
+ * this bit.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_GENERIC: when this command has already been called
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV (0x731363U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_RATE_GOV_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_PARAMS_MESSAGE_ID (0x63U)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_RATE_GOV_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvU32 sorIndex;
+ NvU32 flags;
+} NV0073_CTRL_CMD_DP_SET_RATE_GOV_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_ENABLE_RG 0:0
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_ENABLE_RG_OFF (0x00000000U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_ENABLE_RG_ON (0x00000001U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_TRIGGER_MODE 1:1
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_TRIGGER_MODE_LOADV (0x00000000U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_TRIGGER_MODE_IMMEDIATE (0x00000001U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_WAIT_TRIGGER 2:2
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_WAIT_TRIGGER_OFF (0x00000000U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_WAIT_TRIGGER_ON (0x00000001U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_OPERATION 3:3
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_OPERATION_PROGRAM (0x00000000U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_OPERATION_CHECK_STATUS (0x00000001U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_STATUS 31:31
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_STATUS_FAIL (0x00000000U)
+#define NV0073_CTRL_CMD_DP_SET_RATE_GOV_FLAGS_STATUS_PASS (0x00000001U)
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_MANUAL_DISPLAYPORT
+ *
+ * This call is used by the displayport library. Once
+ * all of the platforms have ported, this call will be
+ * deprecated and made the default behavior.
+ *
+ * Disables automatic watermark programming
+ * Disables automatic DP IRQ handling (CP IRQ)
+ * Disables automatic retry on defers
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ *
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SET_MANUAL_DISPLAYPORT (0x731365U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_MANUAL_DISPLAYPORT_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_MANUAL_DISPLAYPORT_PARAMS_MESSAGE_ID (0x65U)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_MANUAL_DISPLAYPORT_PARAMS {
+ NvU32 subDeviceInstance;
+} NV0073_CTRL_CMD_DP_SET_MANUAL_DISPLAYPORT_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_ECF
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * sorIndex
+ * This parameter specifies the Index of sor for which ecf
+ * should be updated.
+ * ecf
+ * This parameter has the ECF bit mask.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SET_ECF (0x731366U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_ECF_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_ECF_PARAMS_MESSAGE_ID (0x66U)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_ECF_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 sorIndex;
+ NV_DECLARE_ALIGNED(NvU64 ecf, 8);
+ NvBool bForceClearEcf;
+ NvBool bAddStreamBack;
+} NV0073_CTRL_CMD_DP_SET_ECF_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_SEND_ACT
+ *
+ * This command sends ACT.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ *
+ * displayId
+ * Specifies the root port displayId for which the trigger has to be done.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_GENERIC: when this command has already been called
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SEND_ACT (0x731367U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SEND_ACT_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SEND_ACT_PARAMS_MESSAGE_ID (0x67U)
+
+typedef struct NV0073_CTRL_CMD_DP_SEND_ACT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+} NV0073_CTRL_CMD_DP_SEND_ACT_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_DP_GET_CAPS
+ *
+ * This command returns the following info
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * sorIndex
+ * Specifies the SOR index.
+ * dpVersionsSupported
+ * Specified the DP versions supported by the GPU
+ * bIsMultistreamSupported
+ * Returns NV_TRUE if MST is supported by the GPU else NV_FALSE
+ * bIsSCEnabled
+ * Returns NV_TRUE if Stream cloning is supported by the GPU else NV_FALSE
+ * maxLinkRate
+ * Returns Maximum allowed orclk for DP mode of SOR
+ * 1 signifies 5.40(HBR2), 2 signifies 2.70(HBR), 3 signifies 1.62(RBR)
+ * bHasIncreasedWatermarkLimits
+ * Returns NV_TRUE if the GPU uses higher watermark limits, else NV_FALSE
+ * bIsPC2Disabled
+ * Returns NV_TRUE if VBIOS flag to disable PostCursor2 is set, else NV_FALSE
+ * bFECSupported
+ * Returns NV_TRUE if GPU supports FEC, else NV_FALSE
+ * bIsTrainPhyRepeater
+ * Returns NV_TRUE if LTTPR Link Training feature is set
+ * bOverrideLinkBw
+ * Returns NV_TRUE if DFP limits defined in DCB have to be honored, else NV_FALSE
+ *
+ * DSC caps -
+ * bDscSupported
+ * If GPU supports DSC or not
+ *
+ * encoderColorFormatMask
+ * Mask of all color formats for which DSC
+ * encoding is supported by GPU
+ *
+ * lineBufferSizeKB
+ * Size of line buffer.
+ *
+ * rateBufferSizeKB
+ * Size of rate buffer per slice.
+ *
+ * bitsPerPixelPrecision
+ * Bits per pixel precision for DSC e.g. 1/16, 1/8, 1/4, 1/2, 1bpp
+ *
+ * maxNumHztSlices
+ * Maximum number of horizontal slices supported by DSC encoder
+ *
+ * lineBufferBitDepth
+ * Bit depth used by the GPU to store the reconstructed pixels within
+ * the line buffer
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ *
+ */
+
+#define NV0073_CTRL_CMD_DP_GET_CAPS (0x731369U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS_MESSAGE_ID (0x69U)
+
+typedef struct NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 sorIndex;
+ NvU32 maxLinkRate;
+ NvU32 dpVersionsSupported;
+ NvBool bIsMultistreamSupported;
+ NvBool bIsSCEnabled;
+ NvBool bHasIncreasedWatermarkLimits;
+ NvBool bIsPC2Disabled;
+ NvBool isSingleHeadMSTSupported;
+ NvBool bFECSupported;
+ NvBool bIsTrainPhyRepeater;
+ NvBool bOverrideLinkBw;
+
+ struct {
+ NvBool bDscSupported;
+ NvU32 encoderColorFormatMask;
+ NvU32 lineBufferSizeKB;
+ NvU32 rateBufferSizeKB;
+ NvU32 bitsPerPixelPrecision;
+ NvU32 maxNumHztSlices;
+ NvU32 lineBufferBitDepth;
+ } DSC;
+} NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DP_VERSIONS_SUPPORTED_DP1_2 0:0
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DP_VERSIONS_SUPPORTED_DP1_2_NO (0x00000000U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DP_VERSIONS_SUPPORTED_DP1_2_YES (0x00000001U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DP_VERSIONS_SUPPORTED_DP1_4 1:1
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DP_VERSIONS_SUPPORTED_DP1_4_NO (0x00000000U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DP_VERSIONS_SUPPORTED_DP1_4_YES (0x00000001U)
+
+
+
+#define NV0073_CTRL_CMD_DP_GET_CAPS_MAX_LINK_RATE 2:0
+#define NV0073_CTRL_CMD_DP_GET_CAPS_MAX_LINK_RATE_NONE (0x00000000U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_MAX_LINK_RATE_1_62 (0x00000001U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_MAX_LINK_RATE_2_70 (0x00000002U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_MAX_LINK_RATE_5_40 (0x00000003U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_MAX_LINK_RATE_8_10 (0x00000004U)
+
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_ENCODER_COLOR_FORMAT_RGB (0x00000001U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_ENCODER_COLOR_FORMAT_Y_CB_CR_444 (0x00000002U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_ENCODER_COLOR_FORMAT_Y_CB_CR_NATIVE_422 (0x00000004U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_ENCODER_COLOR_FORMAT_Y_CB_CR_NATIVE_420 (0x00000008U)
+
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_BITS_PER_PIXEL_PRECISION_1_16 (0x00000001U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_BITS_PER_PIXEL_PRECISION_1_8 (0x00000002U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_BITS_PER_PIXEL_PRECISION_1_4 (0x00000003U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_BITS_PER_PIXEL_PRECISION_1_2 (0x00000004U)
+#define NV0073_CTRL_CMD_DP_GET_CAPS_DSC_BITS_PER_PIXEL_PRECISION_1 (0x00000005U)
+
+#define NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES (0x73136aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_MSA_PROPERTIES_SYNC_POLARITY_LOW (0U)
+#define NV0073_CTRL_CMD_DP_MSA_PROPERTIES_SYNC_POLARITY_HIGH (1U)
+
+typedef struct NV0073_CTRL_DP_MSA_PROPERTIES_MASK {
+ NvU8 miscMask[2];
+ NvBool bRasterTotalHorizontal;
+ NvBool bRasterTotalVertical;
+ NvBool bActiveStartHorizontal;
+ NvBool bActiveStartVertical;
+ NvBool bSurfaceTotalHorizontal;
+ NvBool bSurfaceTotalVertical;
+ NvBool bSyncWidthHorizontal;
+ NvBool bSyncPolarityHorizontal;
+ NvBool bSyncHeightVertical;
+ NvBool bSyncPolarityVertical;
+ NvBool bReservedEnable[3];
+} NV0073_CTRL_DP_MSA_PROPERTIES_MASK;
+
+typedef struct NV0073_CTRL_DP_MSA_PROPERTIES_VALUES {
+ NvU8 misc[2];
+ NvU16 rasterTotalHorizontal;
+ NvU16 rasterTotalVertical;
+ NvU16 activeStartHorizontal;
+ NvU16 activeStartVertical;
+ NvU16 surfaceTotalHorizontal;
+ NvU16 surfaceTotalVertical;
+ NvU16 syncWidthHorizontal;
+ NvU16 syncPolarityHorizontal;
+ NvU16 syncHeightVertical;
+ NvU16 syncPolarityVertical;
+ NvU8 reserved[3];
+} NV0073_CTRL_DP_MSA_PROPERTIES_VALUES;
+
+#define NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS_MESSAGE_ID (0x6AU)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bEnableMSA;
+ NvBool bStereoPhaseInverse;
+ NvBool bCacheMsaOverrideForNextModeset;
+ NV0073_CTRL_DP_MSA_PROPERTIES_MASK featureMask;
+ NV0073_CTRL_DP_MSA_PROPERTIES_VALUES featureValues;
+ NV_DECLARE_ALIGNED(struct NV0073_CTRL_DP_MSA_PROPERTIES_VALUES *pFeatureDebugValues, 8);
+} NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT
+ *
+ * This command can be used to invoke a fake interrupt for the operation of DP1.2 branch device
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * interruptType
+ * This parameter specifies the type of fake interrupt to be invoked. Possible values are:
+ * 0 => IRQ
+ * 1 => HPDPlug
+ * 2 => HPDUnPlug
+ * displayId
+ * should be for DP only
+ *
+ */
+
+#define NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT (0x73136bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_PARAMS_MESSAGE_ID (0x6BU)
+
+typedef struct NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 interruptType;
+} NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_IRQ (0x00000000U)
+#define NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_PLUG (0x00000001U)
+#define NV0073_CTRL_CMD_DP_GENERATE_FAKE_INTERRUPT_UNPLUG (0x00000002U)
+
+/*
+ * NV0073_CTRL_CMD_DP_CONFIG_RAD_SCRATCH_REG
+ *
+ * This command sets the MS displayId lit up by driver for further use of VBIOS
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * should be for DP only
+ * activeDevAddr
+ * Active MS panel address
+ * sorIndex
+ * SOR Index
+ * dpLink
+ * DP Sub Link Index
+ * hopCount
+ * Maximum hopcounts in MS address
+ * dpMsDevAddrState
+ * DP Multistream Device Address State. The values can be
+ *
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_TIMEOUT
+ *
+ */
+#define NV0073_CTRL_CMD_DP_CONFIG_RAD_SCRATCH_REG (0x73136cU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_CONFIG_RAD_SCRATCH_REG_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_CONFIG_RAD_SCRATCH_REG_PARAMS_MESSAGE_ID (0x6CU)
+
+typedef struct NV0073_CTRL_CMD_DP_CONFIG_RAD_SCRATCH_REG_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 activeDevAddr;
+ NvU32 sorIndex;
+ NvU32 dpLink;
+ NvU32 hopCount;
+ NvU32 dpMsDevAddrState;
+} NV0073_CTRL_CMD_DP_CONFIG_RAD_SCRATCH_REG_PARAMS;
+
+
+
+/*
+* NV0073_CTRL_CMD_DP_SET_TRIGGER_SELECT
+*
+* This command configures a new bit, NV_PDISP_SF_DP_LINKCTL_TRIGGER_SELECT
+* to indicate which pipeline will handle the
+* time slots allocation in single head MST mode
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed. This parameter must specify a value between zero and the
+* total number of subdevices within the parent device. This parameter
+* should be set to zero for default behavior
+* Head
+* Specifies the head index for the stream
+* sorIndex
+* Specifies the SOR index for the stream
+* streamIndex
+* Stream Identifier
+*
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_GENERIC: when this command has already been called
+*
+*/
+#define NV0073_CTRL_CMD_DP_SET_TRIGGER_SELECT (0x73136fU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_TRIGGER_SELECT_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_TRIGGER_SELECT_PARAMS_MESSAGE_ID (0x6FU)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_TRIGGER_SELECT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvU32 sorIndex;
+ NvU32 singleHeadMSTPipeline;
+} NV0073_CTRL_CMD_DP_SET_TRIGGER_SELECT_PARAMS;
+
+/*
+* NV0073_CTRL_CMD_DP_CONFIG_SINGLE_HEAD_MULTI_STREAM
+*
+* This call is used by the displayport library.& clients of RM
+* Its main function is to configure single Head Multi stream mode
+ * this call configures internal RM datastructures to support required mode.
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed. This parameter must specify a value between zero and the
+* total number of subdevices within the parent device. This parameter
+* should be set to zero for default behavior.
+*
+* displayIDs
+* This parameter specifies array of DP displayIds to be configured which are driven out from a single head.
+*
+* numStreams
+* This parameter specifies number of streams driven from a single head
+* ex: for 2SST & 2MST its value is 2.
+*
+* mode
+* This parameter specifies single head multi stream mode to be configured.
+*
+* bSetConfigure
+* This parameter configures single head multistream mode
+* if TRUE it sets SST or MST based on 'mode' parameter and updates internal driver data structures with the given information.
+* if FALSE clears the configuration of single head multi stream mode.
+*
+* vbiosPrimaryDispIdIndex
+* This parameter specifies vbios master displayID index in displayIDs input array.
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_NOT_SUPPORTED
+*
+*/
+#define NV0073_CTRL_CMD_DP_CONFIG_SINGLE_HEAD_MULTI_STREAM (0x73136eU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_CONFIG_SINGLE_HEAD_MULTI_STREAM_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SINGLE_HEAD_MAX_STREAMS (0x00000002U)
+#define NV0073_CTRL_CMD_DP_CONFIG_SINGLE_HEAD_MULTI_STREAM_PARAMS_MESSAGE_ID (0x6EU)
+
+typedef struct NV0073_CTRL_CMD_DP_CONFIG_SINGLE_HEAD_MULTI_STREAM_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayIDs[NV0073_CTRL_CMD_DP_SINGLE_HEAD_MAX_STREAMS];
+ NvU32 numStreams;
+ NvU32 mode;
+ NvBool bSetConfig;
+ NvU8 vbiosPrimaryDispIdIndex;
+} NV0073_CTRL_CMD_DP_CONFIG_SINGLE_HEAD_MULTI_STREAM_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_SINGLE_HEAD_MULTI_STREAM_NONE (0x00000000U)
+#define NV0073_CTRL_CMD_DP_SINGLE_HEAD_MULTI_STREAM_MODE_SST (0x00000001U)
+#define NV0073_CTRL_CMD_DP_SINGLE_HEAD_MULTI_STREAM_MODE_MST (0x00000002U)
+
+/*
+* NV0073_CTRL_CMD_DP_SET_TRIGGER_ALL
+*
+* This command configures a new bit, NV_PDISP_SF_DP_LINKCTL_TRIGGER_ALL
+* to indicate which if all the pipelines to take affect on ACT (sorFlushUpdates)
+* in single head MST mode
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed. This parameter must specify a value between zero and the
+* total number of subdevices within the parent device. This parameter
+* should be set to zero for default behavior
+* Head
+* Specifies the head index for the stream
+* sorIndex
+* Specifies the SOR index for the stream
+* streamIndex
+* Stream Identifier
+*
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_GENERIC: when this command has already been called
+*
+*/
+#define NV0073_CTRL_CMD_DP_SET_TRIGGER_ALL (0x731370U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_TRIGGER_ALL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_TRIGGER_ALL_PARAMS_MESSAGE_ID (0x70U)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_TRIGGER_ALL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvBool enable;
+} NV0073_CTRL_CMD_DP_SET_TRIGGER_ALL_PARAMS;
+
+
+
+/*
+* NV0073_CTRL_CMD_DP_GET_AUXLOGGER_BUFFER_DATA
+*
+* This command collects the DP AUX log from the RM aux buffer and
+* sends it to the application.
+*
+* dpAuxBufferReadSize
+* Specifies the number of logs to be read from the
+* AUX buffer in RM
+* dpNumMessagesRead
+* Specifies the number of logs read from the AUX buffer
+* dpAuxBuffer
+* The local buffer to copy the specified number of logs
+* from RM to user application
+*
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_GENERIC: when this command has already been called
+*
+*
+*DPAUXPACKET - This structure holds the log information
+* auxPacket - carries the hex dump of the message transaction
+* auxEvents - Contains the information as in what request and reply type where
+* auxRequestTimeStamp - Request timestamp
+* auxMessageReqSize - Request Message size
+* auxMessageReplySize - Reply message size(how much information was actually send by receiver)
+* auxOutPort - DP port number
+* auxPortAddress - Address to which data was requested to be read or written
+* auxReplyTimeStamp - Reply timestamp
+* auxCount - Serial number to keep track of transactions
+*/
+
+/*Maximum dp messages size is 16 as per the protocol*/
+#define DP_MAX_MSG_SIZE 16U
+#define MAX_LOGS_PER_POLL 50U
+
+/* Various kinds of DP Aux transactions */
+#define NV_DP_AUXLOGGER_REQUEST_TYPE 3:0
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_NULL 0x00000000U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_I2CWR 0x00000001U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_I2CREQWSTAT 0x00000002U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_MOTWR 0x00000003U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_MOTREQWSTAT 0x00000004U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_AUXWR 0x00000005U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_I2CRD 0x00000006U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_MOTRD 0x00000007U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_AUXRD 0x00000008U
+#define NV_DP_AUXLOGGER_REQUEST_TYPE_UNKNOWN 0x00000009U
+
+#define NV_DP_AUXLOGGER_REPLY_TYPE 7:4
+#define NV_DP_AUXLOGGER_REPLY_TYPE_NULL 0x00000000U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_SB_ACK 0x00000001U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_RETRY 0x00000002U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_TIMEOUT 0x00000003U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_DEFER 0x00000004U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_DEFER_TO 0x00000005U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_ACK 0x00000006U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_ERROR 0x00000007U
+#define NV_DP_AUXLOGGER_REPLY_TYPE_UNKNOWN 0x00000008U
+
+#define NV_DP_AUXLOGGER_EVENT_TYPE 9:8
+#define NV_DP_AUXLOGGER_EVENT_TYPE_AUX 0x00000000U
+#define NV_DP_AUXLOGGER_EVENT_TYPE_HOT_PLUG 0x00000001U
+#define NV_DP_AUXLOGGER_EVENT_TYPE_HOT_UNPLUG 0x00000002U
+#define NV_DP_AUXLOGGER_EVENT_TYPE_IRQ 0x00000003U
+
+#define NV_DP_AUXLOGGER_AUXCTL_CMD 15:12
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_INIT 0x00000000U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_I2CWR 0x00000000U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_I2CRD 0x00000001U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_I2CREQWSTAT 0x00000002U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_MOTWR 0x00000004U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_MOTRD 0x00000005U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_MOTREQWSTAT 0x00000006U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_AUXWR 0x00000008U
+#define NV_DP_AUXLOGGER_AUXCTL_CMD_AUXRD 0x00000009U
+
+
+typedef struct DPAUXPACKET {
+ NvU32 auxEvents;
+ NvU32 auxRequestTimeStamp;
+ NvU32 auxMessageReqSize;
+ NvU32 auxMessageReplySize;
+ NvU32 auxOutPort;
+ NvU32 auxPortAddress;
+ NvU32 auxReplyTimeStamp;
+ NvU32 auxCount;
+ NvU8 auxPacket[DP_MAX_MSG_SIZE];
+} DPAUXPACKET;
+typedef struct DPAUXPACKET *PDPAUXPACKET;
+
+#define NV0073_CTRL_CMD_DP_GET_AUXLOGGER_BUFFER_DATA (0x731373U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_GET_AUXLOGGER_BUFFER_DATA_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_GET_AUXLOGGER_BUFFER_DATA_PARAMS_MESSAGE_ID (0x73U)
+
+typedef struct NV0073_CTRL_CMD_DP_GET_AUXLOGGER_BUFFER_DATA_PARAMS {
+ //In
+ NvU32 subDeviceInstance;
+ NvU32 dpAuxBufferReadSize;
+
+ //Out
+ NvU32 dpNumMessagesRead;
+ DPAUXPACKET dpAuxBuffer[MAX_LOGS_PER_POLL];
+} NV0073_CTRL_CMD_DP_GET_AUXLOGGER_BUFFER_DATA_PARAMS;
+
+
+
+
+/* NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES
+ *
+ * This setup link rate table for target display to enable indexed link rate
+ * and export valid link rates back to client. Client may pass empty table to
+ * reset previous setting.
+ *
+ * subDeviceInstance
+ * client will give a subdevice to get right pGpu/pDisp for it
+ * displayId
+ * DisplayId of the display for which the client targets
+ * linkRateTbl
+ * Link rates in 200KHz as native granularity from eDP 1.4
+ * linkBwTbl
+ * Link rates in 270MHz and valid for client to apply to
+ * linkBwCount
+ * Total valid link rates
+ *
+ * Possible status values returned include:
+ * NV_OK
+ * NV_ERR_NOT_SUPPORTED
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#define NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES (0x731377U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_MAX_INDEXED_LINK_RATES 8U
+
+#define NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES_PARAMS_MESSAGE_ID (0x77U)
+
+typedef struct NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES_PARAMS {
+ // In
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU16 linkRateTbl[NV0073_CTRL_DP_MAX_INDEXED_LINK_RATES];
+
+ // Out
+ NvU8 linkBwTbl[NV0073_CTRL_DP_MAX_INDEXED_LINK_RATES];
+ NvU8 linkBwCount;
+} NV0073_CTRL_CMD_DP_CONFIG_INDEXED_LINK_RATES_PARAMS;
+
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_STEREO_MSA_PROPERTIES
+ *
+ * This command is used to not depend on supervisor interrupts for setting the
+ * stereo msa params. We will not cache the values and can toggle stereo using
+ * this ctrl call on demand. Note that this control call will only change stereo
+ * settings and will leave other settings as is.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * should be for DP only
+ * bEnableMSA
+ * To enable or disable MSA
+ * bStereoPhaseInverse
+ * To enable or disable Stereo Phase Inverse value
+ * featureMask
+ * Enable/Disable mask of individual MSA property.
+ * featureValues
+ * MSA property value to write
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ * NV_ERR_TIMEOUT
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SET_STEREO_MSA_PROPERTIES (0x731378U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_STEREO_MSA_PROPERTIES_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_STEREO_MSA_PROPERTIES_PARAMS_MESSAGE_ID (0x78U)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_STEREO_MSA_PROPERTIES_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bEnableMSA;
+ NvBool bStereoPhaseInverse;
+ NV0073_CTRL_DP_MSA_PROPERTIES_MASK featureMask;
+ NV0073_CTRL_DP_MSA_PROPERTIES_VALUES featureValues;
+} NV0073_CTRL_CMD_DP_SET_STEREO_MSA_PROPERTIES_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_DP_CONFIGURE_FEC
+ *
+ * This command is used to enable/disable FEC on DP Mainlink.
+ * FEC is a prerequisite to DSC. This should be called only
+ * after LT completes (including PostLT LQA) while enabling.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ *
+ * displayId
+ * Can only be 1 and must be DP.
+ *
+ * bEnableFec
+ * To enable or disable FEC
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ *
+ */
+#define NV0073_CTRL_CMD_DP_CONFIGURE_FEC (0x73137aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_CONFIGURE_FEC_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_CONFIGURE_FEC_PARAMS_MESSAGE_ID (0x7AU)
+
+typedef struct NV0073_CTRL_CMD_DP_CONFIGURE_FEC_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bEnableFec;
+} NV0073_CTRL_CMD_DP_CONFIGURE_FEC_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior
+ * cmd
+ * This parameter is an input to this command.
+ * Here are the current defined fields:
+ * NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_CMD_POWER
+ * Set to specify what operation to run.
+ * NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_CMD_POWER_UP
+ * Request to power up pad.
+ * NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_CMD_POWER_DOWN
+ * Request to power down the pad.
+ * linkBw
+ * This parameter is used to pass in the link bandwidth required to run the
+ * power up sequence. Refer enum DP_LINK_BANDWIDTH for valid values.
+ * laneCount
+ * This parameter is used to pass the lanecount.
+ * sorIndex
+ * This parameter is used to pass the SOR index.
+ * sublinkIndex
+ * This parameter is used to pass the sublink index. Please refer
+ * enum DFPLINKINDEX for valid values
+ * priPadLinkIndex
+ * This parameter is used to pass the padlink index for primary link.
+ * Please refer enum DFPPADLINK for valid index values for Link A~F.
+ * secPadLinkIndex
+ * This parameter is used to pass the padlink index for secondary link.
+ * For Single SST pass in NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_PADLINK_INDEX_INVALID
+ * bEnableSpread
+ * This parameter is boolean value used to indicate if spread is to be enabled or disabled.
+ */
+
+#define NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD (0x73137bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_PARAMS_MESSAGE_ID (0x7BU)
+
+typedef struct NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 cmd;
+ NvU32 linkBw;
+ NvU32 laneCount;
+ NvU32 sorIndex;
+ NvU32 sublinkIndex; // sublink A/B
+ NvU32 priPadLinkIndex; // padlink A/B/C/D/E/F
+ NvU32 secPadLinkIndex; // padlink A/B/C/D/E/F for secondary link in DualSST case.
+ NvBool bEnableSpread;
+} NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_PARAMS;
+
+#define NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_CMD_POWER 0:0
+#define NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_CMD_POWER_UP (0x00000000U)
+#define NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_CMD_POWER_DOWN (0x00000001U)
+
+#define NV0073_CTRL_CMD_DP_CONFIG_MACRO_PAD_PADLINK_INDEX_INVALID (0x000000FFU)
+
+/*
+ * NV0073_CTRL_CMD_DP_AUXCH_CTRL
+ *
+ * This command can be used to perform the I2C Bulk transfer over
+ * DP Aux channel. This is the display port specific implementation
+ * for sending bulk data over the DpAux channel, by splitting up the
+ * data into pieces and retrying for pieces that aren't ACK'd.
+ *
+ * subDeviceInstance [IN]
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId [IN]
+ * This parameter specifies the ID of the display for which the dfp
+ * caps should be returned. The display ID must a dfp display.
+ * If more than one displayId bit is set or the displayId is not a dfp,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * addr [IN]
+ * This parameter is an input to this command. The addr parameter follows
+ * Section 2.4 in DisplayPort spec and the client should refer to the valid
+ * address in DisplayPort spec. Only the first 20 bits are valid.
+ * bWrite [IN]
+ * This parameter specifies whether the command is a I2C write (NV_TRUE) or
+ * a I2C read (NV_FALSE).
+ * data [IN/OUT]
+ * In the case of a read transaction, this parameter returns the data from
+ * transaction request. In the case of a write transaction, the client
+ * should write to this buffer for the data to send.
+ * size [IN/OUT]
+ * Specifies how many data bytes to read/write depending on the
+ * transaction type.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_DP_AUXCH_I2C_TRANSFER_CTRL (0x73137cU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_AUXCH_I2C_TRANSFER_CTRL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_AUXCH_I2C_TRANSFER_MAX_DATA_SIZE 256U
+
+#define NV0073_CTRL_DP_AUXCH_I2C_TRANSFER_CTRL_PARAMS_MESSAGE_ID (0x7CU)
+
+typedef struct NV0073_CTRL_DP_AUXCH_I2C_TRANSFER_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 addr;
+ NvBool bWrite;
+ NvU8 data[NV0073_CTRL_DP_AUXCH_I2C_TRANSFER_MAX_DATA_SIZE];
+ NvU32 size;
+} NV0073_CTRL_DP_AUXCH_I2C_TRANSFER_CTRL_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_DP_ENABLE_VRR
+ *
+ * The command is used to enable VRR.
+ *
+ * subDeviceInstance [IN]
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior
+ * displayId [IN]
+ * This parameter is an input to this command, specifies the ID of the display
+ * for client targeted to.
+ * The display ID must a DP display.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * cmd [IN]
+ * This parameter is an input to this command.
+ *
+ * _STAGE: specifies the stage id to execute in the VRR enablement sequence.
+ * _MONITOR_ENABLE_BEGIN: Send command to the monitor to start monitor
+ * enablement procedure.
+ * _MONITOR_ENABLE_CHALLENGE: Send challenge to the monitor
+ * _MONITOR_ENABLE_CHECK: Read digest from the monitor, and verify
+ * if the result is valid.
+ * _DRIVER_ENABLE_BEGIN: Send command to the monitor to start driver
+ * enablement procedure.
+ * _DRIVER_ENABLE_CHALLENGE: Read challenge from the monitor and write back
+ * corresponding digest.
+ * _DRIVER_ENABLE_CHECK: Check if monitor enablement worked.
+ * _RESET_MONITOR: Set the FW state m/c to a known state.
+ * _INIT_PUBLIC_INFO: Send command to the monitor to prepare public info.
+ * _GET_PUBLIC_INFO: Read public info from the monitor.
+ * _STATUS_CHECK: Check if monitor is ready for next command.
+ * result [OUT]
+ * This is an output parameter to reflect the result of the operation.
+ */
+#define NV0073_CTRL_CMD_DP_ENABLE_VRR (0x73137dU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_ENABLE_VRR_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_ENABLE_VRR_PARAMS_MESSAGE_ID (0x7DU)
+
+typedef struct NV0073_CTRL_CMD_DP_ENABLE_VRR_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 cmd;
+ NvU32 result;
+} NV0073_CTRL_CMD_DP_ENABLE_VRR_PARAMS;
+
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE 3:0
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_MONITOR_ENABLE_BEGIN (0x00000000U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_MONITOR_ENABLE_CHALLENGE (0x00000001U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_MONITOR_ENABLE_CHECK (0x00000002U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_DRIVER_ENABLE_BEGIN (0x00000003U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_DRIVER_ENABLE_CHALLENGE (0x00000004U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_DRIVER_ENABLE_CHECK (0x00000005U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_RESET_MONITOR (0x00000006U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_INIT_PUBLIC_INFO (0x00000007U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_GET_PUBLIC_INFO (0x00000008U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_CMD_STAGE_STATUS_CHECK (0x00000009U)
+
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_OK (0x00000000U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_PENDING (0x80000001U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_READ_ERROR (0x80000002U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_WRITE_ERROR (0x80000003U)
+#define NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_DEVICE_ERROR (0x80000004U)
+
+/*
+ * NV0073_CTRL_CMD_DP_GET_GENERIC_INFOFRAME
+ *
+ * This command is used to capture the display output packets for DP protocol.
+ * Common supported packets are Dynamic Range and mastering infoframe SDP for HDR,
+ * VSC SDP for colorimetry and pixel encoding info.
+ *
+ * displayID (in)
+ * This parameter specifies the displayID for the display resource to configure.
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the NV04_DISPLAY_COMMON
+ * parent device to which the operation should be directed.
+ * infoframeIndex (in)
+ * HW provides support to program 2 generic infoframes per frame for DP.
+ * This parameter indicates which infoframe packet is to be captured.
+ * Possible flags are as follows:
+ * NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_CAPTURE_MODE
+ * This flag indicates the INFOFRAME that needs to be read.
+ * Set to _INFOFRAME0 if RM should read GENERIC_INFOFRAME
+ * Set to _INFOFRAME1 if RM should read GENERIC_INFOFRAME1
+ * packet (out)
+ * pPacket points to the memory for reading the infoframe packet.
+ * bTransmitControl (out)
+ * This gives the transmit mode of infoframes.
+ * If set, means infoframe will be sent as soon as possible and then on
+ * every frame during vblank.
+ * If cleared, means the infoframe will be sent once as soon as possible.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_DP_GET_GENERIC_INFOFRAME (0x73137eU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_GENERIC_INFOFRAME_MAX_PACKET_SIZE 36U
+
+#define NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_PARAMS_MESSAGE_ID (0x7EU)
+
+typedef struct NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 infoframeIndex;
+ NvU8 packet[NV0073_CTRL_DP_GENERIC_INFOFRAME_MAX_PACKET_SIZE];
+ NvBool bTransmitControl;
+} NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_PARAMS;
+
+
+#define NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_CAPTURE_MODE 0:0
+#define NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_CAPTURE_MODE_INFOFRAME0 (0x0000000U)
+#define NV0073_CTRL_DP_GET_GENERIC_INFOFRAME_CAPTURE_MODE_INFOFRAME1 (0x0000001U)
+
+
+/*
+ * NV0073_CTRL_CMD_DP_GET_MSA_ATTRIBUTES
+ *
+ * This command is used to capture the various data attributes sent in the MSA for DP protocol.
+ * Refer table 2-94 'MSA Data Fields' in DP1.4a spec document for MSA data field description.
+ *
+ * displayID (in)
+ * This parameter specifies the displayID for the display resource to configure.
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the NV04_DISPLAY_COMMON
+ * parent device to which the operation should be directed.
+ * mvid, nvid (out)
+ * Video timestamp used by DP sink for regenerating pixel clock.
+ * misc0, misc1 (out)
+ * Miscellaneous MSA attributes.
+ * hTotal, vTotal (out)
+ * Htotal measured in pixel count and vtotal measured in line count.
+ * hActiveStart, vActiveStart (out)
+ * Active start measured from start of leading edge of the sync pulse.
+ * hActiveWidth, vActiveWidth (out)
+ * Active video width and height.
+ * hSyncWidth, vSyncWidth (out)
+ * Width of sync pulse.
+ * hSyncPolarity, vSyncPolarity (out)
+ * Polarity of sync pulse.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_DP_GET_MSA_ATTRIBUTES (0x73137fU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_DP_GET_MSA_ATTRIBUTES_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_DP_MSA_MAX_DATA_SIZE 7U
+
+#define NV0073_CTRL_DP_GET_MSA_ATTRIBUTES_PARAMS_MESSAGE_ID (0x7FU)
+
+typedef struct NV0073_CTRL_DP_GET_MSA_ATTRIBUTES_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 mvid;
+ NvU32 nvid;
+ NvU8 misc0;
+ NvU8 misc1;
+ NvU16 hTotal;
+ NvU16 vTotal;
+ NvU16 hActiveStart;
+ NvU16 vActiveStart;
+ NvU16 hActiveWidth;
+ NvU16 vActiveWidth;
+ NvU16 hSyncWidth;
+ NvU16 vSyncWidth;
+ NvBool hSyncPolarity;
+ NvBool vSyncPolarity;
+} NV0073_CTRL_DP_GET_MSA_ATTRIBUTES_PARAMS;
+
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_MVID 23:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_NVID 23:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_MISC0 7:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_MISC1 15:8
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_HTOTAL 15:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_VTOTAL 31:16
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_HACTIVE_START 15:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_VACTIVE_START 31:16
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_HACTIVE_WIDTH 15:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_VACTIVE_WIDTH 31:16
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_HSYNC_WIDTH 14:0
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_HSYNC_POLARITY 15:15
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_VSYNC_WIDTH 30:16
+#define NV0073_CTRL_DP_MSA_ATTRIBUTES_VSYNC_POLARITY 31:31
+
+/*
+ * NV0073_CTRL_CMD_DP_AUXCH_OD_CTRL
+ *
+ * This command is used to query OD capability and status as well as
+ * control OD functionality of eDP LCD panels.
+ *
+ * subDeviceInstance [in]
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId [in]
+ * This parameter specifies the ID of the DP display which owns
+ * the Main Link to be adjusted. The display ID must a DP display
+ * as determined with the NV0073_CTRL_CMD_SPECIFIC_GET_TYPE command.
+ * If more than one displayId bit is set or the displayId is not a DP,
+ * this call will return NV_ERR_INVALID_ARGUMENT.
+ * cmd [in]
+ * This parameter is an input to this command. The cmd parameter tells
+ * whether we have to get the value of a specific field or set the
+ * value in case of a writeable field.
+ * control [in]
+ * This parameter is input by the user. It is used by the user to decide the control
+ * value to be written to change the Sink OD mode. The command to write is
+ * the NV0073_CTRL_CMD_DP_AUXCH_OD_CTL_SET command.
+ * bOdCapable [out]
+ * This parameter reflects the OD capability of the Sink which can be
+ * fetched by using the NV0073_CTRL_CMD_DP_AUXCH_OD_CAPABLE_QUERY command.
+ * bOdControlCapable [out]
+ * This parameter reflects the OD control capability of the Sink which can be
+ * fetched by using the NV0073_CTRL_CMD_DP_AUXCH_OD_CTL_CAPABLE_QUERY command.
+ * bOdStatus [out]
+ * This parameter reflects the Sink OD status which can be
+ * fetched by using the NV0073_CTRL_CMD_DP_AUXCH_OD_STATUS_QUERY command.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_DP_AUXCH_OD_CTRL (0x731380U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_AUXCH_OD_CTRL_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_AUXCH_OD_CTRL_PARAMS_MESSAGE_ID (0x80U)
+
+typedef struct NV0073_CTRL_CMD_DP_AUXCH_OD_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU8 control;
+ NvU8 cmd;
+ NvBool bOdCapable;
+ NvBool bOdControlCapable;
+ NvBool bOdStatus;
+} NV0073_CTRL_CMD_DP_AUXCH_OD_CTRL_PARAMS;
+
+/* valid commands */
+#define NV0073_CTRL_CMD_DP_AUXCHQUERY_OD_CAPABLE 0x00000000
+#define NV0073_CTRL_CMD_DP_AUXCHQUERY_OD_CTL_CAPABLE 0x00000001
+#define NV0073_CTRL_CMD_DP_AUXCHQUERY_OD_STATUS 0x00000002
+#define NV0073_CTRL_CMD_DP_AUXCH_OD_CTL_SET 0x00000003
+
+/* valid state values */
+#define NV0073_CTRL_CMD_DP_AUXCH_OD_CTL_SET_AUTONOMOUS 0x00000000
+#define NV0073_CTRL_CMD_DP_AUXCH_OD_CTL_SET_DISABLE_OD 0x00000002
+#define NV0073_CTRL_CMD_DP_AUXCH_OD_CTL_SET_ENABLE_OD 0x00000003
+
+/*
+ * NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES
+ *
+ * This command returns the following info
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * should be for DP only
+ * bEnableMSA
+ * To enable or disable MSA
+ * bStereoPhaseInverse
+ * To enable or disable Stereo Phase Inverse value
+ * bCacheMsaOverrideForNextModeset
+ * Cache the values and don't apply them until next modeset
+ * featureMask
+ * Enable/Disable mask of individual MSA property
+ * featureValues
+ * MSA property value to write
+ * bDebugValues
+ * To inform whether actual MSA values need to be returned
+ * pFeatureDebugValues
+ * It will actual MSA property value being written on HW.
+ * If its NULL then no error but return nothing
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ * NV_ERR_TIMEOUT
+ *
+ */
+#define NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_V2 (0x731381U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_DP_INTERFACE_ID << 8) | NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_V2_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_V2_PARAMS_MESSAGE_ID (0x81U)
+
+typedef struct NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_V2_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bEnableMSA;
+ NvBool bStereoPhaseInverse;
+ NvBool bCacheMsaOverrideForNextModeset;
+ NV0073_CTRL_DP_MSA_PROPERTIES_MASK featureMask;
+ NV0073_CTRL_DP_MSA_PROPERTIES_VALUES featureValues;
+ NvBool bDebugValues;
+ NV0073_CTRL_DP_MSA_PROPERTIES_VALUES featureDebugValues;
+} NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_V2_PARAMS;
+/* _ctrl0073dp_h_ */
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dpu.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dpu.h
new file mode 100644
index 0000000..1ac3e6f
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073dpu.h
@@ -0,0 +1,32 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2011-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073dpu.finn
+//
+
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073event.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073event.h
new file mode 100644
index 0000000..a2423a8
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073event.h
@@ -0,0 +1,32 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2009-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073event.finn
+//
+
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073internal.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073internal.h
new file mode 100644
index 0000000..2b4965d
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073internal.h
@@ -0,0 +1,47 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2020-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073internal.finn
+//
+
+#include "ctrl/ctrl0073/ctrl0073base.h"
+#include "ctrl/ctrl0073/ctrl0073system.h"
+
+#define NV0073_CTRL_CMD_INTERNAL_GET_HOTPLUG_UNPLUG_STATE (0x730401U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_INTERNAL_INTERFACE_ID << 8) | NV0073_CTRL_CMD_INTERNAL_GET_HOTPLUG_UNPLUG_STATE_FINN_PARAMS_MESSAGE_ID" */
+
+
+// FINN PORT: The below type was generated by the FINN port to
+// ensure that all API's have a unique structure associated
+// with them!
+#define NV0073_CTRL_CMD_INTERNAL_GET_HOTPLUG_UNPLUG_STATE_FINN_PARAMS_MESSAGE_ID (0x1U)
+
+typedef struct NV0073_CTRL_CMD_INTERNAL_GET_HOTPLUG_UNPLUG_STATE_FINN_PARAMS {
+ NV0073_CTRL_SYSTEM_GET_HOTPLUG_UNPLUG_STATE_PARAMS params;
+} NV0073_CTRL_CMD_INTERNAL_GET_HOTPLUG_UNPLUG_STATE_FINN_PARAMS;
+
+
+/* ctrl0073internal_h */
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073psr.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073psr.h
new file mode 100644
index 0000000..7ac6f6e
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073psr.h
@@ -0,0 +1,32 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2012-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073psr.finn
+//
+
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073specific.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073specific.h
new file mode 100644
index 0000000..74ace22
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073specific.h
@@ -0,0 +1,1909 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073specific.finn
+//
+
+#include "ctrl/ctrl0073/ctrl0073base.h"
+
+#include "ctrl/ctrlxxxx.h"
+/* NV04_DISPLAY_COMMON display-specific control commands and parameters */
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_TYPE
+ *
+ * This command can be used to determine the associated display type for
+ * the specified displayId.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the ID of the display for which the display
+ * type is to be returned. Only one display may be indicated in this
+ * parameter.
+ * displayType
+ * This parameter returns the display type associated with the specified
+ * displayId parameter. Valid displayType values are:
+ * NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_CRT
+ * NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_DFP
+ * NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_TV
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS_MESSAGE_ID (0x40U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 displayType;
+} NV0073_CTRL_SPECIFIC_GET_TYPE_PARAMS;
+
+/* valid display types */
+#define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_UNKNOWN (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_CRT (0x00000001U)
+#define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_DFP (0x00000002U)
+#define NV0073_CTRL_SPECIFIC_DISPLAY_TYPE_TV (0x00000003U)
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_EDID_V2
+ *
+ * This command can be used to request the EDID for the specified displayId.
+ *
+ * [in] subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the total
+ * number of subdevices within the parent device. This parameter should
+ * be set to zero for default behavior.
+ * [in] displayId
+ * This parameter specifies the display to read the EDID. The display ID
+ * must specify a display with a positive connect state as determined
+ * with the NV0073_CTRL_CMD_SYSTEM_GET_CONNECT_STATE command. Only one
+ * display may be indicated in this parameter. If a more than one
+ * display Id is used, the RM will return NV_ERR_INVALID_ARGUMENT.
+ * [out] bufferSize
+ * This parameter returns the number of bytes copied into edidBuffer after
+ * performing the requested EDID operations.
+ * [out] edidBuffer
+ * The array of EDIDs that RM will fill after the requested operations. If
+ * the size of the array is not large enough to hold the number of bytes to
+ * be copied, NV_ERR_INVALID_ARGUMENT will be returned.
+ * [in] flags
+ * This parameter defines the specific operations that will be performed
+ * in reading the EDID.
+ * Here are the current defined fields:
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE
+ * A client uses this field to indicate whether to return the cached
+ * copy of the EDID or to use DDC to read the EDID from the display.
+ * Possible values are:
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_NO
+ * The RM will use DDC to grab the EDID.
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_YES
+ * The RM will copy the last EDID found into the clients
+ * buffer. No DDC will be performed.
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE
+ * A client uses this field to indicate whether to read from
+ * the HW and return the EDID w/o any patching
+ * Possible values are:
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_COOKED
+ * Use the _COPY_CACHE policy
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_RAW
+ * Perform the read and return an unadulterated EDID.
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE
+ * A client uses this field to indicate whether to read EDID
+ * from SBIOS using ACPI sub function for display dynamic switching
+ * feature. This flag should only be set on internal display with
+ * dynamic switching feature enabled.
+ * Possible values are:
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_ACPI
+ * RM reads the EDID from SBIOS and returns the raw EDID provided
+ * by SBIOS.
+ * NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_DEFAULT
+ * EDID is read based on rest of the 'flags' that are passed to
+ * this function.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES 2048U
+
+#define NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS_MESSAGE_ID (0x45U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 bufferSize;
+ NvU32 flags;
+ NvU8 edidBuffer[NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES];
+} NV0073_CTRL_SPECIFIC_GET_EDID_V2_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE 0:0
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_NO 0x00000000U
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_COPY_CACHE_YES 0x00000001U
+
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE 1:1
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_COOKED 0x00000000U
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_READ_MODE_RAW 0x00000001U
+
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE 3:2
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_DEFAULT 0x00000000U
+#define NV0073_CTRL_SPECIFIC_GET_EDID_FLAGS_DISPMUX_READ_MODE_ACPI 0x00000001U
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_EDID_V2
+ *
+ * This command can be used to set or remove a complete EDID for the
+ * specified displayId. Once the EDID is set, any requests
+ * to read the EDID or use DDC detection will always use a cached copy of
+ * the EDID. That is, the EDID becomes static until disabled by calling
+ * this same function with edidBuffer. Note, that DDC based
+ * detection will always pass for any displayId that has set an EDID. Also,
+ * this path will not store any value across reboots. If an EDID needs to
+ * remain set after a reboot, RM clients must call this function again.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the total
+ * number of subdevices within the parent device. This parameter should
+ * be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the display to store or the EDID. Only one
+ * display may be indicated in this parameter. If more than one displayId
+ * is used, the RM will return NV_ERR_INVALID_ARGUMENT.
+ * If the displayId does not use DDC and hence would not have an EDID,
+ * then the RM could also return NV_ERR_INVALID_ARGUMENT.
+ * bufferSize
+ * This parameter specifies the size of the EDID buffer pointed to by
+ * pEdidBuffer. If the EDID write contains more bytes than bufferSize,
+ * the RM will extend the bufferSize of the EDID inside the RM to match.
+ * Note a bufferSize of 0 would mean no bytes will be copied, but set the
+ * current cached EDID as static.
+ * edidBuffer
+ * This parameter specifies the EDID buffer that the RM will copy into
+ * the RM buffer. If the EDID buffer is empty, the RM will remove any
+ * previous set EDID and allow further detection and EDID reads to use DDC.
+ * The RM will not check to see if the EDID is valid here or not.
+ * The client should validate the EDID if needed before calling this function.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS_MESSAGE_ID (0x46U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 bufferSize;
+ NvU8 edidBuffer[NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES];
+} NV0073_CTRL_SPECIFIC_SET_EDID_V2_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE
+ *
+ * This Control Cmd is for providing the Faking device(s) support from RM.
+ * This command serves as the entry point for all interaction of RM with
+ * user mode component of the any internal [test] tool. The Faking framework
+ * in RM will be activated only after the usermode app sends in a proper ENABLE
+ * cmd first. Any attempt to issue other cmds while the faking code has not
+ * been enabled will result in RM err _INVALID_DATA.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the total
+ * number of subdevices within the parent device. This parameter should
+ * be set to zero for default behavior.
+ * cmd
+ * This field will carry the command to be executed by the framework.
+ * This includes Enabling/Disabling the test framework and faking devices
+ * like CRT/DVI/TV.
+ * data
+ * This field is to carry the data required for executing the cmd.
+ * Except for Enable and Disable, the other faking device commands will
+ * require the device mask of the device to be faked/removed.
+ * tvType
+ * This field specifies a specific TV type while faking a TV.
+ * Possible values are:
+ * NV0073_FAKE_DEVICE_TV_NONE
+ * NV0073_FAKE_DEVICE_TV_SVIDEO
+ * NV0073_FAKE_DEVICE_TV_COMPOSITE
+ * NV0073_FAKE_DEVICE_TV_COMPONENT
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_DATA
+ *
+ */
+
+#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" */
+
+/* valid fake device TV connector types */
+#define NV0073_FAKE_DEVICE_TV_NONE (0U)
+#define NV0073_FAKE_DEVICE_TV_SVIDEO (1U)
+#define NV0073_FAKE_DEVICE_TV_COMPOSITE (2U)
+#define NV0073_FAKE_DEVICE_TV_COMPONENT (3U)
+
+#define NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS_MESSAGE_ID (0x43U)
+
+typedef struct NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 cmd;
+ NvU32 data;
+ NvU32 tvType;
+} NV0073_CTRL_CMD_SPECIFIC_FAKE_DEVICE_PARAMS;
+
+/* Faking Support commands */
+/* some random value to enable/disable test code */
+#define NV0073_FAKE_DEVICE_SUPPORT_ENABLE 0x11faU
+#define NV0073_FAKE_DEVICE_SUPPORT_DISABLE 0x99ceU
+#define NV0073_FAKE_DEVICE_SUPPORT_ATTACH_DEVICES 0x100U
+#define NV0073_FAKE_DEVICE_SUPPORT_REMOVE_DEVICES 0x101U
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_I2C_PORTID
+ *
+ * This command returns the I2C portID for the specified display device.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the display for which information is to be
+ * returned. Only one display may be indicated in this parameter.
+ * If more than one displayId is used a failing status of
+ * NV_ERR_INVALID_ARGUMENT will be returned.
+ * commPortId
+ * This parameter returns the I2C communication port ID of the
+ * display device indicated by the displayId parameter.
+ * ddcPortId
+ * This parameter returns the I2C DDC port ID of the display device
+ * indicated by the displayId parameter.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS_MESSAGE_ID (0x11U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 commPortId;
+ NvU32 ddcPortId;
+} NV0073_CTRL_SPECIFIC_GET_I2C_PORTID_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_I2C_PORT_NONE (0x0U)
+
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_CONNECTOR_DATA
+ *
+ * This command can be used to get display connector data.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the display for which information is to be
+ * returned. Only one display may be indicated in this parameter.
+ * If more than one displayId is used a failing status of
+ * NV_ERR_INVALID_ARGUMENT will be returned.
+ * DDCPartners
+ * This parameter specifies an NV0073_DISPLAY_MASK value describing
+ * the set of displays that share the same DDC line as displayId. This
+ * parameter will always be returned even if we also return the
+ * NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT_NO flag.
+ * flags
+ * This parameter specifies optional flags to be used while retrieving
+ * the connector data for a given displayId.
+ * Legal values for this parameter include:
+ * NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT
+ * This flag describes whether the connector data is present
+ * inside the firmware.
+ * count
+ * This parameter returns the number of connectors associated with
+ * the displayId argument. This value indicates the number of
+* valid entries returned in the data parameter.
+ * data
+ * This parameter returns an array of structures containing the connector
+ * data associated with each connector for the given displayId argument.
+ * The count field specifies how many entries in this array are returned.
+ * Each entry in the array contains the following members:
+ * index
+ * This value is the index associated with the given connector. If
+ * two displayIds share the same index, then they share the same
+ * connector.
+ * type
+ * This value defines the type of connector associated with the
+ * displayId argument.
+ * location
+ * This value provides a possible means to determine the relative
+ * location of the connector in association to other connectors.
+ * For desktop boards, a value of zero defines the south most
+ * connector (the connector closest to the bus slot into which
+ * the board is inserted).
+ * platform
+ * This value defines the type of system with which to associate the
+ * location of each connector.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+
+#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" */
+
+/* maximum number of connectors */
+#define NV0073_CTRL_MAX_CONNECTORS 4U
+
+#define NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS_MESSAGE_ID (0x50U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 flags;
+ NvU32 DDCPartners;
+ NvU32 count;
+ struct {
+ NvU32 index;
+ NvU32 type;
+ NvU32 location;
+ } data[NV0073_CTRL_MAX_CONNECTORS];
+ NvU32 platform;
+} NV0073_CTRL_SPECIFIC_GET_CONNECTOR_DATA_PARAMS;
+
+/* defines for the flags field */
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT 0:0
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT_NO 0x00000000U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_FLAGS_PRESENT_YES 0x00000001U
+
+/* defines for the data[].type field */
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_VGA_15_PIN 0x00000000U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_COMPOSITE 0x00000010U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_SVIDEO 0x00000011U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_HDTV_COMPONENT 0x00000013U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_SCART 0x00000014U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_COMPOSITE_SCART_OVER_EIAJ4120_BLUE 0x00000016U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_TV_HDTV_EIAJ4120 0x00000017U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_PC_POD_HDTV_YPRPB 0x00000018U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_PC_POD_SVIDEO 0x00000019U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_PC_POD_COMPOSITE 0x0000001AU
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_I_TV_SVIDEO 0x00000020U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_I_TV_COMPOSITE 0x00000021U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_I 0x00000030U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DVI_D 0x00000031U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_ADC 0x00000032U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DVI_I_1 0x00000038U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DVI_I_2 0x00000039U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_SPWG 0x00000040U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_OEM 0x00000041U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_EXT 0x00000046U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_INT 0x00000047U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_MINI_EXT 0x00000048U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DP_SERIALIZER 0x00000049U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_HDMI_A 0x00000061U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_HDMI_C_MINI 0x00000063U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DP_1 0x00000064U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_LFH_DP_2 0x00000065U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_VIRTUAL_WFD 0x00000070U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_USB_C 0x00000071U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_DSI 0x00000072U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_STEREO_3PIN_DIN 0x00000073U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_DATA_TYPE_UNKNOWN 0xFFFFFFFFU
+
+/* defines for the platform field */
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_DEFAULT_ADD_IN_CARD 0x00000000U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_TWO_PLATE_ADD_IN_CARD 0x00000001U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_CONFIGURABLE 0x00000002U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_DESKTOP_FULL_DP 0x00000007U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_ADD_IN_CARD 0x00000008U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MXM 0x00000009U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_BACK 0x00000010U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_BACK_LEFT 0x00000011U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_MOBILE_BACK_DOCK 0x00000018U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_CRUSH_DEFAULT 0x00000020U
+#define NV0073_CTRL_SPECIFIC_CONNECTOR_PLATFORM_UNKNOWN 0xFFFFFFFFU
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_ENABLE
+ *
+ * This command is used to signal the resource manager that the upcoming mode
+ * shall be hdmi vs dvi. This is required since the resource manager
+ * does not read the display edid. The resource manager shall enable hdmi
+ * components such as turning on the audio engine for instance. This should
+ * be called prior to every modeset in which the displayId is capable of hdmi.
+ * displayId
+ * This parameter specifies the displayId of HDMI resource to configure.
+ * This comes as input to this command.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which operation should be directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * enable
+ * This field specifies the legal values:
+ * NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_TRUE
+ * NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_FALSE
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS_MESSAGE_ID (0x73U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS {
+ NvU8 subDeviceInstance;
+ NvU32 displayId;
+ NvU8 enable;
+} NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_FALSE (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_SET_HDMI_ENABLE_TRUE (0x00000001U)
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_CTRL_HDMI
+ *
+ * This command can be used to enable HDMI communication on the associated GPU.
+ * This should be called prior to every modeset in which the displayId is capable of HDMI.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which operation should be directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * displayId
+ * This parameter specifies the displayId of HDMI resource to configure.
+ * This comes as input to this command.
+ * enable
+ * This field specifies the legal values:
+ * NV0073_CTRL_SPECIFIC_CTRL_HDMI_DISABLE
+ * NV0073_CTRL_SPECIFIC_CTRL_HDMI_ENABLE
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS_MESSAGE_ID (0x74U)
+
+typedef struct NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS {
+ NvU8 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bEnable;
+} NV0073_CTRL_SPECIFIC_CTRL_HDMI_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_CTRL_HDMI_DISABLE (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_CTRL_HDMI_ENABLE (0x00000001U)
+
+
+
+/*
+ * NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING
+ *
+ * This structure defines the mapping between the ACPI ID and the corresponding
+ * display ID of a display device
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * acpiId
+ * The ACPI ID of the display device
+ * displayId
+ * The corresponding display ID
+ * dodIndex
+ * The corresponding DOD index
+ */
+typedef struct NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING {
+ NvU32 subDeviceInstance;
+ NvU32 acpiId;
+ NvU32 displayId;
+ NvU32 dodIndex;
+} NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING;
+
+/*
+ * NV0073_CTRL_CMD_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT
+ *
+ * This call will return the Display Port Attachment value
+ * per displayID as defined by Nvidia that is directly
+ * associated with the ACPI 3.0 _DOD entry's Display Port
+ * Attachment field. This should help clients map the
+ * _DOD ACPI ID to each displayID. Note, that some systems
+ * do not have a standard in place for this field. On those
+ * systems, the RM will return NV_ERR_NOT_SUPPORTED.
+ *
+ * Note that this "Display Port" attachment field has nothing
+ * to do with DisplayPort/DP. It's an unfortunate name inside
+ * the ACPI 3.0 spec that coincides with the name of DisplayPort.
+ *
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_NOT_SUPPORTED
+ *
+*/
+
+#define NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS_MESSAGE_ID (0x85U)
+
+typedef struct NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 dispPortAttachment;
+} NV0073_CTRL_GET_ACPI_DOD_DISPLAY_PORT_ATTACHMENT_PARAMS;
+
+
+#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" */
+
+// defines for dispPortAttachment
+#define NV0073_DISPLAY_PORT_ATTACHMENT_ANALOG (0x00000000U)
+#define NV0073_DISPLAY_PORT_ATTACHMENT_LVDS (0x00000001U)
+#define NV0073_DISPLAY_PORT_ATTACHMENT_DP_A (0x00000002U)
+#define NV0073_DISPLAY_PORT_ATTACHMENT_DP_B (0x00000003U)
+#define NV0073_DISPLAY_PORT_ATTACHMENT_DP_C (0x00000004U)
+#define NV0073_DISPLAY_PORT_ATTACHMENT_DP_D (0x00000005U)
+#define NV0073_DISPLAY_PORT_ATTACHMENT_UNKNOWN (0xFFFFFFFFU)
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_ACPI_ID_MAPPING
+ *
+ * This call will update the RM data structure which holds the
+ * ACPI ID to display ID mapping of the display devices
+ *
+ * The input parameter is an array of structures of type
+ * NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING
+ *
+ * If some of the array elements remain unused, the acpiId field of the
+ * structure must be set to 0x0000
+ *
+ * The size of the array is given by
+ * NV0073_CTRL_SPECIFIC_MAX_ACPI_DEVICES (defined below)
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ *
+*/
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_MAX_ACPI_DEVICES 16U
+
+#define NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS_MESSAGE_ID (0x84U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS {
+ NV0073_CTRL_SPECIFIC_ACPI_ID_MAPPING mapTable[NV0073_CTRL_SPECIFIC_MAX_ACPI_DEVICES];
+} NV0073_CTRL_SPECIFIC_SET_ACPI_ID_MAPPING_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_ALL_HEAD_MASK
+ *
+ * This call will return all head mask.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * headMask
+ * headMask is the mask of all heads that are usable. For example, if
+ * head 0 and head 2 are present, headMask would be NVBIT(0)|NVBIT(2). This
+ * parameter returns to the client.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS_MESSAGE_ID (0x87U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 headMask;
+} NV0073_CTRL_SPECIFIC_GET_ALL_HEAD_MASK_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_OD_PACKET
+ *
+ * This command is used to program the display output packets.
+ * Currently it supports DP and HDMI.
+ * Common supported packets are AVI infoframes, Audio Infoframes, Gamma
+ * Metadata, Vendor Specific infoframes and General Control Packets (GCP).
+ * + GCP AVMute Enable should be performed before the start of the modeset.
+ * + GCP AVMute Disable should be performed after the end of the modeset.
+ * GCP AVMute should contain HDR + 7 bytes.
+ * + AVI infoframes should occur after the modeset but before a GCP AVMute
+ * Disable. AVI infoframe should contain HDR + 14 bytes
+ * + Audio infoframes should occur after the modeset but before a GCP AVMute
+ * Enable.
+ * Audio infoframe should contain HDR + 11 bytes.
+ * + Gamma Metadata packets should contain HDR + 28 bytes.
+ * + Vendor Specific packets are variable length.
+ * By HDMI 1.4 June 5 2009 spec, payload can be 5 bytes, 6 bytes, 7 bytes or
+ * 16 bytes, depending on the packets spec.
+ * Unused data bytes should be zero-ed out.
+ *
+ * displayID
+ * This parameter specifies the displayID for the display resource to
+ * configure.
+ * This comes as input to this command.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * transmitControl
+ * This parameter controls how the packet is to be sent by setting the
+ * control bits.
+ * Possible flags are as follows:
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE
+ * Set to _ENABLE to start sending the packet at next frame, set to
+ * _DISABLE to stop sending.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME
+ * Set to _ENABLE to send the packet at other frame, set to _DISABLE to
+ * send at every frame.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME
+ * Set to _ENABLE to send once next frame, set to _DISABLE to send at
+ * every frame.
+ * Note: A setting to set both _OTHER_FRAME and _SINGLE_FRAME is invalid
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK
+ * Set to _ENABLE to send the packet once on next HBLANK, set to
+ * _DISABLE to send on VBLANK.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE
+ * Set to _ENABLE to send the info frame packet as soon as possible.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT
+ * Set to _SW_CONTROLLED to set HDMI_Video_Format field and 3D_Structure field
+ * from NV_PDISP_SF_HDMI_VSI_SUBPACK0_HIGH_PB4 and PB5, if it is set to _HW_CONTROLLED
+ * then HW will get them based on the state of the setHdmiCtrl method.
+ * Btw this applies only for stereo ovverides.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY
+ * Set to TRUE to send Vendor specific info frame used for 3D stereo LR sync.
+ * Set PACKET_TYPE=pktType_VendorSpecInfoFrame along with this flag.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING
+ * Set to TRUE to send Vendor specific info frame used for Self Refresh panels
+ * Set PACKET_TYPE=pktType_VendorSpecInfoFrame along with this flag.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE
+ * HW provides support to program 2 generic infoframes per frame for DP with GP10X+.
+ * This flag indicates the INFOFRAME that needs to be programmed.
+ * Set to _INFOFRAME0 if RM should program GENERIC_INFOFRAME
+ * Set to _INFOFRAME1 if RM should program GENERIC_INFOFRAME1
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE
+ * This option is reserved for backward compatibility with
+ * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_PACKET and
+ * NV0073_CTRL_CMD_DP_SET_PACKET.
+ * It is temporal and will be deprecated soon.
+ * packetSize
+ * packet size of packets in pPacket to send, including header and payload.
+ * targetHead
+ * Specifies the target head number for which SDP needs to be updated.
+ * bUsePsrHeadforSdp
+ * Indicates use targetHead field for setting SDP or infoframe packet instead
+ * of deriving the active head from displayID.
+ * pPacket
+ * pPacket points to the packets to send.
+ * For HDMI 1.1, the maximum allowed bytes is 31.
+ * The packet array includes the 3 bytes of header + data depending on
+ * the type of packet. For an infoframe, the header bytes refer to type,
+ * version and length respectively. This comes as input to this command.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SET_OD_MAX_PACKET_SIZE 36U
+
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS_MESSAGE_ID (0x88U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 transmitControl;
+ NvU32 packetSize;
+ NvU32 targetHead;
+ NvBool bUsePsrHeadforSdp;
+ NvU8 aPacket[NV0073_CTRL_SET_OD_MAX_PACKET_SIZE];
+} NV0073_CTRL_SPECIFIC_SET_OD_PACKET_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE 0:0
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_NO (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_YES (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME 1:1
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_DISABLE (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_ENABLE (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME 2:2
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_DISABLE (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_ENABLE (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK 3:3
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_DISABLE (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_ENABLE (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE 4:4
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE_DISABLE (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_IMMEDIATE_ENABLE (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT 5:5
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT_SW_CONTROLLED (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT_HW_CONTROLLED (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY 6:6
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY_FALSE (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY_TRUE (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING 7:7
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_FALSE (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING_TRUE (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE 9:8
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE_INFOFRAME0 (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_GEN_INFOFRAME_MODE_INFOFRAME1 (0x0000001U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE 31:31
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_NO (0x0000000U)
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE_YES (0x0000001U)
+
+
+/*
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS
+ *
+ * This command is used to enable/disable sending of display output packets.
+ * Currently it supports HDMI only.
+ * Unused data bytes should be zero-ed out.
+ *
+ * displayID
+ * This parameter specifies the displayID for the display output resource to
+ * configure.
+ * This comes as input to this command.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * type
+ * The client shall specify the type of display output packet. For HDMI, set
+ * this according to HDMI specification 1.4.
+ * This comes as input to this command.
+ * transmitControl
+ * This parameter controls how the packet is to be sent by setting the control
+ * bits.
+ * Possible flags are as follows:
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE
+ * Set to _ENABLE to start sending the packet at next frame, set to
+ * _DISABLE to stop sending.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME
+ * Set to _ENABLE to send the packet at other frame, set to _DISABLE to
+ * send at every frame.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME
+ * Set to _ENABLE to send once next frame, set to _DISABLE to send at
+ * every frame.
+ * Note: A setting to set both _OTHER_FRAME and _SINGLE_FRAME is invalid
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK
+ * Set to _ENABLE to send the packet once on next HBLANK, set to _DISABLE
+ * to send on VBLANK.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_VIDEO_FMT
+ * Set to _SW_CONTROLLED to set HDMI_Video_Format field and 3D_Structure field
+ * from NV_PDISP_SF_HDMI_VSI_SUBPACK0_HIGH_PB4 and PB5, if it is set to _HW_CONTROLLED
+ * then HW will get them based on the state of the setHdmiCtrl method.
+ * Btw this applies only for stereo ovverides.
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_STEREO_POLARITY
+ * Set to TRUE to enable Vendor specific info frame used for 3D stereo LR sync
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_SELF_REFRESH_SETTING
+ * Set to TRUE to enable Vendor specific info frame used for Self Refresh panels
+ * NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE
+ * This option is reserved for backward compatibility with
+ * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_PACKET and
+ * NV0073_CTRL_CMD_DP_SET_PACKET.
+ * It is temporal and will be deprecated soon.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS_MESSAGE_ID (0x89U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 type;
+ NvU32 transmitControl;
+} NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE_NO NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_NO
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ENABLE_YES NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ENABLE_YES
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME_DISABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_DISABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_OTHER_FRAME_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_OTHER_FRAME_ENABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME_DISABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_DISABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SINGLE_FRAME_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SINGLE_FRAME_ENABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK_DISABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_DISABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_ON_HBLANK_ENABLE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_ON_HBLANK_ENABLE
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_VIDEO_FMT NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_VIDEO_FMT
+#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
+#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
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_SET_STEREO_POLARITY NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_SET_STEREO_POLARITY
+#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
+#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
+#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
+#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
+#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
+#define NV0073_CTRL_SPECIFIC_SET_OD_PACKET_CTRL_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE NV0073_CTRL_SPECIFIC_SET_OD_PACKET_TRANSMIT_CONTROL_RESERVED_LEGACY_MODE
+#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
+#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
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_PCLK_LIMIT
+ *
+ * This command returns the maximum supported pixel clock rate that is
+ * supported by the specified display device.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the display for which information is to be
+ * returned. Only one display may be indicated in this parameter.
+ * If more than one displayId is used a failing status of
+ * NV_ERR_INVALID_ARGUMENT will be returned.
+ * pclkLimit
+ * This parameter returns the min of orPclkLimit and vbPclkLimit in KHz.
+ * It may be used for SLI configs that use a video bridge. For non-SLI
+ * configs and bridgeless SLI configs, the client should use orPclkLimit instead.
+ * orPclkLimit
+ * This parameter returns the maximum pixel clock frequency of OR in KHz.
+ * vbPclkLimit
+ * This parameter returns the maximum pixel clock frequency of the
+ * video bridge (SLI) in KHz (or zero if there is no video bridge).
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS_MESSAGE_ID (0x8AU)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 pclkLimit;
+ NvU32 orPclkLimit;
+ NvU32 vbPclkLimit;
+} NV0073_CTRL_SPECIFIC_GET_PCLK_LIMIT_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_OR_GET_INFO
+ *
+ * This command returns output resource information for the specified display
+ * device.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayId
+ * This parameter specifies the display for which information is to be
+ * returned. Only one display may be indicated in this parameter.
+ * If more than one displayId is used a failing status of
+ * NV_ERR_INVALID_ARGUMENT will be returned.
+ * type
+ * This parameter returns the output resource type. Legal values for
+ * this parameter include:
+ * NV0073_CTRL_SPECIFIC_OR_TYPE_DAC
+ * The output resource is a DAC.
+ * NV0073_CTRL_SPECIFIC_OR_TYPE_SOR
+ * The output resource is a serial output resource.
+ * NV0073_CTRL_SPECIFIC_OR_TYPE_DSI
+ * The output resource is a Display Serial Interface output resource.
+ * NV0073_CTRL_SPECIFIC_OR_TYPE_PIOR
+ * The output resource is a parallel input output resource.
+ * index
+ * This parameter returns the type-specific index of the output
+ * resource associated with the specified displayId.
+ * protocol
+ * This parameter returns the type-specific protocol used by the
+ * output resource. Legal values for this parameter include:
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DAC_RGB_CRT
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_LVDS_CUSTOM
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_A
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_B
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DUAL_TMDS
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_A
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_B
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_PIOR_EXT_TMDS_ENC
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DSI
+ * NV0073_CTRL_SPECIFIC_OR_PROTOCOL_UNKNOWN
+ * ditherType
+ * This parameter returns the dither type for the output resource.
+ * Legal values for this parameter include:
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_6_BITS
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_8_BITS
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_10_BITS
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_OFF
+ * ditherAlgo
+ * This parameter returns the dithering algorithm used by the output
+ * resource. Legal values for this parameter include:
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_DYNAMIC_ERR_ACC
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_STATIC_ERR_ACC
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_DYNAMIC_2X2
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_STATIC_2X2
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_TEMPORAL
+ * NV0073_CTRL_SPECIFIC_OR_DITHER_ALOGO_UNKNOWN
+ * location
+ * This parameter returns the physical location of the output resource.
+ * Legal values for this parameter include:
+ * NV0073_CTRL_SPECIFIC_OR_LOCATION_CHIP
+ * NV0073_CTRL_SPECIFIC_OR_LOCATION_BOARD
+ * rootPortId
+ * This parameter specifies the Root-Port ID for the given display.
+ * dcbIndex
+ * This parameter returns the DCB index of the display device.
+ * vbiosAddress
+ * This parameter is the VBIOS IP address which will have valid value
+ * only if displayId is allocated by VBIOS.
+ * bIsLitByVbios
+ * This parameter specifies that whether displayID allocation was
+ * requested by VBIOS or not.
+ * bIsDispDynamic
+ * Returns NV_TRUE if DisplayID is allocated Dynamically else NV_FALSE
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS_MESSAGE_ID (0x8BU)
+
+typedef struct NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 index;
+ NvU32 type;
+ NvU32 protocol;
+ NvU32 ditherType;
+ NvU32 ditherAlgo;
+ NvU32 location;
+ NvU32 rootPortId;
+ NvU32 dcbIndex;
+ NV_DECLARE_ALIGNED(NvU64 vbiosAddress, 8);
+ NvBool bIsLitByVbios;
+ NvBool bIsDispDynamic;
+} NV0073_CTRL_SPECIFIC_OR_GET_INFO_PARAMS;
+
+/* valid type values */
+#define NV0073_CTRL_SPECIFIC_OR_TYPE_NONE (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_OR_TYPE_DAC (0x00000001U)
+#define NV0073_CTRL_SPECIFIC_OR_TYPE_SOR (0x00000002U)
+#define NV0073_CTRL_SPECIFIC_OR_TYPE_PIOR (0x00000003U)
+
+
+#define NV0073_CTRL_SPECIFIC_OR_TYPE_DSI (0x00000005U)
+
+/* valid DAC protocol values */
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DAC_RGB_CRT (0x00000000U)
+
+
+
+/* valid SOR protocol values */
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_LVDS_CUSTOM (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_A (0x00000001U)
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_SINGLE_TMDS_B (0x00000002U)
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DUAL_TMDS (0x00000005U)
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_A (0x00000008U)
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DP_B (0x00000009U)
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_SOR_DSI (0x00000010U)
+
+/* valid DSI protocol values */
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_DSI (0x00000011U)
+
+/* valid PIOR protocol values */
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_PIOR_EXT_TMDS_ENC (0x00000000U)
+
+/* valid UNKNOWN protocol value */
+#define NV0073_CTRL_SPECIFIC_OR_PROTOCOL_UNKNOWN (0xFFFFFFFFU)
+
+/* valid ditherType values */
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_6_BITS (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_8_BITS (0x00000001U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_10_BITS (0x00000002U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_TYPE_OFF (0x00000003U)
+
+/* valid ditherAlgo values */
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_DYNAMIC_ERR_ACC (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_STATIC_ERR_ACC (0x00000001U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_DYNAMIC_2X2 (0x00000002U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_STATIC_2X2 (0x00000003U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_TEMPORAL (0x00000004U)
+#define NV0073_CTRL_SPECIFIC_OR_DITHER_ALGO_UNKNOWN (0xFFFFFFFFU)
+
+/* valid location values */
+#define NV0073_CTRL_SPECIFIC_OR_LOCATION_CHIP (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_OR_LOCATION_BOARD (0x00000001U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS
+ * NV0073_CTRL_CMD_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS
+ *
+ * These commands retrieve and set the user backlight brightness for
+ * the specified display.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId
+ * Display for which brightness is to be retrieved or set.
+ * brightness
+ * The backlight brightness in the range [0,100], inclusive. This
+ * is an input for SET_BACKLIGHT_BRIGHTNESS, and an output for
+ * GET_BACKLIGHT_BRIGHTNESS.
+ *
+ *
+ * Possible status values returned include:
+ * NV_OK
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_SPECIFIC_GET_BACKLIGHT_BRIGHTNESS (0x730291U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | 0x91" */
+
+#define NV0073_CTRL_CMD_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS (0x730292U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SPECIFIC_INTERFACE_ID << 8) | 0x92" */
+
+#define NV0073_CTRL_BACKLIGHT_BRIGHTNESS_MIN_VALUE 0U
+#define NV0073_CTRL_BACKLIGHT_BRIGHTNESS_MAX_VALUE 100U
+
+typedef struct NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 brightness;
+} NV0073_CTRL_SPECIFIC_BACKLIGHT_BRIGHTNESS_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS
+ *
+ * This command is used to inform RM about the scrambling, clock mode, FRL and
+ * DSC caps of the HDMI sink device.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed..
+ * displayID
+ * This parameter specifies the displayID for the display output resource to
+ * configure.
+ * caps
+ * This parameter specifies the sink caps.
+ * GT_340MHZ_CLOCK_SUPPORTED refers to whether sink supports TMDS clock (sorClk) rate greater than 340 MHz
+ * LTE_340MHZ_SCRAMBLING_SUPPORTED refers to whether scrambling is supported for clock rate at or below 340 MHz
+ * SCDC_SUPPORTED refers to whether SCDC access is supported on sink
+ * MAX_FRL_RATE_SUPPORTED refers to the maximum HDMI 2.1 FRL rate supported
+ * DSC_12_SUPPORTED refers to whether VESA DSC v1.2a is supported
+ * DSC_12_MAX_FRL_RATE_SUPPORTED refers to the maximum HDMI 2.1 FRL rate supported when VESA DSC v1.2a is supported
+ *
+ *
+ * Possible status values returned include:
+ * NV_OK
+ * NV_ERR_NOT_SUPPORTED
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS_MESSAGE_ID (0x93U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 caps;
+} NV0073_CTRL_SPECIFIC_SET_HDMI_SINK_CAPS_PARAMS;
+
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_GT_340MHZ_CLOCK_SUPPORTED 0:0
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_GT_340MHZ_CLOCK_SUPPORTED_FALSE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_GT_340MHZ_CLOCK_SUPPORTED_TRUE (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_LTE_340MHZ_SCRAMBLING_SUPPORTED 1:1
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_LTE_340MHZ_SCRAMBLING_SUPPORTED_FALSE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_LTE_340MHZ_SCRAMBLING_SUPPORTED_TRUE (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_SCDC_SUPPORTED 2:2
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_SCDC_SUPPORTED_FALSE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_SCDC_SUPPORTED_TRUE (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED 5:3
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_NONE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_3LANES_3G (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_3LANES_6G (0x00000002U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_6G (0x00000003U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_8G (0x00000004U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_10G (0x00000005U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_MAX_FRL_RATE_SUPPORTED_4LANES_12G (0x00000006U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_12_SUPPORTED 6:6
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_12_SUPPORTED_FALSE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_12_SUPPORTED_TRUE (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED 9:7
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_NONE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_3LANES_3G (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_3LANES_6G (0x00000002U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_6G (0x00000003U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_8G (0x00000004U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_10G (0x00000005U)
+#define NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_SINK_CAPS_DSC_MAX_FRL_RATE_SUPPORTED_4LANES_12G (0x00000006U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_MONITOR_POWER
+ *
+ * This command sets monitor power on/off.
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId
+ * This parameter specifies the displayID for the display output resource to
+ * configure.
+ * powerState
+ * This parameter should be one of the valid
+ * NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_* values.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS_MESSAGE_ID (0x95U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 powerState;
+} NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_OFF (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_SET_MONITOR_POWER_ON (0x00000001U)
+
+
+
+/*
+* NV0073_CTRL_CMD_SPECIFIC_SET_HDMI_FRL_CONFIG
+*
+* This command is used to perform HDMI FRL link training and enable FRL mode for
+* the specified displayId. The link configuration will be returned after link
+* training success.
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed.
+* displayID
+* This parameter specifies the displayID for the display output resource to
+* configure.
+* data
+* This parameter is an input and output to this command.
+* Here are the current defined fields:
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE
+* This field specifies the desired setting for lane count. A client may
+* choose any lane count as long as it does not exceed the capability of
+* HDMI FRL sink as indicated in the sink capability field.
+* The valid values for this field are:
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_NONE
+* For 0 lane configuration, link training is shut down (disable FRL).
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_3G
+* For FRL 3-lane configuration and 3 Gbps bandwidth per lane.
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_6G
+* For FRL 3-lane configuration and 6 Gbps bandwidth per lane.
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_6G
+* For FRL 4-lane configuration and 6 Gbps bandwidth per lane.
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_8G
+* For FRL 4-lane configuration and 8 Gbps bandwidth per lane.
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_10G
+* For FRL 4-lane configuration and 10 Gbps bandwidth per lane.
+* NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_12G
+* For FRL 4-lane configuration and 12 Gbps bandwidth per lane.
+* On return, the link bandwidth setting is returned which may be
+* different from the requested input setting.
+* bFakeLt
+* This flag as input to this command.
+* It indicates the FRL link training is a fake link training or not.
+* TRUE if the FRL link training is fake and no real sink device attached.
+* bLtSkipped
+* The flag returned indicating whether link training is skipped or not.
+* TRUE if link training is skipped due to the link config is not changed.
+*
+* Possible status values returned include:
+* NV_OK -
+* Affter finishing link tranning, NV_OK status will be returned along with
+* the updated link congiration. In case of link training failure, FRL_RATE_NONE
+* will be returned with NV_OK.
+* NV_ERR_NOT_SUPPORTED -
+* If the GPU/sink is not capable for HDMI FRL, NV_ERR_NOT_SUPPORTED status
+* will be returned.
+* NV_ERR_INVALID_ARGUMENT
+* If any argument is valid for this control call, NV_ERR_INVALID_ARGUMENT
+* status will be returned.
+*/
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS_MESSAGE_ID (0x9AU)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 data;
+ NvBool bFakeLt;
+ NvBool bLtSkipped;
+} NV0073_CTRL_SPECIFIC_SET_HDMI_FRL_LINK_CONFIG_PARAMS;
+
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE 2:0
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_NONE (0x00000000U)
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_3G (0x00000001U)
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_3LANES_6G (0x00000002U)
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_6G (0x00000003U)
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_8G (0x00000004U)
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_10G (0x00000005U)
+#define NV0073_CTRL_HDMI_FRL_DATA_SET_FRL_RATE_4LANES_12G (0x00000006U)
+
+
+
+#define NV0073_CTRL_SPECIFIC_MAX_CRC_REGIONS 9U
+
+#define NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS_MESSAGE_ID (0xA0U)
+
+typedef struct NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 regionCrcs[NV0073_CTRL_SPECIFIC_MAX_CRC_REGIONS];
+ NvU16 reqRegionCrcMask;
+} NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_REGIONAL_CRCS
+ *
+ * This command is used to capture the active viewport region CRCs
+ *
+ * [in]subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ *
+ * [in]displayId
+ * This parameter specifies the displayId of panel, for which region CRC to be captured
+.*
+ * [out]regionCrcs
+ * This field holds the region CRC values to be returned after successful completion of the control command.
+ *
+ * [in]reqRegionCrcMask
+ * This parameter specifies BIT mask value of requested CRC regions.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_GENERIC
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+#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" */
+
+/*
+* NV0073_CTRL_CMD_SPECIFIC_APPLY_EDID_OVERRIDE_V2
+*
+* Apply EDID override on specific OD.
+*
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed.
+* displayId (in)
+* ID of panel on which the operation is to be performed.
+* bufferSize (in)
+* Size of the EDID buffer.
+* edidBuffer (in/out)
+* The buffer which stores the EDID before and after override.
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_PARAMETER
+*/
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS_MESSAGE_ID (0xA1U)
+
+typedef struct NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU32 bufferSize;
+ NvU8 edidBuffer[NV0073_CTRL_SPECIFIC_GET_EDID_MAX_EDID_BYTES];
+} NV0073_CTRL_SPECIFIC_APPLY_EDID_OVERRIDE_V2_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS
+ *
+ * This command is used to get the HDMI FRL caps of GPU side.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * caps
+ * This parameter specifies the GPU caps.
+ * MAX_FRL_RATE_SUPPORTED refers to the maximum HDMI 2.1 FRL link rate supported
+ *
+ *
+ * Possible status values returned include:
+ * NV_OK
+ * NV_ERR_NOT_SUPPORTED
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS_MESSAGE_ID (0xA2U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 caps;
+} NV0073_CTRL_SPECIFIC_GET_HDMI_GPU_CAPS_PARAMS;
+
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED 2:0
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_NONE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_3LANES_3G (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_3LANES_6G (0x00000002U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_6G (0x00000003U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_8G (0x00000004U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_10G (0x00000005U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_GPU_CAPS_MAX_FRL_LINK_RATE_SUPPORTED_4LANES_12G (0x00000006U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_DISPLAY_CHANGE
+ *
+ * Notifies the system that a display change is about to begin/end.
+ * Also performs the necessary synchronizations for the same.
+ *
+ * The command takes a NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS structure as an
+ * argument with appropriate subDeviceInstance.
+ *
+ * [in]subDeviceInstance
+ * The sub-device instance
+ * [in]newDevices
+ * Bitmask of devices that are planned on being enabled with the
+ * pending device change. See NV_CFGEX_GET_DEVICES_CONFIGURATION for bit defs.
+ * [in]properties
+ * Bitmask of display attributes for new configuration (none used at the moment).
+ * [in]enable
+ * Parameter to decide between display change start and end. Can take values
+ * NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_START or NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_END.
+ * Possible return values:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ *
+ */
+
+#define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS_MESSAGE_ID (0xA4U)
+
+typedef struct NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS {
+
+ NvU32 subDeviceInstance;
+ NvU32 newDevices;
+ NvU32 properties;
+ NvU32 enable;
+} NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_END (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_START (0x00000001U)
+
+#define NV0073_CTRL_SPECIFIC_DISPLAY_CHANGE_PROPERTIES_SPANNING (0x00000001U)
+
+#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" */
+
+
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA
+ *
+ * This command is used to get the HDMI sink status/caps via Status and Control
+ * Data Channel (SCDC).
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayId
+ * This parameter specifies the displayId of HDMI sink.
+ * offset
+ * This parameter specifies the SCDC offset which the read operation
+ * should be used.
+ * data
+ * This field specifies the return data from sink for reading the specified
+ * SCDC offset.
+ *
+ *
+ * Possible status values returned include:
+ * NV_OK
+ * NV_ERR_NOT_SUPPORTED
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS_MESSAGE_ID (0xA6U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvU8 offset;
+ NvU8 data;
+} NV0073_CTRL_SPECIFIC_GET_HDMI_SCDC_DATA_PARAMS;
+
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET 7:0
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_NONE (0x00000000U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SINK_VERSION (0x00000001U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SOURCE_VERSION (0x00000002U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_UPDATE_FLAGS_0 (0x00000010U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_TMDS_CONFIGURATION (0x00000020U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SCRAMBLER_STATUS (0x00000021U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CONFIGURATION_0 (0x00000030U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CONFIGURATION_1 (0x00000031U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_SOURCE_TEST_CONFIGURATION (0x00000035U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_STATUS_FLAGS_0 (0x00000040U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_STATUS_FLAGS_1 (0x00000041U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_STATUS_FLAGS_2 (0x00000042U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_0 (0x00000050U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_1 (0x00000051U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_2 (0x00000052U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_3 (0x00000053U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_4 (0x00000054U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_5 (0x00000055U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_6 (0x00000056U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_7 (0x00000057U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_CED_8 (0x00000058U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_RSED_0 (0x00000059U)
+#define NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_SCDC_DATA_OFFSET_RSED_1 (0x0000005AU)
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_IS_DIRECTMODE_DISPLAY
+ *
+ * This command is used to query whether the specified monitor should be used
+ * with directmode.
+ *
+ * [in]manufacturerID
+ * This parameter specifies the 16-bit EDID Manufacturer ID.
+ * [in]productID
+ * This parameter specifies the 16-bit EDID Product ID.
+ * [out]bIsDirectmode;
+ * This indicates whether the monitor should be used with directmode.
+ * Possible return values:
+ * NV_OK
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS_MESSAGE_ID (0xA7U)
+
+typedef struct NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS {
+ NvU16 manufacturerID;
+ NvU16 productID;
+ NvBool bIsDirectmode;
+} NV0073_CTRL_SPECIFIC_IS_DIRECTMODE_DISPLAY_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION
+ *
+ * This command is used to get the HDMI FRL capacity computation result.
+ *
+ * [in] cmd
+ * This parameter specifies the command for the HDMI FRL capacity computation.
+ * [in] input
+ * This parameter specifies the input data for the HDMI FRL capacity
+ * computation.
+ * [out] result
+ * This indicates the computation result of HDMI FRL capacity computation.
+ * [in/out] preCalc
+ * This indicates the pre-caculation result of HDMI FRL capacity computation.
+ * [in/out] dsc
+ * This indicates the DSC parameters of HDMI FRL capacity computation.
+ * Possible return values:
+ * NV_OK
+ */
+
+#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" */
+
+typedef struct NV0073_CTRL_FRL_CAPACITY_COMPUTATION_PARAMS {
+ NvU32 numLanes;
+ NvU32 frlBitRateGbps;
+ NvU32 pclk10KHz;
+ NvU32 hTotal;
+ NvU32 hActive;
+ NvU32 bpc;
+ NvU32 pixelPacking;
+ NvU32 audioType;
+ NvU32 numAudioChannels;
+ NvU32 audioFreqKHz;
+
+ struct {
+ NvU32 bppTargetx16;
+ NvU32 hSlices;
+ NvU32 sliceWidth;
+ NvU32 dscTotalChunkKBytes;
+ } compressionInfo;
+} NV0073_CTRL_FRL_CAPACITY_COMPUTATION_PARAMS;
+
+typedef struct NV0073_CTRL_FRL_CAPACITY_COMPUTATION_RESULT {
+ NvU32 frlRate;
+ NvU32 bppTargetx16;
+ NvBool engageCompression;
+ NvBool isAudioSupported;
+ NvBool dataFlowDisparityReqMet;
+ NvBool dataFlowMeteringReqMet;
+ NvBool isVideoTransportSupported;
+ NvU32 triBytesBorrowed;
+ NvU32 hcActiveBytes;
+ NvU32 hcActiveTriBytes;
+ NvU32 hcBlankTriBytes;
+ NvU32 tBlankToTTotalX1k;
+} NV0073_CTRL_FRL_CAPACITY_COMPUTATION_RESULT;
+
+typedef struct NV0073_CTRL_FRL_PRE_CALC_CONFIG {
+ NvU32 vic;
+ NvU32 packing;
+ NvU32 bpc;
+ NvU32 frlRate;
+ NvU32 bppX16;
+ NvBool bHasPreCalcFRLData;
+} NV0073_CTRL_FRL_PRE_CALC_CONFIG;
+
+typedef struct NV0073_CTRL_IS_FRL_DSC_POSSIBLE_PARAMS {
+ NvU32 maxSliceCount;
+ NvU32 maxSliceWidth;
+ NvBool bIsDSCPossible;
+} NV0073_CTRL_IS_FRL_DSC_POSSIBLE_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS_MESSAGE_ID (0xA8U)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS {
+ NvU8 cmd;
+ NV0073_CTRL_FRL_CAPACITY_COMPUTATION_PARAMS input;
+ NV0073_CTRL_FRL_CAPACITY_COMPUTATION_RESULT result;
+ NV0073_CTRL_FRL_PRE_CALC_CONFIG preCalc;
+ NV0073_CTRL_IS_FRL_DSC_POSSIBLE_PARAMS dsc;
+} NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_NULL (0x00000000U)
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_UNCOMPRESSED_VIDEO (0x00000001U)
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_COMPRESSED_VIDEO (0x00000002U)
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_HAS_PRECAL_FRL_DATA (0x00000003U)
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_GET_PRECAL_UNCOMPRESSED_FRL_CONFIG (0x00000004U)
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_GET_PRECAL_COMPRESSED_FRL_CONFIG (0x00000005U)
+#define NV0073_CTRL_SPECIFIC_GET_HDMI_FRL_CAPACITY_COMPUTATION_CMD_IS_FRL_DSC_POSSIBLE (0x00000006U)
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_SET_SHARED_GENERIC_PACKET
+ *
+ * This command is used to program the display output packets.
+ * This generic packets can be used for both HDMI and DP.
+ * HW has added 6 new generic packets for each head because some usecases have
+ * requirement to send infoframe in particular location (vsync, vblank, loadV).
+ *
+ * Note: 1. Client first needs to reserve or acquire a free infoframe index
+ * using NV0073_CTRL_CMD_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET.
+ * 2. Client needs to update the SDP index for head through control call
+ * NV0073_CTRL_CMD_SPECIFIC_SET_SHARED_GENERIC_PACKET
+ * 3. Client needs to Release the infoframe index using control call
+ * NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET
+ *
+ * [in]subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * [in]transmitControl
+ * This parameter controls how the packet is to be sent by setting the
+ * control bits.
+ * Possible flags are as follows:
+ * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE
+ * Setting this field to _YES will enable this generic infoframe,
+ * Setting this field to _NO will disable this generic infoframe.
+ * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE
+ * Set to _YES will cause new infoframe to be transmitted exactly once.
+ * Set to _NO will cause new infoframe to be transmitted every frame.
+ * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC
+ * SDP can be sent in 3 different locations:
+ * VBLANK - new infoframe will be sent at Vblank.
+ * VSYNC - new infoframe will be sent at Vsync.
+ * LOADV - new infoframe will be triggered by LOADV, and sent at Vsync
+ * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE
+ * _ENABLE: override DB1 bit1 with existence of loadv (for Panel Self Refresh)
+ * _DISABLE: do not override shared generic infoframe subpacker DB1 bit1.
+ * NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE
+ * _ENABLE: override DB1 bit3 with existence of loadv (for Panel Replay)
+ * _DISABLE: do not override shared generic infoframe subpacker DB1 bit3.
+ * [in]packetSize
+ * size of packets in Packet array to send, including header and payload.
+ * [in]infoframeIndex
+ * Specifies the target head number for which SDP needs to be updated.
+ * [in]infoframeIndex
+ * Specifies the index of infoframe.
+ * [in]packet
+ * pPacket points to the packets to send.
+ * For HDMI 1.1, the maximum allowed bytes is 31.
+ * The packet array includes the 3 bytes of header + data depending on
+ * the type of packet. For an infoframe, the header bytes refer to type,
+ * version and length respectively. This comes as input to this command.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID (0xA9U)
+
+typedef struct NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 transmitControl;
+ NvU32 packetSize;
+ NvU32 targetHeadIndex;
+ NvU32 infoframeIndex;
+ NvU8 packet[NV0073_CTRL_SET_OD_MAX_PACKET_SIZE];
+} NV0073_CTRL_SPECIFIC_SET_SHARED_GENERIC_PACKET_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE 0:0
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE_NO (0x0000000)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_ENABLE_YES (0x0000001)
+
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE 1:1
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE_NO (0x0000000)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_SINGLE_YES (0x0000001)
+
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC 5:2
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC_VBLANK (0x0000000)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC_VSYNC (0x0000001)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_LOC_LOADV (0x0000002)
+
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_STATE_OVERRIDE 6:6
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_STATE_OVERRIDE_DISABLE (0x0000000)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_STATE_OVERRIDE_ENABLE (0x0000001)
+
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE 7:7
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE_DISABLE (0x0000000)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_UPDATE_RFB_OVERRIDE_ENABLE (0x0000001)
+
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE 8:8
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE_DISABLE (0x0000000)
+#define NV0073_CTRL_SPECIFIC_SHARED_GENERIC_CTRL_VSC_SDP_SU_COORDINATES_VALID_OVERRIDE_ENABLE (0x0000001)
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET
+ *
+ * This command is used to reserve the infoframe for head and RM would assign
+ * free infoframe index and return the index of infoframe. Later client needs
+ * to call control call NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET
+ * to release the index.
+ *
+ * [in]subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * [in]targetHeadIndex
+ * target Head for which SDP needs to be sent
+ * [out]infoframeIndex
+ * return Infoframe Index for head.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_INSUFFIENT_RESOURCES
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID (0xAAU)
+
+typedef struct NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 targetHeadIndex;
+ NvU32 infoframeIndex;
+} NV0073_CTRL_SPECIFIC_ACQUIRE_SHARED_GENERIC_PACKET_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET
+ *
+ * This command is used to release the infoframe index which was acquired by
+ * client.
+ *
+ * [in]subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * This parameter must specify a value between zero and the total number
+ * of subdevices within the parent device. This parameter should be set
+ * to zero for default behavior.
+ * [in]targetHeadIndex
+ * Specifies the target head number for which SDP needs to be updated.
+ * [in]infoframeIndex
+ * Infoframe index for the target head
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS_MESSAGE_ID (0xABU)
+
+typedef struct NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 targetHeadIndex;
+ NvU32 infoframeIndex;
+} NV0073_CTRL_SPECIFIC_RELEASE_SHARED_GENERIC_PACKET_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SPECIFIC_DISP_I2C_READ_WRITE
+ *
+ * This command is used to do I2C R/W to slave on display i2c instance.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * i2cPort
+ * This parameter specifies the I2C CCB port ID.
+ * i2cSlaveAddress
+ * This parameter specifies the I2C slave address.
+ * readWriteFlag
+ * This parameter specifies whether its read/write operation.
+ * readWriteLen
+ * This parameter specifies the length of the read/write buffer
+ * readBuffer
+ * This parameter reads the data from slave address and copies to this
+ * buffer
+ * writeBuffer
+ * This parameter specifies this buffer data that would be written to
+ * slave address
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_BUF_LEN 128U
+
+#define NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS_MESSAGE_ID (0xACU)
+
+typedef struct NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 i2cPort;
+ NvU32 i2cSlaveAddress;
+ NvU32 readWriteFlag;
+ NvU32 readWriteLen;
+ NvU8 readBuffer[NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_BUF_LEN];
+ NvU8 writeBuffer[NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_BUF_LEN];
+} NV0073_CTRL_SPECIFIC_DISP_I2C_READ_WRITE_PARAMS;
+
+#define NV0073_CTRL_SPECIFIC_DISP_I2C_READ_MODE (0x00000001)
+#define NV0073_CTRL_SPECIFIC_DISP_I2C_WRITE_MODE (0x00000000)
+
+/*
+ * NV0073_CTRL_CMD_GET_VALID_HEAD_WINDOW_ASSIGNMENT
+ *
+ * This command returns the valid window head assignment mask
+ *
+ * windowHeadMask [out]
+ * This out parameter is an array which holds the head mask for
+ * each window. The Nth element in the array would be a bitmask
+ * of which heads can possibly drive window N.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_GENERIC
+ */
+#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" */
+
+#define NV0073_CTRL_SPECIFIC_MAX_WINDOWS 32U
+#define NV0073_CTRL_SPECIFIC_FLEXIBLE_HEAD_WINDOW_ASSIGNMENT (0xFFU)
+
+#define NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS_MESSAGE_ID (0xADU)
+
+typedef struct NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU8 windowHeadMask[NV0073_CTRL_SPECIFIC_MAX_WINDOWS];
+} NV0073_CTRL_SPECIFIC_GET_VALID_HEAD_WINDOW_ASSIGNMENT_PARAMS;
+
+/* _ctrl0073specific_h_ */
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073stereo.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073stereo.h
new file mode 100644
index 0000000..9a585aa
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073stereo.h
@@ -0,0 +1,166 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2015-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073stereo.finn
+//
+
+#include "ctrl/ctrl0073/ctrl0073base.h"
+
+
+
+/*
+ * NV0073_CTRL_CMD_STEREO_DONGLE_SET_TIMINGS
+ *
+ * Sets new video mode timings
+ * E.g. from display driver on mode set
+ *
+ * Parameters:
+ * [IN] subDeviceInstance - This parameter specifies the subdevice instance
+ * within the NV04_DISPLAY_COMMON parent device to which the operation
+ * should be directed. This parameter must specify a value between
+ * zero and the total number of subdevices within the parent device.
+ * This parameter should be set to zero for default behavior.
+ * [IN] head - head to be passed to stereoDongleControl
+ * [IN] timings - new timings to be set
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED - stereo is not initialized on the GPU
+ */
+#define NV0073_CTRL_CMD_STEREO_DONGLE_SET_TIMINGS (0x731703U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_STEREO_INTERFACE_ID << 8) | NV0073_CTRL_STEREO_DONGLE_SET_TIMINGS_PARAMS_MESSAGE_ID" */
+
+typedef struct NV0073_CTRL_STEREO_VIDEO_MODE_TIMINGS {
+ NvU32 PixelClock;
+ NvU16 TotalWidth;
+ NvU16 VisibleImageWidth;
+ NvU16 HorizontalBlankStart;
+ NvU16 HorizontalBlankWidth;
+ NvU16 HorizontalSyncStart;
+ NvU16 HorizontalSyncWidth;
+ NvU16 TotalHeight;
+ NvU16 VisibleImageHeight;
+ NvU16 VerticalBlankStart;
+ NvU16 VerticalBlankHeight;
+ NvU16 VerticalSyncStart;
+ NvU16 VerticalSyncHeight;
+ NvU16 InterlacedMode;
+ NvU16 DoubleScanMode;
+
+ NvU16 MonitorVendorId;
+ NvU16 MonitorProductId;
+} NV0073_CTRL_STEREO_VIDEO_MODE_TIMINGS;
+
+#define NV0073_CTRL_STEREO_DONGLE_SET_TIMINGS_PARAMS_MESSAGE_ID (0x3U)
+
+typedef struct NV0073_CTRL_STEREO_DONGLE_SET_TIMINGS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NV0073_CTRL_STEREO_VIDEO_MODE_TIMINGS timings;
+} NV0073_CTRL_STEREO_DONGLE_SET_TIMINGS_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_STEREO_DONGLE_ACTIVATE
+ *
+ * stereoDongleActivate wrapper / NV_STEREO_DONGLE_ACTIVATE_DATA_ACTIVE_YES
+ * Updates sbios of 3D stereo state active
+ *
+ * Parameters:
+ * [IN] subDeviceInstance - This parameter specifies the subdevice instance
+ * within the NV04_DISPLAY_COMMON parent device to which the operation
+ * should be directed. This parameter must specify a value between
+ * zero and the total number of subdevices within the parent device.
+ * This parameter should be set to zero for default behavior.
+ * [IN] head - head to be passed to stereoDongleActivate
+ * [IN] bSDA - enable stereo on DDC SDA
+ * [IN] bWorkStation - is workstation stereo?
+ * [IN] bDLP - is checkerboard DLP Stereo?
+ * [IN] IRPower - IR power value
+ * [IN] flywheel - FlyWheel value
+ * [IN] bRegIgnore - use reg?
+ * [IN] bI2cEmitter - Sets NV_STEREO_DONGLE_ACTVATE_DATA_I2C_EMITTER_YES and pStereo->bAegisDT
+ * [IN] bForcedSupported - Sets NV_STEREO_DONGLE_FORCED_SUPPORTED_YES and pStereo->GPIOControlledDongle
+ * [IN] bInfoFrame - Aegis DT with DP InfoFrame
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT - if (head > OBJ_MAX_HEADS)
+ * NV_ERR_NOT_SUPPORTED - stereo is not initialized on the GPU
+ */
+#define NV0073_CTRL_CMD_STEREO_DONGLE_ACTIVATE (0x731704U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_STEREO_INTERFACE_ID << 8) | NV0073_CTRL_STEREO_DONGLE_ACTIVATE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_STEREO_DONGLE_ACTIVATE_PARAMS_MESSAGE_ID (0x4U)
+
+typedef struct NV0073_CTRL_STEREO_DONGLE_ACTIVATE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvBool bSDA;
+ NvBool bWorkStation;
+ NvBool bDLP;
+ NvU8 IRPower;
+ NvU8 flywheel;
+ NvBool bRegIgnore;
+ NvBool bI2cEmitter;
+ NvBool bForcedSupported;
+ NvBool bInfoFrame;
+} NV0073_CTRL_STEREO_DONGLE_ACTIVATE_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_STEREO_DONGLE_DEACTIVATE
+ *
+ * stereoDongleActivate wrapper / NV_STEREO_DONGLE_ACTIVATE_DATA_ACTIVE_NO
+ *
+ * If active count<=0 then no 3D app is running which indicates
+ * that we have really deactivated the stereo, updates sbios of 3D stereo state NOT ACTIVE.
+ *
+ * Parameters:
+ * [IN] subDeviceInstance - This parameter specifies the subdevice instance
+ * within the NV04_DISPLAY_COMMON parent device to which the operation
+ * should be directed. This parameter must specify a value between
+ * zero and the total number of subdevices within the parent device.
+ * This parameter should be set to zero for default behavior.
+ * [IN] head - head to be passed to stereoDongleActivate
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT - if (head > OBJ_MAX_HEADS)
+ * NV_ERR_NOT_SUPPORTED - stereo is not initialized on the GPU
+ */
+#define NV0073_CTRL_CMD_STEREO_DONGLE_DEACTIVATE (0x731705U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_STEREO_INTERFACE_ID << 8) | NV0073_CTRL_STEREO_DONGLE_DEACTIVATE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_STEREO_DONGLE_DEACTIVATE_PARAMS_MESSAGE_ID (0x5U)
+
+typedef struct NV0073_CTRL_STEREO_DONGLE_DEACTIVATE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+} NV0073_CTRL_STEREO_DONGLE_DEACTIVATE_PARAMS;
+
+
+
+/* _ctrl0073stereo_h_ */
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073svp.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073svp.h
new file mode 100644
index 0000000..08a06ae
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073svp.h
@@ -0,0 +1,32 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073svp.finn
+//
+
diff --git a/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073system.h b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073system.h
new file mode 100644
index 0000000..d25501a
--- /dev/null
+++ b/userspace/sdks/nv570/nvidia/inc/ctrl/ctrl0073/ctrl0073system.h
@@ -0,0 +1,1480 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2005-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <nvtypes.h>
+
+//
+// This file was generated with FINN, an NVIDIA coding tool.
+// Source file: ctrl/ctrl0073/ctrl0073system.finn
+//
+
+#include "ctrl/ctrl0073/ctrl0073base.h"
+
+/* NV04_DISPLAY_COMMON system-level control commands and parameters */
+
+/* extract cap bit setting from tbl */
+#define NV0073_CTRL_SYSTEM_GET_CAP(tbl,c) (((NvU8)tbl[(1?c)]) & (0?c))
+
+/* Caps format is byte_index:bit_mask.
+ * Important: keep the number of bytes needed for these fields in sync with
+ * NV0073_CTRL_SYSTEM_CAPS_TBL_SIZE
+ */
+#define NV0073_CTRL_SYSTEM_CAPS_AA_FOS_GAMMA_COMP_SUPPORTED 0:0x01
+#define NV0073_CTRL_SYSTEM_CAPS_TV_LOWRES_BUG_85919 0:0x02
+#define NV0073_CTRL_SYSTEM_CAPS_DFP_GPU_SCALING_BUG_154102 0:0x04
+#define NV0073_CTRL_SYSTEM_CAPS_SLI_INTERLACED_MODE_BUG_235218 0:0x08 // Deprecated
+#define NV0073_CTRL_SYSTEM_CAPS_STEREO_DIN_AVAILABLE 0:0x10
+#define NV0073_CTRL_SYSTEM_CAPS_OFFSET_PCLK_DFP_FOR_EMI_BUG_443891 0:0x20
+#define NV0073_CTRL_SYSTEM_CAPS_GET_DMI_SCANLINE_SUPPORTED 0:0x40
+/*
+ * Indicates support for HDCP Key Selection Vector (KSV) list and System
+ * Renewability Message (SRM) validation
+*/
+#define NV0073_CTRL_SYSTEM_CAPS_KSV_SRM_VALIDATION_SUPPORTED 0:0x80
+
+#define NV0073_CTRL_SYSTEM_CAPS_SINGLE_HEAD_MST_SUPPORTED 1:0x01
+#define NV0073_CTRL_SYSTEM_CAPS_SINGLE_HEAD_DUAL_SST_SUPPORTED 1:0x02
+#define NV0073_CTRL_SYSTEM_CAPS_HDMI_2_0_SUPPORTED 1:0x04
+#define NV0073_CTRL_SYSTEM_CAPS_CROSS_BAR_SUPPORTED 1:0x08
+#define NV0073_CTRL_SYSTEM_CAPS_RASTER_LOCK_NEEDS_MIO_POWER 1:0x10
+/*
+ * Indicates that modesets where no heads are increasing resource requirements,
+ * or no heads are decreasing resource requirements, can be done glitchlessly.
+ */
+#define NV0073_CTRL_SYSTEM_CAPS_GLITCHLESS_MODESET_SUPPORTED 1:0x20
+/* Indicates the SW ACR is enabled for HDMI 2.1 due to Bug 3275257. */
+#define NV0073_CTRL_SYSTEM_CAPS_HDMI21_SW_ACR_BUG_3275257 1:0x40
+
+/* Size in bytes of display caps table. Keep in sync with # of fields above. */
+#define NV0073_CTRL_SYSTEM_CAPS_TBL_SIZE 2U
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_CAPS_V2
+ *
+ * This command returns the set of display capabilities for the parent device
+ * in the form of an array of unsigned bytes. Display capabilities
+ * include supported features and required workarounds for the display
+ * engine(s) within the device, each represented by a byte offset into the
+ * table and a bit position within that byte. The set of display capabilities
+ * will be normalized across all GPUs within the device (a feature capability
+ * will be set only if it's supported on all GPUs while a required workaround
+ * capability will be set if any of the GPUs require it).
+ *
+ * [out] capsTbl
+ * The display caps bits will be transferred by the RM into this array of
+ * unsigned bytes.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_CAPS_V2 (0x730138U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_CAPS_V2_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_CAPS_V2_PARAMS_MESSAGE_ID (0x38U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_CAPS_V2_PARAMS {
+ NvU8 capsTbl[NV0073_CTRL_SYSTEM_CAPS_TBL_SIZE];
+} NV0073_CTRL_SYSTEM_GET_CAPS_V2_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_NUM_HEADS
+ *
+ * This commands returns the number of heads supported by the specified
+ * subdevice and available for use by displays.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * flags
+ * This parameter specifies optional flags to be used to while retrieving
+ * the number of heads.
+ * Possible valid flags are:
+ * NV0073_CTRL_SYSTEM_GET_NUM_HEADS_CLIENT
+ * This flag is used to request the number of heads that are
+ * currently in use by an NV client using a user display class
+ * instance (see NV15_VIDEO_LUT_CURSOR_DAC for an examle). If this
+ * flag is disabled then the total number of heads supported is
+ * returned.
+ * numHeads
+ * This parameter returns the number of usable heads for the specified
+ * subdevice.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_NUM_HEADS (0x730102U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_NUM_HEADS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_NUM_HEADS_PARAMS_MESSAGE_ID (0x2U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_NUM_HEADS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 flags;
+ NvU32 numHeads;
+} NV0073_CTRL_SYSTEM_GET_NUM_HEADS_PARAMS;
+
+/* valid get num heads flags */
+#define NV0073_CTRL_SYSTEM_GET_NUM_HEADS_FLAGS_CLIENT 0:0
+#define NV0073_CTRL_SYSTEM_GET_NUM_HEADS_FLAGS_CLIENT_DISABLE (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_NUM_HEADS_FLAGS_CLIENT_ENABLE (0x00000001U)
+
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_SCANLINE
+ *
+ * This command returns the current RG scanline of the specified head on the
+ * specified subdevice. To get the DMI scanline on supported chips, use
+ * NV0073_CTRL_CMD_SYSTEM_GET_DMI_SCANLINE
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * head
+ * This parameter specifies the head for which the active display
+ * should be retrieved. This value must be between zero and the
+ * maximum number of heads supported by the subdevice.
+ * currentScanline
+ * This parameter returns the current RG scanline value for the specified
+ * head. If the head does not have a valid mode enabled then a scanline
+ * value of 0xffffffff is returned.
+ * bStereoEyeSupported (out)
+ * This parameter specifies whether stereoEye reporting is supported (this
+ * is hw dependent). Note that this value doesn't actually reflect whether
+ * given head is really in stereo mode.
+ * stereoEye (out)
+ * If supported (ie bStereoEyeSupported is TRUE), this parameter returns
+ * either NV0073_CTRL_SYSTEM_GET_SCANLINE_PARAMS_RIGHT_EYE or
+ * NV0073_CTRL_SYSTEM_GET_SCANLINE_PARAMS_LEFT_EYE, reflecting the
+ * stereo eye that is currently scanned out. Although this value typically
+ * changes at the beginning of vblank, the exact guarantee isn't more
+ * accurate than "somewhere in vblank".
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_SCANLINE (0x730108U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_SCANLINE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_SYSTEM_GET_SCANLINE_RIGHT_EYE 0x00000000U
+#define NV0073_CTRL_CMD_SYSTEM_GET_SCANLINE_LEFT_EYE 0x00000001U
+
+#define NV0073_CTRL_SYSTEM_GET_SCANLINE_PARAMS_MESSAGE_ID (0x8U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_SCANLINE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvU32 currentScanline;
+ NvBool bStereoEyeSupported;
+ NvU32 stereoEye;
+} NV0073_CTRL_SYSTEM_GET_SCANLINE_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_VBLANK_COUNTER
+ *
+ * This command returns the current VBlank counter of the specified head on the
+ * specified subdevice.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * head
+ * This parameter specifies the head for which the vblank counter
+ * should be retrieved. This value must be between zero and the
+ * maximum number of heads supported by the subdevice.
+ * verticalBlankCounter
+ * This parameter returns the vblank counter value for the specified
+ * head. If the display mode is not valid or vblank not active then
+ * the verticalBlankCounter value is undefined.
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_VBLANK_COUNTER (0x730109U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_VBLANK_COUNTER_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_VBLANK_COUNTER_PARAMS_MESSAGE_ID (0x9U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_VBLANK_COUNTER_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvU32 verticalBlankCounter;
+} NV0073_CTRL_SYSTEM_GET_VBLANK_COUNTER_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_VBLANK_ENABLE
+ *
+ * This command returns the current VBlank enable status for the specified
+ * head.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * head
+ * This parameter specifies the head for which the vblank status
+ * should be retrieved. This value must be between zero and the
+ * maximum number of heads supported by the subdevice.
+ * bEnabled
+ * This parameter returns the vblank enable status for the specified head.
+ * A value of NV_FALSE indicates that vblank interrupts are not currently
+ * enabled while a value of NV_TRUE indicates that vblank are currently
+ * enabled.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_VBLANK_ENABLE (0x73010aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_VBLANK_ENABLE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_VBLANK_ENABLE_PARAMS_MESSAGE_ID (0xAU)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_VBLANK_ENABLE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvBool bEnabled;
+} NV0073_CTRL_SYSTEM_GET_VBLANK_ENABLE_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_SUPPORTED
+ *
+ * This command returns the set of supported display IDs for the specified
+ * subdevice in the form of a 32bit display mask. State from internal
+ * display connectivity tables is used to determine the set of possible
+ * display connections for the GPU. The presence of a display in the
+ * display mask only indicates the display is supported. The connectivity
+ * status of the display should be determined using the
+ * NV0073_CTRL_CMD_SYSTEM_GET_CONNECT_STATE command. The displayMask
+ * value returned by NV0073_CTRL_CMD_SYSTEM_GET_SUPPORTED is static
+ * and will remain consistent across boots of the system.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayMask
+ * This parameter returns a NV0073_DISPLAY_MASK value describing the set
+ * of displays supported by the subdevice. An enabled bit in displayMask
+ * indicates the support of a display device with that displayId.
+ * displayMaskDDC
+ * This parameter returns a NV0073_DISPLAY_MASK value, indicating the
+ * subset of displayMask that supports DDC.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_SUPPORTED (0x730120U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_SUPPORTED_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_SUPPORTED_PARAMS_MESSAGE_ID (0x20U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_SUPPORTED_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayMask;
+ NvU32 displayMaskDDC;
+} NV0073_CTRL_SYSTEM_GET_SUPPORTED_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_CONNECT_STATE
+ *
+ * This command can be used to check the presence of a mask of display
+ * devices on the specified subdevice.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * flags
+ * This parameter specifies optional flags to be used while retrieving
+ * the connection state information.
+ * Here are the current defined fields:
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD
+ * A client uses this field to indicate what method it wishes the
+ * system to use when determining the presence of attached displays.
+ * Possible values are:
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD_DEFAULT
+ * The system decides what method to use.
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD_CACHED
+ * Return the last full detection state for the display mask.
+ * safety.)
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD_ECONODDC
+ * Ping the DDC address of the given display mask to check for
+ * a connected device. This is a lightweight method to check
+ * for a present device.
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_DDC
+ * A client uses this field to indicate whether to allow DDC during
+ * this detection or to not use it.
+ * Possible values are:
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_DDC_DEFAULT
+ * The system will use DDC as needed for each display.
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_DDC_DISABLE
+ * The system will not use DDC for any display. If DDC is
+ * disabled, this detection state will not be cached.
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_LOAD
+ * A client uses this field to indicate whether to detect loads
+ * during this detection or to not use it.
+ * Possible values are:
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_LOAD_DEFAULT
+ * The system will use load detection as needed for each display.
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_LOAD_DISABLE
+ * The system will not use load detection for any display. If
+ * load detection is disabled, this detection state will not
+ * be cached.
+ * displayMask
+ * This parameter specifies an NV0073_DISPLAY_MASK value describing
+ * the set of displays for which connectivity status is to be checked.
+ * If a display is present then the corresponding bit in the display
+ * mask is left enabled. If the display is not present then the
+ * corresponding bit in the display mask is disabled. Upon return this
+ * parameter contains the subset of displays in the mask that are
+ * connected.
+ *
+ * If displayMask includes bit(s) that correspond to a TV encoder, the
+ * result will be simply 'yes' or 'no' without any indication of which
+ * connector(s) are actually attached. For fine-grained TV attachment
+ * detection, please see NV0073_CTRL_CMD_TV_GET_ATTACHMENT_STATUS.
+ * retryTimeMs
+ * This parameter is an output to this command. In case of
+ * NVOS_STATUS_ERROR_RETRY return status, this parameter returns the time
+ * duration in milli-seconds after which client should retry this command.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NVOS_STATUS_ERROR_RETRY
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_CONNECT_STATE (0x730122U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_PARAMS_MESSAGE_ID (0x22U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 flags;
+ NvU32 displayMask;
+ NvU32 retryTimeMs;
+} NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_PARAMS;
+
+/* valid get connect state flags */
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD 1:0
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD_DEFAULT (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD_CACHED (0x00000001U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_METHOD_ECONODDC (0x00000002U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_DDC 4:4
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_DDC_DEFAULT (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_DDC_DISABLE (0x00000001U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_LOAD 5:5
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_LOAD_DEFAULT (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_LOAD_DISABLE (0x00000001U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_VBLANK 6:6
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_VBLANK_DEFAULT (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_CONNECT_STATE_FLAGS_VBLANK_SAFE (0x00000001U)
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_HOTPLUG_CONFIG
+ *
+ * This command can be used to retrieve dynamic hotplug state information that
+ * are currently recorded by the RM. This information can be used by the client
+ * to determine which displays to detect after a hotplug event occurs. Or if
+ * the client knows that this device generates a hot plug/unplug signal on all
+ * connectors, then this can be used to cull displays from detection.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * flags
+ * This parameter specifies optional flags to be used while retrieving
+ * or changing the hotplug configuration.
+ * No flags are currently defined.
+ * hotplugEventMask
+ * For _GET_HOTPLUG_CONFIG, this returns which connectors the client
+ * has asked for notifications for, when a hotplug event is detected.
+ * Events can only be provided for connectors whose displayID is set
+ * by the system in the hotplugInterruptible field.
+ * hotplugPollable
+ * For _GET_HOTPLUG_CONFIG, this returns which connectors are pollable
+ * in some non-destructive fashion.
+ * hotplugInterruptible
+ * For _GET_HOTPLUG_CONFIG, this returns which connectors are capable
+ * of generating interrupts.
+ *
+ * This display mask specifies an NV0073_DISPLAY_MASK value describing
+ * the set of displays that have seen a hotplug or hotunplug event
+ * sometime after the last valid EDID read. If the device never has
+ * a valid EDID read, then it will always be listed here.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+
+#define NV0073_CTRL_CMD_SYSTEM_GET_HOTPLUG_CONFIG (0x730123U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_SET_HOTPLUG_CONFIG_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_SET_HOTPLUG_CONFIG_PARAMS_MESSAGE_ID (0x23U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_SET_HOTPLUG_CONFIG_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 flags;
+ NvU32 hotplugEventMask;
+ NvU32 hotplugPollable;
+ NvU32 hotplugInterruptible;
+ NvU32 hotplugAlwaysAttached;
+} NV0073_CTRL_SYSTEM_GET_SET_HOTPLUG_CONFIG_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_HEAD_ROUTING_MAP
+ *
+ * This command can be used to retrieve the suggested head routing map
+ * for the specified display mask. A head routing map describes the
+ * suggested crtc (or head) assignments for each display in the specified
+ * mask.
+ *
+ * Up to MAX_DISPLAYS displays may be specified in the display mask. Displays
+ * are numbered from zero beginning with the lowest bit position set in the
+ * mask. The corresponding head assignment for each of specified displays can
+ * then be found in the respective per-device field in the routing map.
+ *
+ * If a particular display cannot be successfully assigned a position in the
+ * head routing map then it is removed from the display mask.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * displayMask
+ * This parameter specifies the NV0073_DISPLAY_MASK value for which
+ * the head routing map is desired. Each enabled bit indicates
+ * a display device to include in the routing map. Enabled bits
+ * must represent supported displays as indicated by the
+ * NV0073_CTRL_CMD_SYSTEM_GET_SUPPORTED command. If a particular
+ * display cannot be included in the routing map then it's corresponding
+ * bit in the displayMask will be disabled. A return value of 0 in
+ * displayMask indicates that a head routing map could not be constructed
+ * with the given display devices.
+ * oldDisplayMask
+ * This optional parameter specifies a prior display mask to be
+ * used when generating the head routing map to be returned in
+ * headRoutingMap. Displays set in oldDisplayMask are retained
+ * if possible in the new routing map.
+ * oldHeadRoutingMap
+ * This optional parameter specifies a prior head routing map to be
+ * used when generating the new routing map to be returned in
+ * headRoutingMap. Head assignments in oldHeadRoutingMap are
+ * retained if possible in the new routing map.
+ * headRoutingMap
+ * This parameter returns the new head routing map. This parameter
+ * is organized into eight distinct fields, each containing the head
+ * assignment for the corresponding display in display mask.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_HEAD_ROUTING_MAP (0x730125U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_HEAD_ROUTING_MAP_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_HEAD_ROUTING_MAP_PARAMS_MESSAGE_ID (0x25U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_HEAD_ROUTING_MAP_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayMask;
+ NvU32 oldDisplayMask;
+ NvU32 oldHeadRoutingMap;
+ NvU32 headRoutingMap;
+} NV0073_CTRL_SYSTEM_GET_HEAD_ROUTING_MAP_PARAMS;
+
+/* maximum number of allowed displays in a routing map */
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_MAX_DISPLAYS (8U)
+
+/* per-display head assignments in a routing map */
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY0 3:0
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY1 7:4
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY2 11:8
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY3 15:12
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY4 19:16
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY5 23:20
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY6 27:24
+#define NV0073_CTRL_SYSTEM_HEAD_ROUTING_MAP_DISPLAY7 31:28
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_ACTIVE
+ *
+ * This command returns the active display ID for the specified head
+ * on the specified subdevice. The active display may be established
+ * at system boot by low-level software and can then be later modified
+ * by an NV client using a user display class instance (see
+ * NV15_VIDEO_LUT_CURSOR_DAC).
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * head
+ * This parameter specifies the head for which the active display
+ * should be retrieved. This value must be between zero and the
+ * maximum number of heads supported by the subdevice.
+ * flags
+ * This parameter specifies optional flags to be used to while retrieving
+ * the active display information.
+ * Possible valid flags are:
+ * NV0073_CTRL_SYSTEM_GET_ACTIVE_FLAGS_CLIENT
+ * This flag is used to limit the search for the active display to
+ * that established by an NV client. If this flag is not specified,
+ * then any active display is returned (setup at system boot by
+ * low-level software or later by an NV client).
+ * displayId
+ * This parameter returns the displayId of the active display. A value
+ * of zero indicates no display is active.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_ACTIVE (0x730126U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_ACTIVE_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_ACTIVE_PARAMS_MESSAGE_ID (0x26U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_ACTIVE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 head;
+ NvU32 flags;
+ NvU32 displayId;
+} NV0073_CTRL_SYSTEM_GET_ACTIVE_PARAMS;
+
+/* valid get active flags */
+#define NV0073_CTRL_SYSTEM_GET_ACTIVE_FLAGS_CLIENT 0:0
+#define NV0073_CTRL_SYSTEM_GET_ACTIVE_FLAGS_CLIENT_DISABLE (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_ACTIVE_FLAGS_CLIENT_ENABLE (0x00000001U)
+
+
+
+/*
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP
+ *
+ * This structure defines the mapping between the RM's displayId and the
+ * defined ACPI IDs for each display.
+ * displayId
+ * This parameter is a handle to a single display output path from the
+ * GPU pins to the display connector. Each display ID is defined by one bit.
+ * A zero in this parameter indicates a skip entry.
+ * acpiId
+ * This parameter defines the corresponding ACPI ID of the displayId.
+ * flags
+ * This parameter specifies optional flags that describe the association
+ * between the display ID and the ACPI ID.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN
+ * This field describes where the ACPI was found.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN_RM
+ * The ACPI ID was generated by RM code.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN_DOD
+ * The ACPI ID was found via the ACPI _DOD call.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN_CLIENT
+ * The ACPI ID was generated by RM Client and sent to RM. Note this
+ * must be set on a NV0073_CTRL_CMD_SYSTEM_SET_ACPI_ID_MAP call.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_UNDOCKED
+ * This flag explains that the ACPI ID is only valid when the system
+ * is undocked. If this flag is not set, the ACPI ID is valid always.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_DOCKED
+ * This flag explains that the ACPI ID is only valid when the system
+ * is docked. If this flag is not set, the ACPI ID is valid always.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_BIOS_DETECT
+ * This flag is set only if the _DOD returns that the device can be
+ * detected by the system BIOS. This flag is copied directly from
+ * the ACPI spec.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_NON_VGA_OUTPUT
+ * This flag is set only if the _DOD returns that the device is
+ * a non-VGA device whose power is related to the VGA device.
+ * i.e. TV tuner, DVD decoder, Video capture. This flag is copied
+ * directly from the ACPI spec.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_MULTIHEAD_ID
+ * This value is set only if the _DOD returns it. The number
+ * indicates the head output of a multi-head device. This has no
+ * relation to the term, Head, currently used in the RM today.
+ * This is strictly a copy of the value directly from the ACPI spec.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_SCHEME
+ * This flag is set only if the _DOD returns that the acpiID follows
+ * the ACPI 3.0 spec. This flag is copied directly from
+ * the ACPI spec.
+ *
+ */
+
+typedef struct NV0073_CTRL_SYSTEM_ACPI_ID_MAP_PARAMS {
+ NvU32 displayId;
+ NvU32 acpiId;
+ NvU32 flags;
+} NV0073_CTRL_SYSTEM_ACPI_ID_MAP_PARAMS;
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN 1:0
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN_RM 0x00000000U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN_DOD 0x00000001U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_ORIGIN_CLIENT 0x00000002U
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_UNDOCKED 2:2
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_UNDOCKED_FALSE 0x00000000U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_UNDOCKED_TRUE 0x00000001U
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_DOCKED 3:3
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_DOCKED_FALSE 0x00000000U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_SNAG_DOCKED_TRUE 0x00000001U
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_BIOS_DETECT 16:16
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_BIOS_DETECT_FALSE 0x00000000U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_BIOS_DETECT_TRUE 0x00000001U
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_NON_VGA_OUTPUT 17:17
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_NON_VGA_OUTPUT_FALSE 0x00000000U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_NON_VGA_OUTPUT_TRUE 0x00000001U
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_MULTIHEAD_ID 20:18
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_SCHEME 31:31
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_SCHEME_VENDOR 0x00000000U
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_DOD_SCHEME_30 0x00000001U
+
+#define NV0073_CTRL_SYSTEM_ACPI_ID_MAP_MAX_DISPLAYS (16U)
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_ACPI_ID_MAP
+ *
+ * This command retrieves the mapping between the RM's displayId and the
+ * defined ACPI IDs for each display.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and
+ * the total number of subdevices within the parent device. It should
+ * be set to zero for default behavior.
+ * NV0073_CTRL_SYSTEM_ACPI_ID_MAP_PARAMS
+ * An array of display ID to ACPI ids with flags for each description.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * Only returned if subdeviceInstance was not valid.
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_GET_ACPI_ID_MAP (0x73015aU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_ACPI_ID_MAP_PARAMS_MESSAGE_ID" */
+
+
+#define NV0073_CTRL_SYSTEM_GET_ACPI_ID_MAP_PARAMS_MESSAGE_ID (0x5AU)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_ACPI_ID_MAP_PARAMS {
+ NvU32 subDeviceInstance;
+ NV0073_CTRL_SYSTEM_ACPI_ID_MAP_PARAMS acpiIdMap[NV0073_CTRL_SYSTEM_ACPI_ID_MAP_MAX_DISPLAYS];
+} NV0073_CTRL_SYSTEM_GET_ACPI_ID_MAP_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_INTERNAL_DISPLAYS
+ *
+ * This command returns the set of internal (safe) display IDs for the specified
+ * subdevice in the form of a 32bit display mask. Safe means the displays do
+ * not require copy protection as they are on the motherboard.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * internalDisplaysMask
+ * This parameter returns a NV0073_DISPLAY_MASK value describing the set
+ * of displays that are internal (safe) and which do not require copy
+ * protection schemes.
+ * availableInternalDisplaysMask
+ * This parameter returns a NV0073_DISPLAY_MASK value describing the set
+ * of displays that are internal and available for use.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_INTERNAL_DISPLAYS (0x73015bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_INTERNAL_DISPLAYS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_INTERNAL_DISPLAYS_PARAMS_MESSAGE_ID (0x5BU)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_INTERNAL_DISPLAYS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 internalDisplaysMask;
+ NvU32 availableInternalDisplaysMask;
+} NV0073_CTRL_SYSTEM_GET_INTERNAL_DISPLAYS_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_BOOT_DISPLAYS
+ *
+ * This command returns a mask of boot display IDs.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * bootDisplayMask
+ * This parameter returns the mask of boot display IDs.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ */
+#define NV0073_CTRL_CMD_SYSTEM_GET_BOOT_DISPLAYS (0x730166U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_GET_BOOT_DISPLAYS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_GET_BOOT_DISPLAYS_PARAMS_MESSAGE_ID (0x66U)
+
+typedef struct NV0073_CTRL_SYSTEM_GET_BOOT_DISPLAYS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 bootDisplayMask;
+} NV0073_CTRL_SYSTEM_GET_BOOT_DISPLAYS_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_EXECUTE_ACPI_METHOD
+ *
+ * This command is used to execute general MXM ACPI methods.
+ *
+ * method
+ * This parameter identifies the MXM ACPI API to be invoked.
+ * Valid values for this parameter are:
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXMI
+ * This value specifies that the MXMI API is to invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXMS
+ * This value specifies that the MXMS API is to invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXMX
+ * This value specifies that the MXMX API is to invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_GPUON
+ * This value specifies that the Hybrid GPU ON API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_GPUOFF
+ * This value specifies that the Hybrid GPU OFF API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_GPUSTA
+ * This value specifies that the Hybrid GPU STA API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXDS
+ * This value specifies that the Hybrid GPU MXDS API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NVHG_MXMX
+ * This value specifies that the Hybrid GPU MXMX API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DOS
+ * This value specifies that the Hybrid GPU DOS API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_ROM
+ * This value specifies that the Hybrid GPU ROM API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DOD
+ * This value specifies that the Hybrid GPU DOD API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_SUPPORT
+ * This value specifies that the Hybrid GPU DSM subfunction SUPPORT
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HYBRIDCAPS
+ * This value specifies that the Hybrid GPU DSM subfunction SUPPORT
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_POLICYSELECT
+ * This value specifies that the Hybrid GPU DSM subfunction POLICYSELECT
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_POWERCONTROL
+ * This value specifies that the Hybrid GPU DSM subfunction POWERCONTROL
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_PLATPOLICY
+ * This value specifies that the Hybrid GPU DSM subfunction PLATPOLICY
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_DISPLAYSTATUS
+ * This value specifies that the Hybrid GPU DSM subfunction DISPLAYSTATUS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MDTL
+ * This value specifies that the Hybrid GPU DSM subfunction MDTL
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCSMBLIST
+ * This value specifies that the Hybrid GPU DSM subfunction HCSMBLIST
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCSMBADDR
+ * This value specifies that the Hybrid GPU DSM subfunction HCSMBADDR
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCREADBYTE
+ * This value specifies that the Hybrid GPU DSM subfunction HCREADBYTE
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCSENDBYTE
+ * This value specifies that the Hybrid GPU DSM subfunction HCSENDBYTES
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCGETSTATUS
+ * This value specifies that the Hybrid GPU DSM subfunction HCGETSTATUS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCTRIGDDC
+ * This value specifies that the Hybrid GPU DSM subfunction HCTRIGDDC
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCGETDDC
+ * This value specifies that the Hybrid GPU DSM subfunction HCGETDDC
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DCS
+ * This value specifies that the Hybrid GPU DCS API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXSS
+ * This value specifies that the DSM MXM subfunction MXSS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXMI
+ * This value specifies that the DSM MXM subfunction MXMI
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXMS
+ * This value specifies that the DSM MXM subfunction MXMS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXPP
+ * This value specifies that the DSM MXM subfunction MXPP
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXDP
+ * This value specifies that the DSM MXM subfunction MXDP
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MDTL
+ * This value specifies that the DSM MXM subfunction MDTL
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXCB
+ * This value specifies that the DSM MXM subfunction MXCB
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_CTL_REMAPFUNC
+ * This value specifies the DSM generic remapping should return function
+ * and subfunction when this API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_HYBRIDCAPS
+ * This value specifies that the generic DSM subfunction HYBRIDCAPS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_POLICYSELECT
+ * This value specifies that the generic DSM subfunction POLICYSELECT
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_PLATPOLICY
+ * This value specifies that the generic DSM subfunction PLATPOLICY
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_DISPLAYSTATUS
+ * This value specifies that the generic DSM subfunction DISPLAYSTATUS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_MDTL
+ * This value specifies that the generic DSM subfunction MDTL
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETOBJBYTYPE
+ * This value specifies that the generic DSM subfunction GETOBJBYTYPE
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETALLOBJS
+ * This value specifies that the generic DSM subfunction GETALLOBJS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETEVENTLIST
+ * This value specifies that the generic DSM subfunction GETEVENTLIST
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETBACKLIGHT
+ * This value specifies that the generic DSM subfunction GETBACKLIGHT
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_CTL_TESTSUBFUNCENABLED
+ * This value specifies the testIfDsmSubFunctionEnabled test should
+ * be done for the func/subfunction when this API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_CTL_GETSUPPORTEDFUNC
+ * This value specifies the list of supported generic dsm functions
+ * should be returned.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NVOP_OPTIMUSCAPS
+ * This value specifies that the DSM NVOP subfunction OPTIMUSCAPS
+ * API is to be invoked.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NVOP_OPTIMUSFLAG
+ * This value specifies that the DSM NVOP subfunction OPTIMUSFLAG
+ * API is to be invoked. This API will set a Flag in sbios to Indicate
+ * that HD Audio Controller is disable/Enabled from GPU Config space.
+ * This flag will be used by sbios to restore Audio state after resuming
+ * from s3/s4.
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_WMMX_NVOP_GPUON
+ * This value specifies that the WMMX (WMI-ACPI) GPON methods has to be invoked
+ * this call should happen below DPC level from any client.
+ * inData
+ * This parameter specifies the method-specific input buffer. Data is
+ * passed to the specified API using this buffer. For display related
+ * APIs the associated display mask can be found at a byte offset within
+ * the inData buffer using the following method-specific values:
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXMX_DISP_MASK_OFFSET
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXDS_DISP_MASK_OFFSET
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NVHG_MXMX_DISP_MASK_OFFSET
+ * NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DOS_DISP_MASK_OFFSET
+ * inDataSize
+ * This parameter specifies the size of the inData buffer in bytes.
+ * outStatus
+ * This parameter returns the status code from the associated ACPI call.
+ * outData
+ * This parameter specifies the method-specific output buffer. Data
+ * is returned by the specified API using this buffer.
+ * outDataSize
+ * This parameter specifies the size of the outData buffer in bytes.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_EXECUTE_ACPI_METHOD (0x730168U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_PARAMS_MESSAGE_ID (0x68U)
+
+typedef struct NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_PARAMS {
+ NvU32 method;
+ NV_DECLARE_ALIGNED(NvP64 inData, 8);
+ NvU16 inDataSize;
+ NvU32 outStatus;
+ NV_DECLARE_ALIGNED(NvP64 outData, 8);
+ NvU16 outDataSize;
+} NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_PARAMS;
+
+
+/* valid method parameter values */
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXMX (0x00000002U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXMX_DISP_MASK_OFFSET (0x00000001U)
+
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_GPUON (0x00000003U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_GPUOFF (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_GPUSTA (0x00000005U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXDS (0x00000006U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NVHG_MXMX (0x00000007U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DOS (0x00000008U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_ROM (0x00000009U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DOD (0x0000000aU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_SUPPORT (0x0000000bU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HYBRIDCAPS (0x0000000cU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_POLICYSELECT (0x0000000dU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_POWERCONTROL (0x0000000eU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_PLATPOLICY (0x0000000fU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_DISPLAYSTATUS (0x00000010U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MDTL (0x00000011U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCSMBLIST (0x00000012U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCSMBADDR (0x00000013U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCREADBYTE (0x00000014U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCSENDBYTE (0x00000015U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCGETSTATUS (0x00000016U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCTRIGDDC (0x00000017U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_HCGETDDC (0x00000018U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DCS (0x00000019U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXSS (0x0000001aU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXMI (0x0000001bU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXMS (0x0000001cU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXPP (0x0000001dU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXDP (0x0000001eU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MDTL (0x0000001fU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_MXCB (0x00000020U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_MXM_GETEVENTLIST (0x00000021U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GETMEMTABLE (0x00000022U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GETMEMCFG (0x00000023U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GETOBJBYTYPE (0x00000024U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GETALLOBJS (0x00000025U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_CTL_REMAPFUNC (0x00000026U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_DISPLAYSTATUS (0x0000002aU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_MDTL (0x0000002bU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETOBJBYTYPE (0x0000002cU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETALLOBJS (0x0000002dU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETEVENTLIST (0x0000002eU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETBACKLIGHT (0x0000002fU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_CTL_TESTSUBFUNCENABLED (0x00000030U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_CTL_GETSUPPORTEDFUNC (0x00000031U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NVOP_OPTIMUSCAPS (0x00000032U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_WMMX_NVOP_GPUON (0x00000033U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NVOP_OPTIMUSFLAG (0x00000034U)
+
+
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_GETCALLBACKS (0x00000036U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NBCI_SUPPORTFUNCS (0x00000037U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NBCI_PLATCAPS (0x00000038U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NBCI_PLATPOLICY (0x00000039U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_GENERIC_MSTL (0x0000003aU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DSM_NVGPS_FUNC_SUPPORT (0x0000003bU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_MXDS (0x0000003cU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_MXDM (0x0000003dU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_MXID (0x0000003eU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_LRST (0x0000003fU)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DDC_EDID (0x00000040U)
+
+/* valid input buffer offset values */
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_MXDS_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NVHG_MXMX_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DOS_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_MXDS_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_MXDM_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_MXID_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_NBCI_LRST_DISP_MASK_OFFSET (0x00000004U)
+#define NV0073_CTRL_SYSTEM_EXECUTE_ACPI_METHOD_DDC_EDID_DISP_MASK_OFFSET (0x00000004U)
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_HOTPLUG_UNPLUG_STATE
+ *
+ * This command can be used to retrieve hotplug and unplug state
+ * information that are currently recorded by the RM. This information is
+ * used by the client to determine which displays to detect after a
+ * hotplug event occurs. Or if the client knows that this device generates
+ * a hot plug/unplug signal on all connectors, then this can be used to call
+ * displays from detection. The displayIds on which hotplug/unplug has
+ * happened will be reported only ONCE to the client. That is if the call
+ * is done multiple times for the same event update, then for consequent
+ * calls the display mask will be reported as 0.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ * flags
+ * This parameter specifies optional flags to be used while retrieving
+ * the hotplug state information.
+ * Here are the current defined fields:
+ * NV0073_CTRL_SYSTEM_GET_HOTPLUG_STATE_FLAGS_LID
+ * A client uses this field to determine the lid state.
+ * Possible values are:
+ * NV0073_CTRL_SYSTEM_GET_HOTPLUG_STATE_FLAGS_LID_OPEN
+ * The lid is open.
+ * NV0073_CTRL_SYSTEM_GET_HOTPLUG_STATE_FLAGS_LID_CLOSED
+ * The lid is closed. The client should remove devices a
+ * reported inside the
+ * NV0073_CTRL_SYSTEM_GET_CONNECT_POLICY_PARAMS.lidClosedMask.
+ * hotPlugMask
+ * This display mask specifies an NV0073_DISPLAY_MASK value describing
+ * the set of displays that have seen a hotplug.
+ * hotUnplugMask
+ * This display mask specifies an NV0073_DISPLAY_MASK value describing
+ * the set of displays that have seen a hot unplug
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_GET_HOTPLUG_UNPLUG_STATE (0x73017bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | 0x7B" */
+
+typedef struct NV0073_CTRL_SYSTEM_GET_HOTPLUG_UNPLUG_STATE_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 flags;
+ NvU32 hotPlugMask;
+ NvU32 hotUnplugMask;
+} NV0073_CTRL_SYSTEM_GET_HOTPLUG_UNPLUG_STATE_PARAMS;
+
+/* valid get hoplug state flags */
+#define NV0073_CTRL_SYSTEM_GET_HOTPLUG_UNPLUG_STATE_FLAGS_LID 0:0
+#define NV0073_CTRL_SYSTEM_GET_HOTPLUG_UNPLUG_STATE_FLAGS_LID_OPEN (0x00000000U)
+#define NV0073_CTRL_SYSTEM_GET_HOTPLUG_UNPLUG_STATE_FLAGS_LID_CLOSED (0x00000001U)
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_CLEAR_ELV_BLOCK
+ *
+ * This command instructs the RM to explicitly clear any
+ * ELV block. Clients should call this before attempting core-channel
+ * updates when in VRR one-shot mode. ELV block mode will be
+ * properly restored to its appropriate setting based on the stall-lock
+ * in Supervisor3 after the core channel update
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ *
+ * displayId
+ * The public ID of the Output Display which is to be used for VRR.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_INVALID_STATE
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_CLEAR_ELV_BLOCK (0x73017dU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_CLEAR_ELV_BLOCK_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_CLEAR_ELV_BLOCK_PARAMS_MESSAGE_ID (0x7DU)
+
+typedef struct NV0073_CTRL_SYSTEM_CLEAR_ELV_BLOCK_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+} NV0073_CTRL_SYSTEM_CLEAR_ELV_BLOCK_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_ARM_LIGHTWEIGHT_SUPERVISOR
+ *
+ * This command arms the display modeset supervisor to operate in
+ * a lightweight mode. By calling this, the client is implicitly
+ * promising not to make any changes in the next modeset that require
+ * the full supervisor. After SV3, the LWSV will disarm and any subsequent
+ * modesets will revert to full supervisors. This must be called separately
+ * for every display that will be part of the modeset.
+ * It is recommended that the client explicitly disarm the lightweight
+ * supervisor after every modeset as null modesets will not trigger the
+ * supervisor interrupts and the RM will not be able to disarm automatically
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed. This parameter must specify a value between zero and the
+ * total number of subdevices within the parent device. This parameter
+ * should be set to zero for default behavior.
+ *
+ * displayId
+ * The public ID of the Output Display which is to be used for VRR.
+ *
+ * bArmLWSV
+ * If this is set to NV_TRUE, the RM will arm the lightweight supervisor
+ * for the next modeset.
+ * If this is set to NV_FALSE, the RM will disarm the lightweight supervisor
+ *
+ * bVrrState
+ * VRR state to be changed.
+ *
+ * vActive
+ * GPU-SRC vertical active value
+ *
+ * vfp
+ * GPU-SRC vertical front porch
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_INVALID_STATE
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_ARM_LIGHTWEIGHT_SUPERVISOR (0x73017eU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_ARM_LIGHTWEIGHT_SUPERVISOR_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_ARM_LIGHTWEIGHT_SUPERVISOR_PARAMS_MESSAGE_ID (0x7EU)
+
+typedef struct NV0073_CTRL_SYSTEM_ARM_LIGHTWEIGHT_SUPERVISOR_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bArmLWSV;
+ NvBool bVrrState;
+ NvU32 vActive;
+ NvU32 vfp;
+} NV0073_CTRL_SYSTEM_ARM_LIGHTWEIGHT_SUPERVISOR_PARAMS;
+
+
+
+/*
+* NV0073_CTRL_SYSTEM_CONFIG_VRR_PSTATE_SWITCH_PARAMS
+*
+* This command is used to configure pstate switch parameters on VRR monitors
+* subDeviceInstance
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed.This parameter must specify a value between zero and the
+* total number of subdevices within the parent device.This parameter
+* should be set to zero for default behavior.
+*
+* displayId
+* DisplayId of the monitor being vrr configured
+*
+* bVrrState
+* When set to NV_TRUE, signifies that the vrr is about to become active.
+* When set to NV_FALSE, signifies that the vrr is about to become suspended.
+*
+* bVrrDirty
+* When set to NV_TRUE, indicates that vrr configuration has been changed
+* When set to NV_FALSE, this will indicate transitions from One shot mode to
+* Continuous mode and vice versa
+*
+* bVrrEnabled
+* When set to NV_TRUE, indicates that vrr has been enabled, i.e. vBp extended by 2 lines
+*
+* maxVblankExtension
+* When VRR is enabled, this is the maximum amount of lines that the vblank can be extended.
+* Only updated when bVrrDirty = true
+*
+* internalVRRHeadVblankStretch
+* When VRR is enabled, this is the maximum amount of lines that the vblank can be extended.
+* On NVSR and DD panels . Only updated when bVrrDirty = true
+*
+* minVblankExtension
+* When VRR is enabled, this is the minimum amount of lines that should be present in the Vblank. The purpose is to cap the maximum refresh (currently only for HDMI 2.1 VRR compliance)
+*/
+#define NV0073_CTRL_CMD_SYSTEM_CONFIG_VRR_PSTATE_SWITCH (0x730184U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_CONFIG_VRR_PSTATE_SWITCH_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_CONFIG_VRR_PSTATE_SWITCH_PARAMS_MESSAGE_ID (0x84U)
+
+typedef struct NV0073_CTRL_SYSTEM_CONFIG_VRR_PSTATE_SWITCH_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bVrrState;
+ NvBool bVrrDirty;
+ NvBool bVrrEnabled;
+ NvU32 maxVblankExtension;
+ NvU32 internalVRRHeadVblankStretch;
+ NvU32 minVblankExtension;
+} NV0073_CTRL_SYSTEM_CONFIG_VRR_PSTATE_SWITCH_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_QUERY_DISPLAY_IDS_WITH_MUX
+ *
+ * This command is used to query the display mask of all displays
+ * that support dynamic display MUX.
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * displayMask (out)
+ * Mask of all displays that support dynamic display MUX
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_QUERY_DISPLAY_IDS_WITH_MUX (0x730190U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SYSTEM_QUERY_DISPLAY_IDS_WITH_MUX_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_SYSTEM_QUERY_DISPLAY_IDS_WITH_MUX_PARAMS_MESSAGE_ID (0x90U)
+
+typedef struct NV0073_CTRL_CMD_SYSTEM_QUERY_DISPLAY_IDS_WITH_MUX_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 muxDisplayMask;
+} NV0073_CTRL_CMD_SYSTEM_QUERY_DISPLAY_IDS_WITH_MUX_PARAMS;
+
+
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_ALLOCATE_DISPLAY_BANDWIDTH
+ *
+ * This command allocates a specified amount of ISO memory bandwidth for
+ * display. If the requested amount of bandwidth cannot be allocated (either
+ * because it exceeds the total bandwidth available to the system, or because
+ * too much bandwidth is already allocated to other clients), the call will
+ * fail and NV_ERR_INSUFFICIENT_RESOURCES will be returned.
+ *
+ * If bandwidth has already been allocated via a prior call, and a new
+ * allocation is requested, the new allocation will replace the old one. (If
+ * the new allocation fails, the old allocation remains in effect.)
+ *
+ * subDeviceInstance
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ * averageBandwidthKBPS
+ * This parameter specifies the amount of ISO memory bandwidth requested.
+ * floorBandwidthKBPS
+ * This parameter specifies the minimum required (i.e., floor) dramclk
+ * frequency, multiplied by the width of the pipe over which the display
+ * data will travel. (It is understood that the bandwidth calculated by
+ * multiplying the clock frequency by the pipe width will not be
+ * realistically achievable, due to overhead in the memory subsystem. The
+ * API will not actually use the bandwidth value, except to reverse the
+ * calculation to get the required dramclk frequency.)
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INSUFFICIENT_RESOURCES
+ * NV_ERR_NOT_SUPPORTED
+ * NV_ERR_GENERIC
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_ALLOCATE_DISPLAY_BANDWIDTH (0x730196U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_SYSTEM_ALLOCATE_DISPLAY_BANDWIDTH_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_SYSTEM_ALLOCATE_DISPLAY_BANDWIDTH_PARAMS_MESSAGE_ID (0x96U)
+
+typedef struct NV0073_CTRL_SYSTEM_ALLOCATE_DISPLAY_BANDWIDTH_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 averageBandwidthKBPS;
+ NvU32 floorBandwidthKBPS;
+} NV0073_CTRL_SYSTEM_ALLOCATE_DISPLAY_BANDWIDTH_PARAMS;
+
+/*
+ * NV0073_CTRL_SYSTEM_HOTPLUG_EVENT_CONFIG_PARAMS
+ *
+ * This structure represents the hotplug event config control parameters.
+ *
+ * subDeviceInstance
+ * This parameter should specify the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ *
+ * deviceMapFilter
+ * This parameter returns (in GET) or should specify (in SET) a device map
+ * indicating device(s) to sense.
+ *
+ * hotPluginSense
+ * This parameter returns (in GET) or should specify (in SET) a device map
+ * indicating device(s) plugged in that caused the most recent hotplug
+ * event.
+ *
+ * hotUnplugSense
+ * This parameter returns (in GET) or should specify (in SET) a device map
+ * indicating device(s) un plugged that caused the most recent hotplug
+ * event.
+ */
+
+typedef struct NV0073_CTRL_SYSTEM_HOTPLUG_EVENT_CONFIG_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 deviceMapFilter;
+ NvU32 hotPluginSense;
+ NvU32 hotUnplugSense;
+} NV0073_CTRL_SYSTEM_HOTPLUG_EVENT_CONFIG_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_GET_HOTPLUG_EVENT_CONFIG
+ *
+ * This command fetches the hotplug event configuration.
+ *
+ * See @ref NV0073_CTRL_SYSTEM_HOTPLUG_EVENT_CONFIG_PARAMS for documentation on
+ * the parameters.
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_GET_HOTPLUG_EVENT_CONFIG (0x730197U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | 0x97" */
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_SET_HOTPLUG_EVENT_CONFIG
+ *
+ * This command sets the hotplug event configuration.
+ *
+ * See @ref NV0073_CTRL_SYSTEM_HOTPLUG_EVENT_CONFIG_PARAMS for documentation on
+ * the parameters.
+ */
+
+#define NV0073_CTRL_CMD_SYSTEM_SET_HOTPLUG_EVENT_CONFIG (0x730198U) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | 0x98" */
+
+
+
+/*
+* NV0073_CTRL_CMD_SYSTEM_RECORD_CHANNEL_REGS
+*
+* This command is used to read Core channel, Cursor channel, Window channel, and Head register values and encode these values with ProtoDmp.
+*
+* subDeviceInstance (in)
+* This parameter specifies the subdevice instance within the
+* NV04_DISPLAY_COMMON parent device to which the operation should be
+* directed.
+* headMask (in)
+* Head mask representing which register values should be encoded
+* windowMask (in)
+* Window channel mask whose register values should be encoded
+* bRecordCoreChannel (in)
+* Indicates whether or not to encode core channel register values
+* bRecordCursorChannel (in)
+* Indicates whether or not to encode cursor channel register values
+*
+* Possible status values returned are:
+* NV_OK
+* NV_ERR_INVALID_ARGUMENT
+* NV_ERR_NOT_SUPPORTED
+*/
+#define NV0073_CTRL_CMD_SYSTEM_RECORD_CHANNEL_REGS (0x73019bU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SYSTEM_RECORD_CHANNEL_REGS_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_SYSTEM_RECORD_CHANNEL_REGS_PARAMS_MESSAGE_ID (0x9BU)
+
+typedef struct NV0073_CTRL_CMD_SYSTEM_RECORD_CHANNEL_REGS_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 headMask;
+ NvU32 windowMask;
+ NvBool bRecordCoreChannel;
+ NvBool bRecordCursorChannel;
+} NV0073_CTRL_CMD_SYSTEM_RECORD_CHANNEL_REGS_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_I2C_SUPPORT
+ *
+ * This command is used to query the display mux status for the given
+ * display device
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation should be
+ * directed.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_I2C_SUPPORT (0x73019cU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_I2C_SUPPORT_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_I2C_SUPPORT_PARAMS_MESSAGE_ID (0x9CU)
+
+typedef struct NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_I2C_SUPPORT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvBool bIsSidebandI2cSupported;
+} NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_I2C_SUPPORT_PARAMS;
+
+/*
+ * NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_SR_SUPPORT
+ *
+ * This command is used to query if SIDEBAND SR can be used with the
+ * given display device. If PSR API is supported on the system,
+ * then sideband SR support is set to false.
+ *
+ * subDeviceInstance (in)
+ * This parameter specifies the subdevice instance within the
+ * NV04_DISPLAY_COMMON parent device to which the operation
+ * should be directed.
+ * displayId (in)
+ * This parameter inputs the displayId of the active display. A value
+ * of zero indicates no display is active.
+ * bIsSidebandSrSupported
+ * If it is true, it means that sideband is supported and not PSR API.
+ *
+ * Possible status values returned are:
+ * NV_OK
+ * NV_ERR_INVALID_PARAM_STRUCT
+ * NV_ERR_INVALID_ARGUMENT
+ * NV_ERR_NOT_SUPPORTED
+ */
+#define NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_SR_SUPPORT (0x73019dU) /* finn: Evaluated from "(FINN_NV04_DISPLAY_COMMON_SYSTEM_INTERFACE_ID << 8) | NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_SR_SUPPORT_PARAMS_MESSAGE_ID" */
+
+#define NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_SR_SUPPORT_PARAMS_MESSAGE_ID (0x9DU)
+
+typedef struct NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_SR_SUPPORT_PARAMS {
+ NvU32 subDeviceInstance;
+ NvU32 displayId;
+ NvBool bIsSidebandSrSupported;
+} NV0073_CTRL_CMD_SYSTEM_CHECK_SIDEBAND_SR_SUPPORT_PARAMS;
+
+/* _ctrl0073system_h_ */
+