NV services: Difference between revisions

No edit summary
 
(30 intermediate revisions by 3 users not shown)
Line 64: Line 64:
Takes two input u32s '''Fd''' and '''EvtId'''. Returns an output u32 '''Err''' and an output Event handle.
Takes two input u32s '''Fd''' and '''EvtId'''. Returns an output u32 '''Err''' and an output Event handle.


QueryEvent is only supported on (and implemented differently on):
QueryEvent is only supported by:
* /dev/nvhost-gpu
* '''/dev/nvcec-ctrl'''
** EvtId=1: SmException_BptIntReport
** EvtId=0
** EvtId=2: SmException_BptPauseReport
** EvtId=1
** EvtId=2
** EvtId=3
** EvtId=4
** EvtId=5
** EvtId=6
** EvtId=7
** EvtId=8
** EvtId=9
 
* '''/dev/nvhdcp_up-ctrl'''
** EvtId=0: DphdcpStateEvent
 
* '''/dev/nvdisp-ctrl'''
** EvtId=0: HpdInEvent
** EvtId=1: HpdOutEvent
** EvtId=2: VblankHead0Event
 
* '''/dev/nvhost-gpu'''
** EvtId=1: BptIntEvent
** EvtId=2: BptPauseEvent
** EvtId=3: ErrorNotifierEvent
** EvtId=3: ErrorNotifierEvent
* /dev/nvhost-ctrl: Used to get events for syncpts.
 
** EvtId=(event_slot | ((syncpt_id & 0xFFF) << 16) | (is_valid << 28)): New format used by [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT|NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT]]/[[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT_EX|NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT_EX]].
* '''/dev/nvhost-ctrl'''
** EvtId=(event_slot | (syncpt_id << 4)): Old format used by [[#NVHOST_IOCTL_CTRL_SYNCPT_WAITEX|NVHOST_IOCTL_CTRL_SYNCPT_WAITEX]].
** EvtId=(EventSlot | ((SyncptId & 0xFFF) << 16) | (IsValid << 28)): New format used by [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT|NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT]]/[[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT_EX|NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT_EX]].
* /dev/nvhost-ctrl-gpu
** EvtId=(EventSlot | (SyncptId << 4)): Old format used by [[#NVHOST_IOCTL_CTRL_SYNCPT_WAITEX|NVHOST_IOCTL_CTRL_SYNCPT_WAITEX]].
** EvtId=1: Returns error_event_handle.
 
** EvtId=2: Returns unknown event.
* '''/dev/nvhost-ctrl-gpu'''
* /dev/nvhost-dbg-gpu
** EvtId=1: ErrorEvent
** Ignores EvtId.
** EvtId=2: SemaphoreEvent
 
* '''/dev/nvhost-dbg-gpu'''
** EvtId=Any: DbgEvents
 
* '''/dev/nvsched-ctrl'''
** EvtId=0: ApplicationAddedEvent
** EvtId=1: ApplicationUpdatedEvent
** EvtId=2: ApplicationMaxDebtUpdatedEvent
** EvtId=3: ApplicationRemovedEvent
** EvtId=4: ApplicationDetachedEvent
** EvtId=5: RunlistAddedEvent
** EvtId=6: RunlistUpdatedEvent
** EvtId=7: RunlistMaxDebtUpdatedEvent
** EvtId=8: RunlistLinkedEvent
** EvtId=9: RunlistUnlinkedEvent
** EvtId=10: RunlistRemovedEvent
** EvtId=11: ConductorSwapintervalUpdatedEvent
** EvtId=12: ChannelAcquiredEvent
** EvtId=13: ChannelReleasedEvent


== MapSharedMem ==
== MapSharedMem ==
Line 299: Line 338:
|-
|-
| 0xC0040022 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_GET_SHIFT]]
| 0xC0040022 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_GET_SHIFT]]
|-
| 0xC0080027 || Inout || 8 || [S2] NVHOST_IOCTL_CTRL_ALLOC_SYNCPT
|-
| 0x40040028 || In || 4 || [S2] NVHOST_IOCTL_CTRL_FREE_SYNCPT
|-
| 0xC010002A || Inout || 16 || [S2] NVHOST_IOCTL_CTRL_GET_CHARACTERISTICS
|-
| 0xC008002B || Inout || 8 || [S2] NVHOST_IOCTL_CTRL_CHECK_MODULE_SUPPORT
|}
|}


Line 593: Line 640:
! Value || Direction || Size || Description
! Value || Direction || Size || Description
|-
|-
| 0x80040212 || Out || 4 || NVDISP_CTRL_NUM_OUTPUTS
| 0x80040212 || Out || 4 || [[#NVDISP_CTRL_NUM_OUTPUTS]]
|-
|-
| 0xC0140213 || Inout || 20 || NVDISP_CTRL_GET_DISPLAY_PROPERTIES
| 0xC0140213 || Inout || 20 || NVDISP_CTRL_GET_DISPLAY_PROPERTIES
|-
|-
| 0xC1100214 || Inout || 272 || NVDISP_CTRL_QUERY_EDID
| 0xC2100214</br>([1.0.0-11.0.1] 0xC1100214) || Inout || 528</br>([1.0.0-11.0.1] 272) || NVDISP_CTRL_QUERY_EDID
|-
|-
| 0xC0080216</br>([1.0.0-3.0.0] 0xC0040216) || Inout || 8</br>([1.0.0-3.0.0] 4) || NVDISP_CTRL_GET_EXT_HPD_IN_OUT_EVENTS</br>([1.0.0-3.0.0] NVDISP_CTRL_GET_EXT_HPD_IN_EVENT)
| 0xC0080216</br>([1.0.0-3.0.0] 0xC0040216) || Inout || 8</br>([1.0.0-3.0.0] 4) || NVDISP_CTRL_GET_EXT_HPD_IN_OUT_EVENTS</br>([1.0.0-3.0.0] NVDISP_CTRL_GET_EXT_HPD_IN_EVENT)
|-
|-
| ([1.0.0-3.0.0] 0xC0040217) || ([1.0.0-3.0.0] Inout) || ([1.0.0-3.0.0] 4) || ([1.0.0-3.0.0] NVDISP_CTRL_GET_EXT_HPD_OUT_EVENT)
| 0xC0040217 || Inout || 4 || [1.0.0-3.0.0] NVDISP_CTRL_GET_EXT_HPD_OUT_EVENT
|-
|-
| 0xC0100218 || Inout || 16 || NVDISP_CTRL_GET_VBLANK_HEAD0_EVENT
| 0xC0100218 || Inout || 16 || NVDISP_CTRL_GET_VBLANK_HEAD0_EVENT
Line 609: Line 656:
| 0xC0040220 || Inout || 4 || NVDISP_CTRL_SUSPEND
| 0xC0040220 || Inout || 4 || NVDISP_CTRL_SUSPEND
|-
|-
| 0x80010224 || Out || 1 || [11.0.0+] NVDISP_CTRL_IS_DISPLAY_OLED
| 0x80010224 || Out || 1 || [11.0.0+] [[#NVDISP_CTRL_IS_DISPLAY_OLED]]
|}
|}
=== NVDISP_CTRL_NUM_OUTPUTS ===
  struct {
    __out u32 num_outputs;
  };
=== NVDISP_CTRL_IS_DISPLAY_OLED ===
This sets a boolean value based on the values of the system configuration.
Returns true if "nvservices!internal_display_vddpn_control" is set to false and "nvservices!external_display_full_dp_lanes" is set to true.
  struct {
    __out u8 is_display_oled;
  };


== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==
== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==
Line 646: Line 709:
| 0xC004020F || Inout || 4 || NVDISP_DPMS
| 0xC004020F || Inout || 4 || NVDISP_DPMS
|-
|-
| 0x80600210 || Out || 96 || NVDISP_GET_AVI_INFOFRAME
| 0x80600210 || Out || 96 || [[#NVDISP_GET_AVI_INFOFRAME]]
|-
|-
| 0x40600211 || In || 96 || NVDISP_SET_AVI_INFOFRAME
| 0x40600211 || In || 96 || [[#NVDISP_SET_AVI_INFOFRAME]]
|-
|-
| 0xEBFC0215 || Inout || 11260 || NVDISP_GET_MODE_DB
| 0xEBFC0215 || Inout || 11260 || [[#NVDISP_GET_MODE_DB]]
|-
|-
| 0xC003021A || Inout || 3 || [[#NVDISP_PANEL_GET_VENDOR_ID]]
| 0xC003021A || Inout || 3 || [[#NVDISP_PANEL_GET_VENDOR_ID]]
|-
|-
| 0x803C021B || Out || 60 || NVDISP_GET_MODE2
| 0x803C021B || Out || 60 || [[#NVDISP_GET_MODE2]]
|-
|-
| 0x403C021C || In || 60 || NVDISP_SET_MODE2
| 0x403C021C || In || 60 || [[#NVDISP_SET_MODE2]]
|-
|-
| 0xC03C021D || Inout || 60 || NVDISP_VALIDATE_MODE2
| 0xC03C021D || Inout || 60 || [[#NVDISP_VALIDATE_MODE2]]
|-
|-
| 0xEF20021E || Inout || 12064 || NVDISP_GET_MODE_DB2
| 0xEF20021E || Inout || 12064 || [[#NVDISP_GET_MODE_DB2]]
|-
|-
| 0xC004021F || Inout || 4 || NVDISP_GET_WINMASK
| 0xC004021F || Inout || 4 || NVDISP_GET_WINMASK
Line 735: Line 798:
   };
   };


=== NVDISP_PANEL_GET_VENDOR_ID ===
=== NVDISP_GET_AVI_INFOFRAME ===
 
Unpacked standard AVI infoframe struct (HDMI v1.4b/2.0)
Returns display panel's informations.


   struct {
   struct {
     __out u8 vendor; //0x10 - JDI, 0x20 - InnoLux, 0x30 - AUO, 0x40 - Sharp, 0x50 - Samsung
     __out u32 csum;
     __out u8 model;
     __out u32 scan;
     __out u8 board; //0xF - 6.2", 0x10 - 5.5", 0x20 - 7.0". JDI panels have nonstandard values
     __out u32 bar_valid;
    __out u32 act_fmt_valid;
    __out u32 rgb_ycc;
    __out u32 act_format;
    __out u32 aspect_ratio;
    __out u32 colorimetry;
    __out u32 scaling;
    __out u32 rgb_quant;
    __out u32 ext_colorimetry;
    __out u32 it_content;
    __out u32 video_format;
    __out u32 pix_rep;
    __out u32 it_content_type;
    __out u32 ycc_quant;
    __out u32 top_bar_end_line_lsb;
    __out u32 top_bar_end_line_msb;
    __out u32 bot_bar_start_line_lsb;
    __out u32 bot_bar_start_line_msb;
    __out u32 left_bar_end_pixel_lsb;
    __out u32 left_bar_end_pixel_msb;
    __out u32 right_bar_start_pixel_lsb;
    __out u32 right_bar_start_pixel_msb;
   };
   };


=== NVDISP_GET_BACKLIGHT_RANGE ===
=== NVDISP_SET_AVI_INFOFRAME ===
Returns the minimum and maximum values for the intensity of the display's backlight.
Unpacked standard AVI infoframe struct (HDMI v1.4b/2.0)
 
 
   struct {
   struct {
     __out u32 min;
     __in u32 csum;
     __out u32 max;
     __in u32 scan;
    __in u32 bar_valid;
    __in u32 act_fmt_valid;
    __in u32 rgb_ycc;
    __in u32 act_format;
    __in u32 aspect_ratio;
    __in u32 colorimetry;
    __in u32 scaling;
    __in u32 rgb_quant;
    __in u32 ext_colorimetry;
    __in u32 it_content;
    __in u32 video_format;
    __in u32 pix_rep;
    __in u32 it_content_type;
    __in u32 ycc_quant;
    __in u32 top_bar_end_line_lsb;
    __in u32 top_bar_end_line_msb;
    __in u32 bot_bar_start_line_lsb;
    __in u32 bot_bar_start_line_msb;
    __in u32 left_bar_end_pixel_lsb;
    __in u32 left_bar_end_pixel_msb;
    __in u32 right_bar_start_pixel_lsb;
    __in u32 right_bar_start_pixel_msb;
   };
   };


=== NVDISP_SET_BACKLIGHT_RANGE_MAX ===
=== NVDISP_GET_MODE_DB ===
Sets the maximum value for the intensity of the display's backlight.
Almost identical to Linux driver.


  struct mode {
    u32 hActive;
    u32 vActive;
    u32 hSyncWidth;
    u32 vSyncWidth;
    u32 hFrontPorch;
    u32 vFrontPorch;
    u32 hBackPorch;
    u32 vBackPorch;
    u32 hRefToSync;
    u32 vRefToSync;
    u32 pclkKHz;
    u32 bitsPerPixel;
    u32 vmode;
    u32 sync;
  };
   struct {
   struct {
     __in u32 max;
     __out struct mode modes[201];
    __out u32 num_modes;
   };
   };


=== NVDISP_SET_BACKLIGHT_RANGE_MIN ===
=== NVDISP_PANEL_GET_VENDOR_ID ===
Sets the minimum value for the intensity of the display's backlight.
 
Returns display panel's informations.


   struct {
   struct {
     __in u32 min;
     __out u8 vendor; //0x10 - JDI, 0x20 - InnoLux, 0x30 - AUO, 0x40 - Sharp, 0x50 - Samsung
    __out u8 model;
    __out u8 board; //0xF - 6.2", 0x10 - 5.5", 0x20 - 7.0". JDI panels have nonstandard values
   };
   };


=== NVDISP_SEND_PANEL_MSG ===
=== NVDISP_GET_MODE2 ===
Sends raw data to the display panel over DPAUX.


   struct {
   struct {
     __in u32 cmd;         // DPAUX AUXCTL command (1=unk, 2=I2CWR, 4=MOTWR, 7=AUXWR)
     __out u32 unk0;             //Always 0
     __in u32 addr;         // DPAUX AUXADDR
     __out u32 hActive;
     __in u32 size;         // message size
    __out u32 vActive;
     __in u32 msg[4];       // raw AUXDATA message
    __out u32 hSyncWidth;
    __out u32 vSyncWidth;
    __out u32 hFrontPorch;
    __out u32 vFrontPorch;
    __out u32 hBackPorch;
    __out u32 vBackPorch;
    __out u32 pclkKHz;
    __out u32 bitsPerPixel;      // Always 0
     __out u32 vmode;             // Always 0
    __out u32 sync;
     __out u32 unk1;
    __out u32 reserved;
   };
   };


=== NVDISP_GET_PANEL_DATA ===
=== NVDISP_SET_MODE2 ===
Receives raw data from the display panel over DPAUX.


   struct {
   struct {
     __in u32 cmd;         // DPAUX AUXCTL command (3=I2CRD, 5=MOTRD, 6=AUXRD)
     __in u32 unk0;
     __in u32 addr;         // DPAUX AUXADDR
     __in u32 hActive;
     __in u32 size;         // message size
     __in u32 vActive;
     __out u32 msg[4];     // raw AUXDATA message
     __in u32 hSyncWidth;
  };
    __in u32 vSyncWidth;
 
    __in u32 hFrontPorch;
== /dev/nvcec-ctrl ==
    __in u32 vFrontPorch;
{| class="wikitable" border="1"
    __in u32 hBackPorch;
! Value || Direction || Size || Description
    __in u32 vBackPorch;
|-
    __in u32 pclkKHz;
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE
    __in u32 bitsPerPixel;
|-
    __in u32 vmode;
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR
    __in u32 sync;
|-
    __in u32 unk1;
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR
    __in u32 reserved;
|-
  };
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE
 
|-
=== NVDISP_VALIDATE_MODE2 ===
| 0xC04C0305 || Inout || 76 || NVCEC_CTRL_READ
|-
| 0x804C0306 || Out || 76 || NVCEC_CTRL_GET_CONNECTION_STATUS
|-
| 0x804C0307 || Out || 76 || NVCEC_CTRL_GET_WRITE_STATUS
|}


== /dev/nvhdcp_up-ctrl ==
  struct {
{| class="wikitable" border="1"
    __inout u32 unk0;
! Value || Direction || Size || Description
    __inout u32 hActive;
|-
    __inout u32 vActive;
| 0xC4880401 || Inout || 1160 || NVHDCP_READ_STATUS
    __inout u32 hSyncWidth;
|-
    __inout u32 vSyncWidth;
| 0xC4880402 || Inout || 1160 || NVHDCP_READ_M
    __inout u32 hFrontPorch;
|-
    __inout u32 vFrontPorch;
| 0x40010403 || In || 1 || NVHDCP_ENABLE
    __inout u32 hBackPorch;
|-
    __inout u32 vBackPorch;
| 0xC0080404 || Inout || 8 || NVHDCP_CTRL_STATE_TRANSIT_EVENT_DATA
    __inout u32 pclkKHz;
|-
    __inout u32 bitsPerPixel;
| 0xC0010405 || Inout || 1 || NVHDCP_CTRL_STATE_CB
    __inout u32 vmode;
|}
    __inout u32 sync;
    __inout u32 unk1;
    __inout u32 reserved;
  };
 
=== NVDISP_GET_MODE_DB2 ===


== /dev/nvdcutil-disp0, /dev/nvdcutil-disp1 ==
  struct mode2 {
{| class="wikitable" border="1"
    u32 unk0;
! Value || Direction || Size || Description
    u32 hActive;
|-
    u32 vActive;
| 0x40010501 || In || 1 || NVDCUTIL_ENABLE_CRC
    u32 hSyncWidth;
|-
    u32 vSyncWidth;
| 0x40010502 || In || 1 || NVDCUTIL_VIRTUAL_EDID_ENABLE
    u32 hFrontPorch;
|-
    u32 vFrontPorch;
| 0x42040503 || In || 1056 || NVDCUTIL_VIRTUAL_EDID_SET_DATA
    u32 hBackPorch;
|-
    u32 vBackPorch;
| 0x803C0504 || Out || 60 || NVDCUTIL_GET_MODE
    u32 pclkKHz;
|-
    u32 bitsPerPixel;
| 0x40010505 || In || 1 || NVDCUTIL_BEGIN_TELEMETRY_TEST
    u32 vmode;
|-
    u32 sync;
| 0x400C0506 || In || 12 || NVDCUTIL_DSI_PACKET_TEST_SHORT_WRITE
    u32 unk1;
|-
    u32 reserved;
| 0x40F80507 || In || 248 || NVDCUTIL_DSI_PACKET_TEST_LONG_WRITE
  };
|-
| 0xC0F40508 || Inout || 244 || NVDCUTIL_DSI_PACKET_TEST_READ
  struct {
|-
    __out struct mode2 modes[201];
| 0x40010509 || In || 1 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_EN
    __out u32 num_modes;
|-
  };
| 0xC020050A || Inout || 32 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_SETTINGS
|-
| 0x8070050B || Out || 112 || [11.0.0+] NVDCUTIL_DP_CONF_READ
|}


== /dev/nvsched-ctrl ==
=== NVDISP_GET_BACKLIGHT_RANGE ===
This is a customized scheduler device.
Returns the minimum and maximum values for the intensity of the display's backlight.
 
  struct {
    __out u32 min;
    __out u32 max;
  };
 
=== NVDISP_SET_BACKLIGHT_RANGE_MAX ===
Sets the maximum value for the intensity of the display's backlight.
 
  struct {
    __in u32 max;
  };


The way this device is exposed and configured is exclusive to the Switch, since other sources don't have an actual interface for the scheduler.
=== NVDISP_SET_BACKLIGHT_RANGE_MIN ===
Sets the minimum value for the intensity of the display's backlight.


{| class="wikitable" border="1"
  struct {
! Value || Direction || Size || Description
    __in u32 min;
|-
  };
| 0x00000601 || - || 0 || [[#NVSCHED_CTRL_ENABLE]]
 
|-
=== NVDISP_SEND_PANEL_MSG ===
| 0x00000602 || - || 0 || [[#NVSCHED_CTRL_DISABLE]]
Sends raw data to the display panel over DPAUX.
|-
 
| 0x40180603 || In || 24 || [[#NVSCHED_CTRL_ADD_APPLICATION]]
  struct {
|-
    __in u32 cmd;          // DPAUX AUXCTL command (1=unk, 2=I2CWR, 4=MOTWR, 7=AUXWR)
| 0x40180604 || In || 24 || [[#NVSCHED_CTRL_UPDATE_APPLICATION]]
    __in u32 addr;        // DPAUX AUXADDR
    __in u32 size;        // message size
    __in u32 msg[4];      // raw AUXDATA message
  };
 
=== NVDISP_GET_PANEL_DATA ===
Receives raw data from the display panel over DPAUX.
 
  struct {
    __in u32 cmd;          // DPAUX AUXCTL command (3=I2CRD, 5=MOTRD, 6=AUXRD)
    __in u32 addr;        // DPAUX AUXADDR
    __in u32 size;        // message size
    __out u32 msg[4];      // raw AUXDATA message
  };
 
== /dev/nvcec-ctrl ==
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
|-
| 0x40080605 || In || 8 || [[#NVSCHED_CTRL_REMOVE_APPLICATION]]
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE
|-
|-
| 0x80080606 || Out || 8 || [[#NVSCHED_CTRL_GET_ID]]
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR
|-
|-
| 0x80080607 || Out || 8 || [[#NVSCHED_CTRL_ADD_RUNLIST]]
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR
|-
|-
| 0x40180608 || In || 24 || [[#NVSCHED_CTRL_UPDATE_RUNLIST]]
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE
|-
|-
| 0x40100609 || In || 16 || [[#NVSCHED_CTRL_LINK_RUNLIST]]
| 0xC04C0305 || Inout || 76 || NVCEC_CTRL_READ
|-
|-
| 0x4010060A || In || 16 || [[#NVSCHED_CTRL_UNLINK_RUNLIST]]
| 0x804C0306 || Out || 76 || NVCEC_CTRL_GET_CONNECTION_STATUS
|-
|-
| 0x4008060B || In || 8 || [[#NVSCHED_CTRL_REMOVE_RUNLIST]]
| 0x804C0307 || Out || 76 || NVCEC_CTRL_GET_WRITE_STATUS
|}
 
== /dev/nvhdcp_up-ctrl ==
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
|-
| 0x8001060C || Out || 1 || [[#NVSCHED_CTRL_HAS_OVERRUN_EVENT]]
| 0xC4880401 || Inout || 1160 || NVHDCP_READ_STATUS
|-
|-
| 0x8020060D</br>([1.0.0-3.0.0] 0x8010060D) || Out || 32</br>([1.0.0-3.0.0] 16) || [[#NVSCHED_CTRL_GET_NEXT_OVERRUN_EVENT]]
| 0xC4880402 || Inout || 1160 || NVHDCP_READ_M
|-
|-
| 0x400C060E || In || 12 || [[#NVSCHED_CTRL_PUT_CONDUCTOR_FLIP_FENCE]]
| 0x40010403 || In || 1 || NVHDCP_ENABLE
|-
|-
| 0x4008060F || In || 8 || [[#NVSCHED_CTRL_DETACH_APPLICATION]]
| 0xC0080404 || Inout || 8 || NVHDCP_CTRL_STATE_TRANSIT_EVENT_DATA
|-
|-
| 0x40100610 || In || 16 || NVSCHED_CTRL_SET_APPLICATION_MAX_DEBT
| 0xC0010405 || Inout || 1 || NVHDCP_CTRL_STATE_CB
|}
 
== /dev/nvdcutil-disp0, /dev/nvdcutil-disp1 ==
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
| 0x40010501 || In || 1 || NVDCUTIL_ENABLE_CRC
|-
| 0x40010502 || In || 1 || [[#NVDCUTIL_VIRTUAL_EDID_ENABLE]]
|-
| 0x42040503 || In || 516 || [[#NVDCUTIL_VIRTUAL_EDID_SET_DATA]]
|-
| 0x803C0504 || Out || 60 || NVDCUTIL_GET_MODE
|-
| 0x40010505 || In || 1 || NVDCUTIL_BEGIN_TELEMETRY_TEST
|-
| 0x400C0506 || In || 12 || NVDCUTIL_DSI_PACKET_TEST_SHORT_WRITE
|-
| 0x40F80507 || In || 248 || NVDCUTIL_DSI_PACKET_TEST_LONG_WRITE
|-
| 0xC0F40508 || Inout || 244 || NVDCUTIL_DSI_PACKET_TEST_READ
|-
|-
| 0x40100611 || In || 16 || NVSCHED_CTRL_SET_RUNLIST_MAX_DEBT
| 0x40010509 || In || 1 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_EN
|-
| 0xC020050A || Inout || 32 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_SETTINGS
|-
|-
| 0x40010612 || In || 1 || NVSCHED_CTRL_OVERRUN_EVENTS_ENABLE
| 0x8070050B || Out || 112 || [11.0.0+] NVDCUTIL_DP_CONF_READ
|}
|}


=== NVSCHED_CTRL_ENABLE ===
=== NVDCUTIL_VIRTUAL_EDID_ENABLE ===
Enables the scheduler.


=== NVSCHED_CTRL_DISABLE ===
   struct {
Disables the scheduler.
     __in u8 enable;
 
=== NVSCHED_CTRL_ADD_APPLICATION ===
Adds a new application to the scheduler.
 
   struct {
     __in u64 application_id;
    __in u64 priority;
    __in u64 timeslice;
   };
   };


=== NVSCHED_CTRL_UPDATE_APPLICATION ===
=== NVDCUTIL_VIRTUAL_EDID_SET_DATA ===
Updates the application parameters in the scheduler.


   struct {
   struct {
     __in u64 application_id;
     __in u8 edid[512];
     __in u64 priority;
     __in u32 edid_size;
    __in u64 timeslice;
   };
   };


=== NVSCHED_CTRL_REMOVE_APPLICATION ===
== /dev/nvsched-ctrl ==
Removes the application from the scheduler.
This is a customized scheduler device.


  struct {
The way this device is exposed and configured is exclusive to the Switch, since other sources don't have an actual interface for the scheduler.
    __in u64 application_id;
  };


=== NVSCHED_CTRL_GET_ID ===
{| class="wikitable" border="1"
Returns the ID of the last scheduled object.
! Value || Direction || Size || Description
 
|-
  struct {
| 0x00000601 || - || 0 || [[#NVSCHED_CTRL_ENABLE]]
    __out u64 id;
|-
  };
| 0x00000602 || - || 0 || [[#NVSCHED_CTRL_DISABLE]]
 
|-
=== NVSCHED_CTRL_ADD_RUNLIST ===
| 0x40180603 || In || 24 || [[#NVSCHED_CTRL_ADD_APPLICATION]]
Creates a new runlist and returns it's ID.
|-
 
| 0x40180604 || In || 24 || [[#NVSCHED_CTRL_UPDATE_APPLICATION]]
  struct {
|-
    __out u64 runlist_id;
| 0x40080605 || In || 8 || [[#NVSCHED_CTRL_REMOVE_APPLICATION]]
  };
|-
 
| 0x80080606 || Out || 8 || [[#NVSCHED_CTRL_GET_ID]]
=== NVSCHED_CTRL_UPDATE_RUNLIST ===
|-
Updates the runlist parameters in the scheduler.
| 0x80080607 || Out || 8 || [[#NVSCHED_CTRL_ADD_RUNLIST]]
 
|-
  struct {
| 0x40180608 || In || 24 || [[#NVSCHED_CTRL_UPDATE_RUNLIST]]
    __in u64 runlist_id;
|-
    __in u64 priority;
| 0x40100609 || In || 16 || [[#NVSCHED_CTRL_LINK_RUNLIST]]
    __in u64 timeslice;
|-
  };
| 0x4010060A || In || 16 || [[#NVSCHED_CTRL_UNLINK_RUNLIST]]
|-
| 0x4008060B || In || 8 || [[#NVSCHED_CTRL_REMOVE_RUNLIST]]
|-
| 0x8001060C || Out || 1 || [[#NVSCHED_CTRL_HAS_OVERRUN_EVENT]]
|-
| 0x8020060D</br>([1.0.0-3.0.0] 0x8010060D) || Out || 32</br>([1.0.0-3.0.0] 16) || [[#NVSCHED_CTRL_GET_NEXT_OVERRUN_EVENT]]
|-
| 0x400C060E || In || 12 || [[#NVSCHED_CTRL_PUT_CONDUCTOR_FLIP_FENCE]]
|-
| 0x4008060F || In || 8 || [[#NVSCHED_CTRL_DETACH_APPLICATION]]
|-
| 0x40100610 || In || 16 || NVSCHED_CTRL_SET_APPLICATION_MAX_DEBT
|-
| 0x40100611 || In || 16 || NVSCHED_CTRL_SET_RUNLIST_MAX_DEBT
|-
| 0x40010612 || In || 1 || NVSCHED_CTRL_OVERRUN_EVENTS_ENABLE
|}


=== NVSCHED_CTRL_LINK_RUNLIST ===
=== NVSCHED_CTRL_ENABLE ===
Links a runlist to a given application in the scheduler.
Enables the scheduler.
 
=== NVSCHED_CTRL_DISABLE ===
Disables the scheduler.
 
=== NVSCHED_CTRL_ADD_APPLICATION ===
Adds a new application to the scheduler.


   struct {
   struct {
    __in u64 runlist_id;
     __in u64 application_id;
     __in u64 application_id;
    __in u64 priority;
    __in u64 timeslice;
   };
   };


=== NVSCHED_CTRL_UNLINK_RUNLIST ===
=== NVSCHED_CTRL_UPDATE_APPLICATION ===
Unlinks a runlist from a given application in the scheduler.
Updates the application parameters in the scheduler.


   struct {
   struct {
    __in u64 runlist_id;
     __in u64 application_id;
     __in u64 application_id;
    __in u64 priority;
    __in u64 timeslice;
   };
   };


=== NVSCHED_CTRL_REMOVE_RUNLIST ===
=== NVSCHED_CTRL_REMOVE_APPLICATION ===
Removes the runlist from the scheduler.
Removes the application from the scheduler.


   struct {
   struct {
     __in u64 runlist_id;
     __in u64 application_id;
   };
   };


=== NVSCHED_CTRL_HAS_OVERRUN_EVENT ===
=== NVSCHED_CTRL_GET_ID ===
Returns a boolean to tell if the scheduler has an overrun event or not.
Returns the ID of the last scheduled object.


   struct {
   struct {
     __out u8 has_overrun;
     __out u64 id;
   };
   };


=== NVSCHED_CTRL_GET_NEXT_OVERRUN_EVENT ===
=== NVSCHED_CTRL_ADD_RUNLIST ===
Returns the overrun event's data from the scheduler.
Creates a new runlist and returns it's ID.


   struct {
   struct {
     __out u64 runlist_id;
     __out u64 runlist_id;
    __out u64 debt;
    __out u64 unk0;          // 3.0.0+ only
    __out u64 unk1;          // 3.0.0+ only
   };
   };


=== NVSCHED_CTRL_PUT_CONDUCTOR_FLIP_FENCE ===
=== NVSCHED_CTRL_UPDATE_RUNLIST ===
Installs a fence swap event?
Updates the runlist parameters in the scheduler.


   struct {
   struct {
     __in u32 fence_id;
     __in u64 runlist_id;
     __in u32 fence_value;
     __in u64 priority;
     __in u32 swap_interval;
     __in u64 timeslice;
   };
   };


=== NVSCHED_CTRL_DETACH_APPLICATION ===
=== NVSCHED_CTRL_LINK_RUNLIST ===
Places the given application in detached state.
Links a runlist to a given application in the scheduler.


   struct {
   struct {
    __in u64 runlist_id;
     __in u64 application_id;
     __in u64 application_id;
   };
   };


== /dev/nverpt-ctrl ==
=== NVSCHED_CTRL_UNLINK_RUNLIST ===
Added in firmware version 3.0.0.
Unlinks a runlist from a given application in the scheduler.


{| class="wikitable" border="1"
  struct {
! Value || Direction || Size || Description
    __in u64 runlist_id;
|-
    __in u64 application_id;
| 0xC1280701 || Inout || 296 || [[#NVERPT_TELEMETRY_SUBMIT_DATA]]
  };
|-
| 0xCF580702 || Inout || 3928 || [[#NVERPT_TELEMETRY_SUBMIT_DISPLAY_DATA]]
|}


=== NVERPT_TELEMETRY_SUBMIT_DATA ===
=== NVSCHED_CTRL_REMOVE_RUNLIST ===
Sends test data for creating a new [[Error_Report_services|Error Report]].
Removes the runlist from the scheduler.


   struct {
   struct {
     __in u64 TestU64;
     __in u64 runlist_id;
    __in u32 TestU32;
  };
    __in u8  padding0[4];
 
    __in s64 TestI64;
=== NVSCHED_CTRL_HAS_OVERRUN_EVENT ===
    __in s32 TestI32;
Returns a boolean to tell if the scheduler has an overrun event or not.
    __in u8  TestString[32];
 
    __in u8  TestU8Array[8];
  struct {
    __in u32 TestU8Array_size;
     __out u8 has_overrun;
    __in u32 TestU32Array[8];
    __in u32 TestU32Array_size;
    __in u64 TestU64Array[8];
    __in u32 TestU64Array_size;
    __in s32 TestI32Array[8];
    __in u32 TestI32Array_size;
    __in s64 TestI64Array[8];
    __in u32 TestI64Array_size;
    __in u16 TestU16;
    __in u8  TestU8;
    __in s16 TestI16;
    __in s8  TestI8;
     __in u8 padding1[5];
   };
   };


=== NVERPT_TELEMETRY_SUBMIT_DISPLAY_DATA ===
=== NVSCHED_CTRL_GET_NEXT_OVERRUN_EVENT ===
Sends display data for creating a new [[Error_Report_services|Error Report]].
Returns the overrun event's data from the scheduler.


   struct {
   struct {
     __in u32 CodecType;
     __out u64 runlist_id;
     __in u32 DecodeBuffers;
     __out u64 debt;
     __in u32 FrameWidth;
     __out u64 unk0;           // 3.0.0+ only
    __in u32 FrameHeight;
     __out u64 unk1;           // 3.0.0+ only
    __in u8  ColorPrimaries;
    __in u8  TransferCharacteristics;
     __in u8  MatrixCoefficients;
    __in u8  padding;
    __in u32 DisplayWidth;
    __in u32 DisplayHeight;
    __in u32 DARWidth;
    __in u32 DARHeight;
    __in u32 ColorFormat;
    __in u32 ColorSpace[8];
    __in u32 ColorSpace_size;
    __in u32 SurfaceLayout[8];
    __in u32 SurfaceLayout_size;
    __in u8  ErrorString[64];      // must be "Error detected = 0x1000000"
    __in u32 VideoDecState;
    __in u8  VideoLog[3712];
    __in u32 VideoLog_size;
   };
   };


== /dev/nvhost-as-gpu ==
=== NVSCHED_CTRL_PUT_CONDUCTOR_FLIP_FENCE ===
Each fd opened to this device creates an address space. An address space is then later bound with a channel.
Installs a fence swap event?


Once a nvgpu channel has been bound to an address space it cannot be unbound. There is no support for allowing an nvgpu channel to change from one address space to another (or from one to none).
  struct {
                                                                                                                             
    __in u32 fence_id;
{| class="wikitable" border="1"
    __in u32 fence_value;
    __in u32 swap_interval;
  };
 
=== NVSCHED_CTRL_DETACH_APPLICATION ===
Places the given application in detached state.
 
  struct {
    __in u64 application_id;
  };
 
== /dev/nverpt-ctrl ==
Added in firmware version 3.0.0.
 
{| class="wikitable" border="1"
! Value || Direction || Size || Description
! Value || Direction || Size || Description
|-
|-
| 0x40044101 || In || 4 || [[#NVGPU_AS_IOCTL_BIND_CHANNEL]]
| 0xC1280701 || Inout || 296 || [[#NVERPT_TELEMETRY_SUBMIT_DATA]]
|-
|-
| 0xC0184102 || Inout || 24 || [[#NVGPU_AS_IOCTL_ALLOC_SPACE]]
| 0xCF580702 || Inout || 3928 || [[#NVERPT_TELEMETRY_SUBMIT_DISPLAY_DATA]]
|-
|}
| 0xC0104103 || Inout || 16 || [[#NVGPU_AS_IOCTL_FREE_SPACE]]
 
|-
=== NVERPT_TELEMETRY_SUBMIT_DATA ===
| 0xC0184104 || Inout || 24 || [[#NVGPU_AS_IOCTL_MAP_BUFFER]]
Sends test data for creating a new [[Error_Report_services|Error Report]].
|-
 
| 0xC0084105 || Inout || 8 || [[#NVGPU_AS_IOCTL_UNMAP_BUFFER]]
|-
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]]
|-
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_ALLOC_AS]]
|-
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]]
|-
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_ALLOC_AS_EX]]
|-
| 0xC038410A || Inout || 56 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX2]]
|-
| 0xC0??4114 || Inout || Variable || [[#NVGPU_AS_IOCTL_REMAP]]
|}
 
=== NVGPU_AS_IOCTL_BIND_CHANNEL ===
Identical to Linux driver.
 
   struct {
   struct {
     __in u32 channel_fd;
    __in u64 TestU64;
   };
    __in u32 TestU32;
 
    __in u8  padding0[4];
=== NVGPU_AS_IOCTL_ALLOC_SPACE ===
    __in s64 TestI64;
Reserves pages in the device address space.
    __in s32 TestI32;
    __in u8  TestString[32];
    __in u8  TestU8Array[8];
    __in u32 TestU8Array_size;
    __in u32 TestU32Array[8];
    __in u32 TestU32Array_size;
    __in u64 TestU64Array[8];
    __in u32 TestU64Array_size;
    __in s32 TestI32Array[8];
     __in u32 TestI32Array_size;
    __in s64 TestI64Array[8];
    __in u32 TestI64Array_size;
    __in u16 TestU16;
    __in u8  TestU8;
    __in s16 TestI16;
    __in s8  TestI8;
    __in u8  padding1[5];
   };
 
=== NVERPT_TELEMETRY_SUBMIT_DISPLAY_DATA ===
Sends display data for creating a new [[Error_Report_services|Error Report]].


   struct {
   struct {
     __in u32 pages;
     __in u32 CodecType;
     __in u32 page_size;
     __in u32 DecodeBuffers;
     __in u32 flags;
     __in u32 FrameWidth;
     u32     padding;
     __in u32 FrameHeight;
     union {
    __in u8  ColorPrimaries;
       __out u64 offset;
    __in u8  TransferCharacteristics;
      __in  u64 align;
    __in u8  MatrixCoefficients;
     };
    __in u8  padding;
     __in u32 DisplayWidth;
    __in u32 DisplayHeight;
    __in u32 DARWidth;
    __in u32 DARHeight;
    __in u32 ColorFormat;
    __in u32 ColorSpace[8];
    __in u32 ColorSpace_size;
    __in u32 SurfaceLayout[8];
    __in u32 SurfaceLayout_size;
    __in u8  ErrorString[64];       // must be "Error detected = 0x1000000"
    __in u32 VideoDecState;
    __in u8 VideoLog[3712];
     __in u32 VideoLog_size;
   };
   };


=== NVGPU_AS_IOCTL_FREE_SPACE ===
== /dev/nvhost-as-gpu ==
Frees pages from the device address space.
Each fd opened to this device creates an address space. An address space is then later bound with a channel.


  struct {
Once a nvgpu channel has been bound to an address space it cannot be unbound. There is no support for allowing an nvgpu channel to change from one address space to another (or from one to none).
    __in u64 offset;
                                                                                                                             
    __in u32 pages;
{| class="wikitable" border="1"
    __in u32 page_size;
! Value || Direction || Size || Description
  };
|-
 
| 0x40044101 || In || 4 || [[#NVGPU_AS_IOCTL_BIND_CHANNEL]]
=== NVGPU_AS_IOCTL_MAP_BUFFER ===
|-
Maps a memory region in the device address space.
| 0xC0184102 || Inout || 24 || [[#NVGPU_AS_IOCTL_ALLOC_SPACE]]
 
|-
Unaligned size will cause a [[#Panic]].
| 0xC0104103 || Inout || 16 || [[#NVGPU_AS_IOCTL_FREE_SPACE]]
 
|-
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute.
| 0xC0184104 || Inout || 24 || [[#NVGPU_AS_IOCTL_MAP_BUFFER]]
 
|-
  struct {
| 0xC0084105 || Inout || 8 || [[#NVGPU_AS_IOCTL_UNMAP_BUFFER]]
    __in    u32 flags;        // bit0: fixed_offset, bit2: cacheable
|-
    u32        reserved0;
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]]
    __in    u32 mem_id;      // nvmap handle
|-
    u32        reserved1;
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_ALLOC_AS]]
    union {
|-
      __out u64 offset;
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]]
      __in  u64 align;
|-
    };
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_ALLOC_AS_EX]]
  };
|-
| 0xC038410A || Inout || 56 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX2]]
|-
| 0x8010410B || Out || 16 || [S2] NVGPU_AS_IOCTL_GET_SYNC_RO_MAP
|-
| 0xC020410C || Inout || 32 || [S2] NVGPU_AS_IOCTL_MAPPING_MODIFY
|-
| 0xC???410D || Inout || Variable || [S2] NVGPU_AS_IOCTL_REMAP
|-
| 0xC0??4114 || Inout || Variable || [[#NVGPU_AS_IOCTL_REMAP]]
|}


=== NVGPU_AS_IOCTL_MAP_BUFFER_EX ===
=== NVGPU_AS_IOCTL_BIND_CHANNEL ===
Maps a memory region in the device address space with extra params.
Identical to Linux driver.


Unaligned size will cause a [[#Panic]].
  struct {
    __in u32 channel_fd;
  };


On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute.
=== NVGPU_AS_IOCTL_ALLOC_SPACE ===
Reserves pages in the device address space.


   struct {
   struct {
     __in     u32 flags;         // bit0: fixed_offset, bit2: cacheable
     __in u32 pages;
     __inout  u32 kind;           // -1 is default
     __in u32 page_size;
     __in     u32 mem_id;         // nvmap handle
     __in u32 flags;
     u32           reserved;
     u32      padding;
    __in      u64 buffer_offset;
    __in     u64 mapping_size;
     union {
     union {
       __out   u64 offset;
       __out u64 offset;
       __in   u64 align;
       __in u64 align;
     };
     };
   };
   };


=== NVGPU_AS_IOCTL_UNMAP_BUFFER ===
=== NVGPU_AS_IOCTL_FREE_SPACE ===
Unmaps a memory region from the device address space.
Frees pages from the device address space.


struct {
  struct {
     __in u64 offset;
     __in u64 offset;
    __in u32 pages;
    __in u32 page_size;
   };
   };


=== NVGPU_AS_IOCTL_ALLOC_AS ===
=== NVGPU_AS_IOCTL_MAP_BUFFER ===
Nintendo's custom implementation for allocating an address space.
Maps a memory region in the device address space.
 
Unaligned size will cause a [[#Panic]].
 
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute.


   struct {
   struct {
     __in u32 big_page_size;   // depends on GPU's available_big_page_sizes; 0=default
     __in   u32 flags;       // bit0: fixed_offset, bit2: cacheable
     __in s32 as_fd;           // ignored; passes 0
    u32        reserved0;
     __in u64 reserved;       // ignored; passes 0
     __in   u32 mem_id;       // nvmap handle
    u32        reserved1;
     union {
      __out u64 offset;
      __in u64 align;
    };
   };
   };


=== NVGPU_AS_IOCTL_GET_VA_REGIONS ===
=== NVGPU_AS_IOCTL_MAP_BUFFER_EX ===
Nintendo's custom implementation to get rid of pointer in struct.
Maps a memory region in the device address space with extra params.
 
Unaligned size will cause a [[#Panic]].


Uses [[#Ioctl3|Ioctl3]].
On success, the mapped memory region is granted the [[SVC#MemoryAttribute|DeviceShared]] attribute.


  struct va_region {
    u64 offset;
    u32 page_size;
    u32 reserved;
    u64 pages;
  };
 
   struct {
   struct {
     u64          buf_addr;   // (contained output user ptr on linux, ignored)
     __in      u32 flags;         // bit0: fixed_offset, bit2: cacheable
     __inout u32   buf_size;   // forced to 2*sizeof(struct va_region)
     __inout   u32 kind;          // -1 is default
    __in      u32 mem_id;         // nvmap handle
     u32          reserved;
     u32          reserved;
     __out struct va_region regions[2];
     __in      u64 buffer_offset;
    __in      u64 mapping_size;
    union {
      __out   u64 offset;
      __in    u64 align;
    };
  };
 
=== NVGPU_AS_IOCTL_UNMAP_BUFFER ===
Unmaps a memory region from the device address space.
 
struct {
    __in u64 offset;
   };
   };


=== NVGPU_AS_IOCTL_ALLOC_AS_EX ===
=== NVGPU_AS_IOCTL_ALLOC_AS ===
Nintendo's custom implementation for allocating an address space with extra params.
Nintendo's custom implementation for allocating an address space.
 
  struct {
    __in u32 big_page_size;  // depends on GPU's available_big_page_sizes; 0=default
    __in s32 as_fd;          // ignored; passes 0
    __in u64 reserved;        // ignored; passes 0
  };
 
=== NVGPU_AS_IOCTL_GET_VA_REGIONS ===
Nintendo's custom implementation to get rid of pointer in struct.
 
Uses [[#Ioctl3|Ioctl3]].
 
  struct va_region {
    u64 offset;
    u32 page_size;
    u32 reserved;
    u64 pages;
  };
 
  struct {
    u64          buf_addr;    // (contained output user ptr on linux, ignored)
    __inout u32  buf_size;    // forced to 2*sizeof(struct va_region)
    u32          reserved;
    __out struct  va_region regions[2];
  };
 
=== NVGPU_AS_IOCTL_ALLOC_AS_EX ===
Nintendo's custom implementation for allocating an address space with extra params.


   struct {
   struct {
Line 1,296: Line 1,548:
| 0xC0104412 || Inout || 16 || [[#NVGPU_DBG_GPU_IOCTL_GET_GPU_VA_RANGE_PTES]]
| 0xC0104412 || Inout || 16 || [[#NVGPU_DBG_GPU_IOCTL_GET_GPU_VA_RANGE_PTES]]
|-
|-
| 0xC0684413 || Inout || 104 || NVGPU_DBG_GPU_IOCTL_GET_COMPTAG_INFO
| 0xC0684413</br>[S2] 0xC0304413 || Inout || 104</br>48 || NVGPU_DBG_GPU_IOCTL_GET_COMPTAG_INFO
|-
|-
| 0xC0184414 || Inout || 24 || [[#NVGPU_DBG_GPU_IOCTL_READ_COMPTAGS]]
| 0xC0184414</br>[S2] 0xC0084414 || Inout || 24</br>8 || [[#NVGPU_DBG_GPU_IOCTL_READ_COMPTAGS]]
|-
|-
| 0xC0184415 || Inout || 24 || [[#NVGPU_DBG_GPU_IOCTL_WRITE_COMPTAGS]]
| 0xC0184415</br>[S2] 0xC0084415 || Inout || 24</br>8 || [[#NVGPU_DBG_GPU_IOCTL_WRITE_COMPTAGS]]
|-
|-
| 0xC0104416 || Inout || 16 || NVGPU_DBG_GPU_IOCTL_RESERVE_COMPTAGS
| 0xC0104416 || Inout || 16 || NVGPU_DBG_GPU_IOCTL_RESERVE_COMPTAGS
Line 1,319: Line 1,571:
|-
|-
| 0xC020441E || Inout || 32 || [11.0.0+] NVGPU_DBG_GPU_IOCTL_GET_GPU_VA_RANGE_PAGES
| 0xC020441E || Inout || 32 || [11.0.0+] NVGPU_DBG_GPU_IOCTL_GET_GPU_VA_RANGE_PAGES
|-
| 0x4008441F || In || 8 || [S2]
|-
| 0x00004420 || None || 0 || [S2]
|-
| 0xC0184421 || Inout || 24 || [S2]
|-
| 0x40084422 || In || 8 || [S2]
|-
| 0xC0084423 || Inout || 8 || [S2]
|-
| 0x40084424 || In || 8 || [S2]
|-
| 0xC0104425 || Inout || 16 || [S2]
|-
| 0xC0184426 || Inout || 24 || [S2]
|-
| 0x40084427 || In || 8 || [S2]
|-
| 0x40044428 || In || 4 || [S2]
|-
| 0xC0184429 || Inout || 24 || [S2]
|-
| 0x4010442A || In || 16 || [S2]
|-
| 0x4010442B || In || 16 || [S2]
|}
|}


Line 1,355: Line 1,633:
| 0xC0344704 || Inout || 52 || [[#NVGPU_GPU_IOCTL_ZBC_QUERY_TABLE]]
| 0xC0344704 || Inout || 52 || [[#NVGPU_GPU_IOCTL_ZBC_QUERY_TABLE]]
|-
|-
| 0xC0B04705 || Inout || 176 || [[#NVGPU_GPU_IOCTL_GET_CHARACTERISTICS]]
| 0xC0B04705</br>[S2] 0xC0E04705 || Inout || 176</br>[S2] 224|| [[#NVGPU_GPU_IOCTL_GET_CHARACTERISTICS]]
|-
|-
| 0xC0184706 || Inout || 24 || [[#NVGPU_GPU_IOCTL_GET_TPC_MASKS]]
| 0xC0184706 || Inout || 24 || [[#NVGPU_GPU_IOCTL_GET_TPC_MASKS]]
Line 1,373: Line 1,651:
| 0x80084712 || Out || 8 || [[#NVGPU_GPU_IOCTL_NUM_VSMS]]
| 0x80084712 || Out || 8 || [[#NVGPU_GPU_IOCTL_NUM_VSMS]]
|-
|-
| 0xC0044713 || Inout || 4 || [[#NVGPU_GPU_IOCTL_VSMS_MAPPING]]
| 0xC0044713</br>[S2] 0xC0084713 || Inout || 4</br>[S2] 8 || [[#NVGPU_GPU_IOCTL_VSMS_MAPPING]]
|-
|-
| 0x80084714 || Out || 8 || [[#NVGPU_GPU_IOCTL_ZBC_GET_ACTIVE_SLOT_MASK]]
| 0x80084714 || Out || 8 || [[#NVGPU_GPU_IOCTL_ZBC_GET_ACTIVE_SLOT_MASK]]
Line 1,394: Line 1,672:
|-
|-
| 0xC108471D || Inout || 264 || [[#NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO]]
| 0xC108471D || Inout || 264 || [[#NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO]]
|-
| 0xC010471E || Inout || 16 || [S2]
|-
| 0xC010471F || Inout || 16 || [S2]
|}
|}


Line 1,449: Line 1,731:


   struct gpu_characteristics {
   struct gpu_characteristics {
     u32 arch;                       // 0x120 (NVGPU_GPU_ARCH_GM200)
     u32 arch;                         // 0x120 (NVGPU_GPU_ARCH_GM200)
     u32 impl;                       // 0xB (NVGPU_GPU_IMPL_GM20B) or 0xE (NVGPU_GPU_IMPL_GM20B_B)
     u32 impl;                         // 0xB (NVGPU_GPU_IMPL_GM20B) or 0xE (NVGPU_GPU_IMPL_GM20B_B)
     u32 rev;                       // 0xA1 (Revision A1)
     u32 rev;                         // 0xA1 (Revision A1)
     u32 num_gpc;                   // 0x1
     u32 num_gpc;                     // 0x1
     u64 l2_cache_size;             // 0x40000
     u64 l2_cache_size;               // 0x40000
     u64 on_board_video_memory_size; // 0x0 (not used)
     u64 on_board_video_memory_size;   // 0x0 (not used)
     u32 num_tpc_per_gpc;           // 0x2
     u32 num_tpc_per_gpc;             // 0x2
     u32 bus_type;                   // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)
     u32 bus_type;                     // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)
     u32 big_page_size;             // 0x20000
     u32 big_page_size;               // 0x20000
     u32 compression_page_size;     // 0x20000
     u32 compression_page_size;       // 0x20000
     u32 pde_coverage_bit_count;     // 0x1B
     u32 pde_coverage_bit_count;       // 0x1B
     u32 available_big_page_sizes;   // 0x30000
     u32 available_big_page_sizes;     // 0x30000
     u32 gpc_mask;                   // 0x1
     u32 gpc_mask;                     // 0x1
     u32 sm_arch_sm_version;         // 0x503 (Maxwell Generation 5.0.3)
     u32 sm_arch_sm_version;           // 0x503 (Maxwell Generation 5.0.3)
     u32 sm_arch_spa_version;       // 0x503 (Maxwell Generation 5.0.3)
     u32 sm_arch_spa_version;         // 0x503 (Maxwell Generation 5.0.3)
     u32 sm_arch_warp_count;         // 0x80
     u32 sm_arch_warp_count;           // 0x80
     u32 gpu_va_bit_count;           // 0x28
     u32 gpu_va_bit_count;             // 0x28
     u32 reserved;                   // NULL
     u32 reserved;                     // 0x0
     u64 flags;                     // 0x55 (HAS_SYNCPOINTS | SUPPORT_SPARSE_ALLOCS | SUPPORT_CYCLE_STATS | SUPPORT_CYCLE_STATS_SNAPSHOT)
     u64 flags;                       // 0x55 (HAS_SYNCPOINTS | SUPPORT_SPARSE_ALLOCS | SUPPORT_CYCLE_STATS | SUPPORT_CYCLE_STATS_SNAPSHOT)
     u32 twod_class;                 // 0x902D (FERMI_TWOD_A)
     u32 twod_class;                   // 0x902D (FERMI_TWOD_A)
     u32 threed_class;               // 0xB197 (MAXWELL_B)
     u32 threed_class;                 // 0xB197 (MAXWELL_B)
     u32 compute_class;             // 0xB1C0 (MAXWELL_COMPUTE_B)
     u32 compute_class;               // 0xB1C0 (MAXWELL_COMPUTE_B)
     u32 gpfifo_class;               // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)
     u32 gpfifo_class;                 // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)
     u32 inline_to_memory_class;     // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)
     u32 inline_to_memory_class;       // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)
     u32 dma_copy_class;             // 0xB0B5 (MAXWELL_DMA_COPY_A)
     u32 dma_copy_class;               // 0xB0B5 (MAXWELL_DMA_COPY_A)
     u32 max_fbps_count;             // 0x1
     u32 max_fbps_count;               // 0x1
     u32 fbp_en_mask;               // 0x0 (disabled)
     u32 fbp_en_mask;                 // 0x0 (disabled)
     u32 max_ltc_per_fbp;           // 0x2
     u32 max_ltc_per_fbp;             // 0x2
     u32 max_lts_per_ltc;           // 0x1
     u32 max_lts_per_ltc;             // 0x1
     u32 max_tex_per_tpc;           // 0x0 (not supported)
     u32 max_tex_per_tpc;             // 0x0 (not supported)
     u32 max_gpc_count;             // 0x1
     u32 max_gpc_count;               // 0x1
     u32 rop_l2_en_mask_0;           // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)
     u32 rop_l2_en_mask_0;             // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)
     u32 rop_l2_en_mask_1;           // 0x0
     u32 rop_l2_en_mask_1;             // 0x0
     u64 chipname;                   // 0x6230326D67 ("gm20b")
     u64 chipname;                     // 0x6230326D67 ("gm20b")
     u64 gr_compbit_store_base_hw;   // 0x0 (not supported)
     u64 gr_compbit_store_base_hw;     // 0x0 (not supported)
   };
   };
   
   
Line 1,490: Line 1,772:
     __in    u64 gpu_characteristics_buf_addr;  // ignored, but must not be NULL
     __in    u64 gpu_characteristics_buf_addr;  // ignored, but must not be NULL
     __out struct gpu_characteristics gc;
     __out struct gpu_characteristics gc;
  };
[S2] Uses [[#Ioctl3|Ioctl3]].
  struct gpu_characteristics {
    u32 arch;                        // 0x170
    u32 impl;                        // 0xE
    u32 rev;                          // 0xA1 (Revision A1)
    u32 num_gpc;                      // 0x1
    u64 l2_cache_size;                // 0x100000
    u64 on_board_video_memory_size;  // 0x0 (not used)
    u32 num_tpc_per_gpc;              // 0x6
    u32 bus_type;                    // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)
    u32 big_page_size;                // 0x0
    u32 compression_page_size;        // 0x10000
    u32 pde_coverage_bit_count;      // 0x15
    u32 available_big_page_sizes;    // 0x0
    u32 gpc_mask;                    // 0x1
    u32 sm_arch_sm_version;          // 0x808
    u32 sm_arch_spa_version;          // 0x806
    u32 sm_arch_warp_count;          // 0x60
    u32 gpu_va_bit_count;            // 0x28
    u32 reserved;                    // 0x0
    u64 flags;                        // 0x935FAF1EDC0155
    u32 twod_class;                  // 0x902D (FERMI_TWOD_A)
    u32 threed_class;                // 0xC797 (AMPERE_B)
    u32 compute_class;                // 0xC7C0 (AMPERE_COMPUTE_B)
    u32 gpfifo_class;                // 0xC76F (AMPERE_CHANNEL_GPFIFO_B)
    u32 inline_to_memory_class;      // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)
    u32 dma_copy_class;              // 0xC7B5 (AMPERE_DMA_COPY_B)
    s16 gpu_ioctl_nr_last;            // 0x1F
    s16 tsg_ioctl_nr_last;            // 0xF
    s16 dbg_gpu_ioctl_nr_last;        // 0x2B
    s16 ioctl_channel_nr_last;        // 0x21
    s16 as_ioctl_nr_last;            // 0xD
    s16 unk0_ioctl_nr_last;          // 0xFFFF
    s16 unk1_ioctl_nr_last;          // 0xFFFF
    s16 unk2_ioctl_nr_last;          // 0xFFFF
    u32 max_fbps_count;              // 0x0
    u32 fbp_en_mask;                  // 0x1
    u32 emc_en_mask;                  // 0x1
    u32 max_ltc_per_fbp;              // 0x1
    u32 max_lts_per_ltc;              // 0x4
    u32 max_tex_per_tpc;              // 0x0
    u32 max_gpc_count;                // 0x1
    u32 rop_l2_en_mask_DEPRECATED_0;  // 0x0
    u32 rop_l2_en_mask_DEPRECATED_1;  // 0x0
    u64 chipname;                    // 0x6761313066 ("ga10f")
    u32 unk0;                        // 0x0
    u32 unk1;                        // 0x2
    u32 unk2;                        // 0x40
    u32 unk3;                        // 0x3
    u32 unk4;                        // 0x7
    u32 unk5;                        // 0x1
    u32 unk6;                        // 0x1
    u32 unk7;                        // 0x0
    u32 unk8;                        // 0x0
  };
 
  struct in_buf {
    __in    u64 gpu_characteristics_buf_size;  // must not be NULL, but gets overwritten with 0xD0=max_size
    __in    u8 reserved[0xD8];
  };
 
  struct out_buf {
    __out  u8 reserved[0xE0];
  };
 
  struct out_buf2 {
    __out struct gpu_characteristics gc;
   };
   };


Line 1,664: Line 2,016:
  };
  };


= Channels =
== (Switch 2) /dev/nvhost-prof-dev-gpu ==                                                                                                         
Channels are a concept for NVIDIA hardware blocks that share a common interface.
{| class="wikitable" border="1"
 
! Value || Direction || Size || Description
|-
| 0x40085001 || In || 8 || NVGPU_PROFILER_IOCTL_BIND_CONTEXT
|-
| 0x40105002 || In || 16 || NVGPU_PROFILER_IOCTL_RESERVE_PM_RESOURCE
|-
| 0x40085003 || In || 8 || NVGPU_PROFILER_IOCTL_RELEASE_PM_RESOURCE
|-
| 0xC0305004 || Inout || 48 || NVGPU_PROFILER_IOCTL_ALLOC_PMA_STREAM
|-
| 0x00005005 || None || 0 || NVGPU_PROFILER_IOCTL_FREE_PMA_STREAM
|-
| 0x00005006 || None || 0 || NVGPU_PROFILER_IOCTL_BIND_PM_RESOURCES
|-
| 0x00005007 || None || 0 || NVGPU_PROFILER_IOCTL_UNBIND_PM_RESOURCES
|-
| 0xC0285008 || Inout || 40 || NVGPU_PROFILER_IOCTL_PMA_STREAM_UPDATE_GET_PUT
|-
| 0xC0205009 || Inout || 32 || NVGPU_PROFILER_IOCTL_EXEC_REG_OPS
|-
| 0x0000500A || None || 0 || NVGPU_PROFILER_IOCTL_UNBIND_CONTEXT
|-
| 0x4010500B || In || 16 || NVGPU_PROFILER_IOCTL_VAB_RESERVE
|-
| 0x0000500C || None || 0 || NVGPU_PROFILER_IOCTL_VAB_RELEASE
|-
| 0x4010500D || In || 16 || NVGPU_PROFILER_IOCTL_VAB_FLUSH_STATE
|}
 
== (Switch 2) /dev/nvhost-tsg-gpu ==                                                                                   
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
| 0xC0045401 || Inout || 4 || NVGPU_TSG_IOCTL_BIND_CHANNEL
|-
| 0xC0045402 || Inout || 4 || NVGPU_TSG_IOCTL_UNBIND_CHANNEL
|-
| 0x00005403 || None || 0 || NVGPU_IOCTL_TSG_ENABLE
|-
| 0x00005404 || None || 0 || NVGPU_IOCTL_TSG_DISABLE
|-
| 0x00005405 || None || 0 || NVGPU_IOCTL_TSG_PREEMPT
|-
| 0xC0085407 || Inout || 8 || NVGPU_IOCTL_TSG_SET_RUNLIST_INTERLEAVE
|-
| 0xC0045408 || Inout || 4 || NVGPU_IOCTL_TSG_SET_TIMESLICE
|-
| 0xC0105409 || Inout || 16 ||
|-
| 0x8004540A || Out || 4 ||
|-
| 0xC018540B || Inout || 24 ||
|-
| 0xC018540C || Inout || 24 ||
|-
| 0xC008540D || Inout || 8 || NVGPU_TSG_IOCTL_SET_L2_SECTOR_PROMOTION
|}
 
= Channels =
Channels are a concept for NVIDIA hardware blocks that share a common interface.
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
! Path || Name
! Path || Name
|-
|-
| /dev/nvhost-gpu || GPU
| /dev/nvhost-gpu || GPU
|-
|-
| /dev/nvhost-msenc || Video Encoder
| /dev/nvhost-msenc || Video Encoder
|-
|-
| /dev/nvhost-nvdec || Video Decoder
| /dev/nvhost-nvdec || Video Decoder
|-
|-
| /dev/nvhost-nvjpg || JPEG Decoder
| /dev/nvhost-nvjpg || JPEG Decoder
|-
|-
| /dev/nvhost-vic || Video Image Compositor
| /dev/nvhost-vic || Video Image Compositor
|-
|-
| /dev/nvhost-display || Display
| /dev/nvhost-display || Display
|-
|-
| /dev/nvhost-tsec || TSEC
| /dev/nvhost-tsec || TSEC
|}
|}
 
 
== Ioctls ==
== Ioctls ==
{| class="wikitable" border="1"
{| class="wikitable" border="1"
! Value || Size || Description
! Value || Direction || Size || Description
|-
|-
| 0xC0??0001 || Variable || [[#NVHOST_IOCTL_CHANNEL_SUBMIT]]
| 0xC0??0001 || Inout || Variable || [[#NVHOST_IOCTL_CHANNEL_SUBMIT]]
|-
|-
| 0xC0080002 || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_SYNCPOINT]]
| 0xC0080002 || Inout || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_SYNCPOINT]]
|-
|-
| 0xC0080003 || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_WAITBASE]]
| 0xC0080003 || Inout || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_WAITBASE]]
|-
|-
| 0xC0080004 || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_MODMUTEX]]
| 0xC0080004 || Inout || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_MODMUTEX]]
|-
|-
| 0x40040007 || 4 || [[#NVHOST_IOCTL_CHANNEL_SET_SUBMIT_TIMEOUT]]
| 0x40040007 || In || 4 || [[#NVHOST_IOCTL_CHANNEL_SET_SUBMIT_TIMEOUT]]
|-
|-
| 0x40080008 || 8 || [[#NVHOST_IOCTL_CHANNEL_SET_CLK_RATE]]
| 0x40080008 || In || 8 || [[#NVHOST_IOCTL_CHANNEL_SET_CLK_RATE]]
|-
|-
| 0xC0??0009 || Variable || [[#NVHOST_IOCTL_CHANNEL_MAP_CMD_BUFFER]]
| 0xC0??0009 || Inout || Variable || [[#NVHOST_IOCTL_CHANNEL_MAP_CMD_BUFFER]]
|-
| 0xC0??000A || Inout || Variable || [[#NVHOST_IOCTL_CHANNEL_UNMAP_CMD_BUFFER]]
|-
| 0x00000013 || None || 0 || [[#NVHOST_IOCTL_CHANNEL_SET_TIMEOUT_EX]]
|-
| 0xC0080023</br>([1.0.0-7.0.1] 0xC0080014) || Inout || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_CLK_RATE]]
|-
| 0xC0??0024 || Inout || Variable || [[#NVHOST_IOCTL_CHANNEL_SUBMIT_EX]]
|-
| 0xC0??0025 || Inout || Variable || [[#NVHOST_IOCTL_CHANNEL_MAP_CMD_BUFFER_EX]]
|-
| 0xC0??0026 || Inout || Variable || [[#NVHOST_IOCTL_CHANNEL_UNMAP_CMD_BUFFER_EX]]
|- style="border-top: double"
| 0x40044801 || In || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD]]
|-
| 0x40044803 || In || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_TIMEOUT]]
|-
|-
| 0xC0??000A || Variable || [[#NVHOST_IOCTL_CHANNEL_UNMAP_CMD_BUFFER]]
| 0x40084805 || In || 8 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO]]
|-
|-
| 0x00000013 || 0 || [[#NVHOST_IOCTL_CHANNEL_SET_TIMEOUT_EX]]
| 0x40184806 || In || 24 || [[#NVGPU_IOCTL_CHANNEL_WAIT]]
|-
|-
| 0xC0080023</br>([1.0.0-7.0.1] 0xC0080014) || 8 || [[#NVHOST_IOCTL_CHANNEL_GET_CLK_RATE]]
| 0xC0044807 || Inout || 4 || [[#NVGPU_IOCTL_CHANNEL_CYCLE_STATS]]
|-
|-
| 0xC0??0024 || Variable || [[#NVHOST_IOCTL_CHANNEL_SUBMIT_EX]]
| 0xC0??4808 || Inout || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO]]
|-
|-
| 0xC0??0025 || Variable || [[#NVHOST_IOCTL_CHANNEL_MAP_CMD_BUFFER_EX]]
| 0xC0104809 || Inout || 16 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX]]
|-
|-
| 0xC0??0026 || Variable || [[#NVHOST_IOCTL_CHANNEL_UNMAP_CMD_BUFFER_EX]]
| 0x4008480A || In || 8 || [[#NVHOST_IOCTL_CHANNEL_FREE_OBJ_CTX]]
|- style="border-top: double"
| 0x40044801 || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD]]
|-
|-
| 0x40044803 || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_TIMEOUT]]
| 0xC010480B || Inout || 16 || [[#NVGPU_IOCTL_CHANNEL_ZCULL_BIND]]
|-
|-
| 0x40084805 || 8 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO]]
| 0xC018480C || Inout || 24 || [[#NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER]]
|-
|-
| 0x40184806 || 24 || [[#NVGPU_IOCTL_CHANNEL_WAIT]]
| 0x4004480D || In || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_PRIORITY]]
|-
|-
| 0xC0044807 || 4 || [[#NVGPU_IOCTL_CHANNEL_CYCLE_STATS]]
| 0x0000480E || None || 0 || [[#NVGPU_IOCTL_CHANNEL_ENABLE]]
|-
|-
| 0xC0??4808 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO]]
| 0x0000480F || None || 0 || [[#NVGPU_IOCTL_CHANNEL_DISABLE]]
|-
|-
| 0xC0104809 || 16 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX]]
| 0x00004810 || None || 0 || [[#NVGPU_IOCTL_CHANNEL_PREEMPT]]
|-
|-
| 0x4008480A || 8 || [[#NVHOST_IOCTL_CHANNEL_FREE_OBJ_CTX]]
| 0x00004811 || None ||  0 || [[#NVGPU_IOCTL_CHANNEL_FORCE_RESET]]
|-
|-
| 0xC010480B || 16 || [[#NVGPU_IOCTL_CHANNEL_ZCULL_BIND]]
| 0x40084812</br>[S2] 0x40104812 || In || 8</br>[S2] 16 || [[#NVGPU_IOCTL_CHANNEL_EVENT_ID_CONTROL]]
|-
|-
| 0xC018480C || 24 || [[#NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER]]
| 0xC0104813 || Inout || 16 || [[#NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT]]
|-
|-
| 0x4004480D || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_PRIORITY]]
| 0x40084714 || In || 8 || [[#NVGPU_IOCTL_CHANNEL_SET_USER_DATA]]
|-
|-
| 0x0000480E || 0 || [[#NVGPU_IOCTL_CHANNEL_ENABLE]]
| 0x80084715 || Out || 8 || [[#NVGPU_IOCTL_CHANNEL_GET_USER_DATA]]
|-
|-
| 0x0000480F || 0 || [[#NVGPU_IOCTL_CHANNEL_DISABLE]]
| 0x80804816 || Out || 128 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR_INFO]]
|-
|-
| 0x00004810 || 0 || [[#NVGPU_IOCTL_CHANNEL_PREEMPT]]
| 0xC0104817 || Inout || 16 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR_NOTIFICATION]]
|-
|-
| 0x00004811 || 0 || [[#NVGPU_IOCTL_CHANNEL_FORCE_RESET]]
| 0x40204818 || In || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX]]
|-
|-
| 0x40084812 || 8 || [[#NVGPU_IOCTL_CHANNEL_EVENT_ID_CONTROL]]
| 0xC0??4819 || Inout || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY]]
|-
|-
| 0xC0104813 || 16 || [[#NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT]]
| 0xC020481A || Inout || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2]]
|-
|-
| 0x80804816 || 128 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR_INFO]]
| 0xC018481B || Inout || 24 || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO2]]
|-
|-
| 0xC0104817 || 16 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR_NOTIFICATION]]
| 0xC018481C || Inout || 24 || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO2_RETRY]]
|-
|-
| 0x40204818 || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX]]
| 0xC004481D || Inout || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_TIMESLICE]]
|-
|-
| 0xC0??4819 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY]]
| 0xC010481E || Inout || 16 || [S2]  
|-
|-
| 0xC020481A || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2]]
| 0xC008481F || Inout || 8 || [S2]  
|-
|-
| 0xC018481B || 24 || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO2]]
| 0x40044820 || In || 4 || [S2]  
|-
| 0xC018481C || 24 || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO2_RETRY]]
|-
| 0xC004481D || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_TIMESLICE]]
|- style="border-top: double"
| 0x40084714 || 8 || [[#NVGPU_IOCTL_CHANNEL_SET_USER_DATA]]
|-
|-
| 0x80084715 || 8 || [[#NVGPU_IOCTL_CHANNEL_GET_USER_DATA]]
| 0xC0504821 || Inout || 80 || [S2]  
|}
|}