Changes

356 bytes removed ,  19:57, 8 July 2021
no edit summary
Line 273: Line 273:  
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_CLEAR_EVENT_WAIT]]
 
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_CLEAR_EVENT_WAIT]]
 
|-
 
|-
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT]]
+
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT]]
 
|-
 
|-
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT_ASYNC]]
+
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT_SINGLE]]
 
|-
 
|-
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_REGISTER_EVENT]]
+
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_ALLOC_EVENT]]
 
|-
 
|-
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_UNREGISTER_EVENT]]
+
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENT]]
 
|-
 
|-
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENTS]]
+
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENT_BATCH]]
 
|-
 
|-
| 0xC0040022 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_GET_MAX_EVENT_FIFO_CHANNEL]]
+
| 0xC0040022 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_GET_MAX_EVENT_FIFO_CHANNEL]]
 
|}
 
|}
   Line 352: Line 352:     
   struct {
 
   struct {
     __in char domain_str[0x41];      // "nv"
+
     __in char name[0x41];      // "nv"
     __in char param_str[0x41];
+
     __in char key[0x41];
     __out char config_str[0x101];
+
     __out char value[0x101];
 
   };
 
   };
    
=== NVHOST_IOCTL_CTRL_SYNCPT_CLEAR_EVENT_WAIT ===
 
=== NVHOST_IOCTL_CTRL_SYNCPT_CLEAR_EVENT_WAIT ===
Clears the wait signal of an event. Exclusive to the Switch.
+
Clears the wait signal of a syncpt event.
    
   struct {
 
   struct {
     __in u32 event_slot;         // ranges from 0x00 to 0x3F
+
     __in u32 event_id;         // 0x00 to 0x3F
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT ===
Waits on an event. If waiting fails, returns error code 0x05 (Timeout) and sets '''value''' to (('''syncpt_id''' << 0x10) | 0x10000000).
+
Waits on a syncpt using events. If waiting fails, returns error code 0x05 (Timeout) and sets '''value''' to (((('''id''' & 0xFFF) << 0x10) | 0x10000000) | '''event_id''').
 
  −
Depending on '''threshold''', an '''event_slot''' may be returned for using with other event ioctls.
      
   struct {
 
   struct {
     __in   u32 syncpt_id;
+
     __in u32 id;
     __in   u32 threshold;
+
     __in u32 thresh;
     __in   s32 timeout;
+
     __in s32 timeout;
     __inout u32 value;           // in=event_slot (ignored); out=syncpt_value or event_slot
+
     __out u32 value;
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_SYNCPT_EVENT_WAIT_ASYNC ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_WAIT_EVENT_SINGLE ===
Waits on an event (async version). If waiting fails, returns error code 0x0B (BadValue).
+
Waits on a syncpt using a specific event. If waiting fails, returns error code 0x05 (Timeout) and sets '''value''' to (('''id''' * 0x10) | '''event_id''').
 
  −
Depending on '''threshold''', an '''event_slot''' may be returned for using with other event ioctls.
      
   struct {
 
   struct {
     __in    u32 syncpt_id;
+
     __in    u32 id;
     __in    u32 threshold;
+
     __in    u32 thresh;
     __in    u32 timeout;
+
     __in    s32 timeout;
     __inout u32 value;          // in=event_slot (ignored); out=syncpt_value or event_slot
+
     __inout u32 value;          // in=event_id; out=syncpt_value
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_SYNCPT_REGISTER_EVENT ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_ALLOC_EVENT ===
Registers an event. Exclusive to the Switch.  
+
Allocates a new syncpt event.
    
   struct {
 
   struct {
     __in u32 event_slot;         // ranges from 0x00 to 0x3F
+
     __in u32 event_id;           // 0x00 to 0x3F
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_SYNCPT_UNREGISTER_EVENT ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENT ===
Unregisters an event. Exclusive to the Switch.  
+
Frees an existing syncpt event.
    
   struct {
 
   struct {
     __in u32 event_slot;         // ranges from 0x00 to 0x3F
+
     __in u32 event_id;           // 0x00 to 0x3F
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENTS ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_FREE_EVENT_BATCH ===
Frees events. Exclusive to the Switch.  
+
Frees multiple syncpt events.  
    
   struct {
 
   struct {
     __in u64 events;             // 64-bit bitfield where each bit represents one event
+
     __in u64 event_id_mask;     // 64-bit bitfield where each bit represents one event
 
   };
 
   };
   −
=== NVHOST_IOCTL_CTRL_GET_MAX_EVENT_FIFO_CHANNEL ===
+
=== NVHOST_IOCTL_CTRL_SYNCPT_GET_MAX_EVENT_FIFO_CHANNEL ===
If event FIFO is enabled, returns the maximum channel number. Exclusive to the Switch.
+
If event FIFO is enabled, returns the maximum channel number.
    
   struct {
 
   struct {