NV services: Difference between revisions

No edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 593: Line 593:
! 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)
Line 611: Line 611:
| 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;
  };


== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==
== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==
Line 646: Line 652:
| 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 676: Line 682:


=== NVDISP_GET_MODE ===
=== NVDISP_GET_MODE ===
Identical to Linux driver.
Almost identical to Linux driver.


   struct {
   struct {
Line 691: Line 697:
     __out u32 pclkKHz;
     __out u32 pclkKHz;
     __out u32 bitsPerPixel;      // Always 0
     __out u32 bitsPerPixel;      // Always 0
     __out u32 vmode;            // Always 0  
     __out u32 vmode;            // Always 0
    __out u32 sync;
   };
   };


=== NVDISP_SET_MODE ===
=== NVDISP_SET_MODE ===
Identical to Linux driver.
Almost identical to Linux driver.


   struct {
   struct {
Line 711: Line 718:
     __in u32 bitsPerPixel;
     __in u32 bitsPerPixel;
     __in u32 vmode;
     __in u32 vmode;
    __in u32 sync;
   };
   };


=== NVDISP_VALIDATE_MODE ===
=== NVDISP_VALIDATE_MODE ===
Identical to Linux driver.
Almost identical to Linux driver.


   struct {
   struct {
Line 730: Line 738:
     __inout u32 bitsPerPixel;
     __inout u32 bitsPerPixel;
     __inout u32 vmode;
     __inout u32 vmode;
    __inout u32 sync;
   };
   };


=== NVDISP_GET_BACKLIGHT_RANGE ===
=== NVDISP_GET_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;
     __out u32 csum;
     __out u32 max;
     __out u32 scan;
    __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_SET_BACKLIGHT_RANGE_MAX ===
=== NVDISP_SET_AVI_INFOFRAME ===
Sets the maximum value for the intensity of the display's backlight.
Unpacked standard AVI infoframe struct (HDMI v1.4b/2.0)


   struct {
   struct {
     __in u32 max;
     __in u32 csum;
    __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_MIN ===
=== NVDISP_GET_MODE_DB ===
Sets the minimum 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 min;
     __out struct mode modes[201];
    __out u32 num_modes;
   };
   };


=== NVDISP_SEND_PANEL_MSG ===
=== NVDISP_PANEL_GET_VENDOR_ID ===
Sends raw data to the display panel over DPAUX.
 
Returns display panel's informations.


   struct {
   struct {
     __in u32 cmd;         // DPAUX AUXCTL command (1=unk, 2=I2CWR, 4=MOTWR, 7=AUXWR)
     __out u8 vendor; //0x10 - JDI, 0x20 - InnoLux, 0x30 - AUO, 0x40 - Sharp, 0x50 - Samsung
     __in u32 addr;         // DPAUX AUXADDR
     __out u8 model;
     __in u32 size;         // message size
     __out u8 board; //0xF - 6.2", 0x10 - 5.5", 0x20 - 7.0". JDI panels have nonstandard values
    __in u32 msg[4];      // raw AUXDATA message
   };
   };


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


   struct {
   struct {
     __in u32 cmd;         // DPAUX AUXCTL command (3=I2CRD, 5=MOTRD, 6=AUXRD)
     __out u32 unk0;             //Always 0
     __in u32 addr;         // DPAUX AUXADDR
    __out u32 hActive;
     __in u32 size;         // message size
    __out u32 vActive;
     __out 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;
   };
   };


== /dev/nvcec-ctrl ==
=== NVDISP_SET_MODE2 ===
{| class="wikitable" border="1"
 
! Value || Direction || Size || Description
  struct {
|-
    __in u32 unk0;
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE
    __in u32 hActive;
|-
    __in u32 vActive;
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR
    __in u32 hSyncWidth;
|-
    __in u32 vSyncWidth;
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR
    __in u32 hFrontPorch;
|-
    __in u32 vFrontPorch;
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE
    __in u32 hBackPorch;
|-
    __in u32 vBackPorch;
| 0xC04C0305 || Inout || 76 || NVCEC_CTRL_READ
    __in u32 pclkKHz;
|-
    __in u32 bitsPerPixel;
| 0x804C0306 || Out || 76 || NVCEC_CTRL_GET_CONNECTION_STATUS
    __in u32 vmode;
|-
    __in u32 sync;
| 0x804C0307 || Out || 76 || NVCEC_CTRL_GET_WRITE_STATUS
    __in u32 unk1;
|}
    __in u32 reserved;
  };
 
=== NVDISP_VALIDATE_MODE2 ===


== /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;
  };


== /dev/nvdcutil-disp0, /dev/nvdcutil-disp1 ==
=== NVDISP_GET_MODE_DB2 ===
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
| 0x40010501 || In || 1 || NVDCUTIL_ENABLE_CRC
|-
| 0x40010502 || In || 1 || NVDCUTIL_VIRTUAL_EDID_ENABLE
|-
| 0x42040503 || In || 1056 || 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
|-
| 0x40010509 || In || 1 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_EN
|-
| 0xC020050A || Inout || 32 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_SETTINGS
|-
| 0x8070050B || Out || 112 || [11.0.0+] NVDCUTIL_DP_CONF_READ
|}


== /dev/nvsched-ctrl ==
  struct mode2 {
This is a customized scheduler device.
    u32 unk0;
    u32 hActive;
    u32 vActive;
    u32 hSyncWidth;
    u32 vSyncWidth;
    u32 hFrontPorch;
    u32 vFrontPorch;
    u32 hBackPorch;
    u32 vBackPorch;
    u32 pclkKHz;
    u32 bitsPerPixel;
    u32 vmode;
    u32 sync;
    u32 unk1;
    u32 reserved;
  };
  struct {
    __out struct mode2 modes[201];
    __out u32 num_modes;
  };
 
=== NVDISP_GET_BACKLIGHT_RANGE ===
Returns the minimum and maximum values for the intensity of the display's backlight.
 
  struct {
    __out u32 min;
    __out 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_MAX ===
Sets the maximum value for the intensity of the display's backlight.


{| class="wikitable" border="1"
  struct {
! Value || Direction || Size || Description
    __in u32 max;
|-
  };
| 0x00000601 || - || 0 || [[#NVSCHED_CTRL_ENABLE]]
 
|-
=== NVDISP_SET_BACKLIGHT_RANGE_MIN ===
| 0x00000602 || - || 0 || [[#NVSCHED_CTRL_DISABLE]]
Sets the minimum value for the intensity of the display's backlight.
|-
 
| 0x40180603 || In || 24 || [[#NVSCHED_CTRL_ADD_APPLICATION]]
  struct {
|-
    __in u32 min;
| 0x40180604 || In || 24 || [[#NVSCHED_CTRL_UPDATE_APPLICATION]]
  };
|-
 
| 0x40080605 || In || 8 || [[#NVSCHED_CTRL_REMOVE_APPLICATION]]
=== NVDISP_SEND_PANEL_MSG ===
|-
Sends raw data to the display panel over DPAUX.
| 0x80080606 || Out || 8 || [[#NVSCHED_CTRL_GET_ID]]
 
|-
  struct {
| 0x80080607 || Out || 8 || [[#NVSCHED_CTRL_ADD_RUNLIST]]
    __in u32 cmd;          // DPAUX AUXCTL command (1=unk, 2=I2CWR, 4=MOTWR, 7=AUXWR)
|-
    __in u32 addr;        // DPAUX AUXADDR
| 0x40180608 || In || 24 || [[#NVSCHED_CTRL_UPDATE_RUNLIST]]
    __in u32 size;        // message size
|-
    __in u32 msg[4];      // raw AUXDATA message
| 0x40100609 || In || 16 || [[#NVSCHED_CTRL_LINK_RUNLIST]]
  };
|-
 
| 0x4010060A || In || 16 || [[#NVSCHED_CTRL_UNLINK_RUNLIST]]
=== NVDISP_GET_PANEL_DATA ===
|-
Receives raw data from the display panel over DPAUX.
| 0x4008060B || In || 8 || [[#NVSCHED_CTRL_REMOVE_RUNLIST]]
 
|-
  struct {
| 0x8001060C || Out || 1 || [[#NVSCHED_CTRL_HAS_OVERRUN_EVENT]]
    __in u32 cmd;          // DPAUX AUXCTL command (3=I2CRD, 5=MOTRD, 6=AUXRD)
|-
    __in u32 addr;        // DPAUX AUXADDR
| 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]]
    __in u32 size;        // message size
|-
    __out u32 msg[4];      // raw AUXDATA message
| 0x400C060E || In || 12 || [[#NVSCHED_CTRL_PUT_CONDUCTOR_FLIP_FENCE]]
  };
|-
 
| 0x4008060F || In || 8 || [[#NVSCHED_CTRL_DETACH_APPLICATION]]
== /dev/nvcec-ctrl ==
|-
{| class="wikitable" border="1"
| 0x40100610 || In || 16 || NVSCHED_CTRL_SET_APPLICATION_MAX_DEBT
! Value || Direction || Size || Description
|-
|-
| 0x40100611 || In || 16 || NVSCHED_CTRL_SET_RUNLIST_MAX_DEBT
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE
|-
|-
| 0x40010612 || In || 1 || NVSCHED_CTRL_OVERRUN_EVENTS_ENABLE
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR
|}
|-
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR
|-
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE
|-
| 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 ==
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
| 0xC4880401 || Inout || 1160 || NVHDCP_READ_STATUS
|-
| 0xC4880402 || Inout || 1160 || NVHDCP_READ_M
|-
| 0x40010403 || In || 1 || NVHDCP_ENABLE
|-
| 0xC0080404 || Inout || 8 || NVHDCP_CTRL_STATE_TRANSIT_EVENT_DATA
|-
| 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
|-
| 0x40010509 || In || 1 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_EN
|-
| 0xC020050A || Inout || 32 || [10.0.0+] NVDCUTIL_DP_ELECTRIC_TEST_SETTINGS
|-
| 0x8070050B || Out || 112 || [11.0.0+] NVDCUTIL_DP_CONF_READ
|}
 
=== NVDCUTIL_VIRTUAL_EDID_ENABLE ===
 
  struct {
    __in u8 enable;
  };
 
=== NVDCUTIL_VIRTUAL_EDID_SET_DATA ===
 
  struct {
    __in u8 edid[512];
    __in u32 edid_size;
  };
 
== /dev/nvsched-ctrl ==
This is a customized scheduler device.
 
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.
 
{| class="wikitable" border="1"
! Value || Direction || Size || Description
|-
| 0x00000601 || - || 0 || [[#NVSCHED_CTRL_ENABLE]]
|-
| 0x00000602 || - || 0 || [[#NVSCHED_CTRL_DISABLE]]
|-
| 0x40180603 || In || 24 || [[#NVSCHED_CTRL_ADD_APPLICATION]]
|-
| 0x40180604 || In || 24 || [[#NVSCHED_CTRL_UPDATE_APPLICATION]]
|-
| 0x40080605 || In || 8 || [[#NVSCHED_CTRL_REMOVE_APPLICATION]]
|-
| 0x80080606 || Out || 8 || [[#NVSCHED_CTRL_GET_ID]]
|-
| 0x80080607 || Out || 8 || [[#NVSCHED_CTRL_ADD_RUNLIST]]
|-
| 0x40180608 || In || 24 || [[#NVSCHED_CTRL_UPDATE_RUNLIST]]
|-
| 0x40100609 || In || 16 || [[#NVSCHED_CTRL_LINK_RUNLIST]]
|-
| 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_ENABLE ===
Enables the scheduler.
 
=== NVSCHED_CTRL_DISABLE ===
Disables the scheduler.
 
=== 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 ===
Updates the application parameters in the scheduler.
 
  struct {
    __in u64 application_id;
    __in u64 priority;
    __in u64 timeslice;
  };
 
=== NVSCHED_CTRL_REMOVE_APPLICATION ===
Removes the application from the scheduler.


=== NVSCHED_CTRL_ENABLE ===
  struct {
Enables the scheduler.
    __in u64 application_id;
  };


=== NVSCHED_CTRL_DISABLE ===
=== NVSCHED_CTRL_GET_ID ===
Disables the scheduler.
Returns the ID of the last scheduled object.
 
=== 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 ===
Updates the application parameters in the scheduler.
 
  struct {
    __in u64 application_id;
    __in u64 priority;
    __in u64 timeslice;
  };
 
=== NVSCHED_CTRL_REMOVE_APPLICATION ===
Removes the application from the scheduler.
 
  struct {
    __in u64 application_id;
  };
 
=== NVSCHED_CTRL_GET_ID ===
Returns the ID of the last scheduled object.


   struct {
   struct {
Line 2,029: Line 2,231:


   struct {
   struct {
     __out u32 error_info[32];   // first word is an error code (0=no_error, 1=mmu_error, 2=gr_error, 3=pbdma_error, 4=timeout)
     __out u32 type;     // Error type (0=no_error, 1=mmu_error, 2=gr_error, 3=pbdma_error, 4=timeout)
   };
    __out u32 info[31]; // Infor depends on the error type
   };  
 
==== GR Error Code Format ====
When <code>type == 2</code> (GR Error), the returned data is formatted as follows:
  struct {
    __out u32 type;      // 2=gr_error
    __out u32 intr_value; // Interrupt bits
    __out u32 addr;      // Register address (in bytes)
    __out u32 data_hi;    // Data high 32 bits
    __out u32 data_lo;    // Data low 32 bits
    __out u32 class_num;  // GPU class number (e.g., 0xb197 for MAXWELL_B)
  };
 
{| class="wikitable"
|+ GR Error Interrupt Bits
|-
! Bit(s)
! Description
|-
| 0
| GR_INTR_NOTIFY
|-
| 1
| GR_INTR_SEMAPHORE
|-
| 2
| unknown
|-
| 3
| unknown
|-
| 4
| GR_INTR_ILLEGAL_METHOD
|-
| 5
| GR_INTR_ILLEGAL_CLASS
|-
| 6
| GR_INTR_ILLEGAL_NOTIFY
|-
| 7
| unknown
|-
| 8
| GR_INTR_FIRMWARE_METHOD
|-
| 9–18
| unknown
|-
| 19
| GR_INTR_FECS_ERROR
|-
| 20
| GR_INTR_CLASS_ERROR
|-
| 21
| GR_INTR_EXCEPTION
|-
| 22–31
| unknown
|}


=== NVGPU_IOCTL_CHANNEL_GET_ERROR_NOTIFICATION ===
=== NVGPU_IOCTL_CHANNEL_GET_ERROR_NOTIFICATION ===