XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Enumerations
panthor_drm.h File Reference
#include "drm.h"
Include dependency graph for panthor_drm.h:

Go to the source code of this file.

Classes

struct  drm_panthor_obj_array
 
struct  drm_panthor_sync_op
 
struct  drm_panthor_gpu_info
 
struct  drm_panthor_csif_info
 
struct  drm_panthor_timestamp_info
 
struct  drm_panthor_group_priorities_info
 
struct  drm_panthor_dev_query
 
struct  drm_panthor_vm_create
 
struct  drm_panthor_vm_destroy
 
struct  drm_panthor_vm_bind_op
 
struct  drm_panthor_vm_bind
 
struct  drm_panthor_vm_get_state
 
struct  drm_panthor_bo_create
 
struct  drm_panthor_bo_mmap_offset
 
struct  drm_panthor_queue_create
 
struct  drm_panthor_group_create
 
struct  drm_panthor_group_destroy
 
struct  drm_panthor_queue_submit
 
struct  drm_panthor_group_submit
 
struct  drm_panthor_group_get_state
 
struct  drm_panthor_tiler_heap_create
 
struct  drm_panthor_tiler_heap_destroy
 
struct  drm_panthor_bo_set_label
 
struct  drm_panthor_set_user_mmio_offset
 
struct  drm_panthor_bo_sync_op
 
struct  drm_panthor_bo_sync
 
struct  drm_panthor_bo_query_info
 

Macros

#define DRM_PANTHOR_USER_MMIO_OFFSET_32BIT   (1ull << 43)
 
#define DRM_PANTHOR_USER_MMIO_OFFSET_64BIT   (1ull << 56)
 
#define DRM_PANTHOR_USER_MMIO_OFFSET
 
#define DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET   (DRM_PANTHOR_USER_MMIO_OFFSET | 0)
 
#define DRM_PANTHOR_OBJ_ARRAY(cnt, ptr)    { .stride = sizeof((ptr)[0]), .count = (cnt), .array = (__u64)(uintptr_t)(ptr) }
 
#define DRM_PANTHOR_ARCH_MAJOR(x)   ((x) >> 28)
 
#define DRM_PANTHOR_ARCH_MINOR(x)   (((x) >> 24) & 0xf)
 
#define DRM_PANTHOR_ARCH_REV(x)   (((x) >> 20) & 0xf)
 
#define DRM_PANTHOR_PRODUCT_MAJOR(x)   (((x) >> 16) & 0xf)
 
#define DRM_PANTHOR_VERSION_MAJOR(x)   (((x) >> 12) & 0xf)
 
#define DRM_PANTHOR_VERSION_MINOR(x)   (((x) >> 4) & 0xff)
 
#define DRM_PANTHOR_VERSION_STATUS(x)   ((x) & 0xf)
 
#define DRM_PANTHOR_CSHW_MAJOR(x)   (((x) >> 26) & 0x3f)
 
#define DRM_PANTHOR_CSHW_MINOR(x)   (((x) >> 20) & 0x3f)
 
#define DRM_PANTHOR_CSHW_REV(x)   (((x) >> 16) & 0xf)
 
#define DRM_PANTHOR_MCU_MAJOR(x)   (((x) >> 10) & 0x3f)
 
#define DRM_PANTHOR_MCU_MINOR(x)   (((x) >> 4) & 0x3f)
 
#define DRM_PANTHOR_MCU_REV(x)   ((x) & 0xf)
 
#define DRM_PANTHOR_MMU_VA_BITS(x)   ((x) & 0xff)
 
#define DRM_IOCTL_PANTHOR(__access, __id, __type)
 

Enumerations

enum  drm_panthor_ioctl_id {
  DRM_PANTHOR_DEV_QUERY = 0 , DRM_PANTHOR_VM_CREATE , DRM_PANTHOR_VM_DESTROY , DRM_PANTHOR_VM_BIND ,
  DRM_PANTHOR_VM_GET_STATE , DRM_PANTHOR_BO_CREATE , DRM_PANTHOR_BO_MMAP_OFFSET , DRM_PANTHOR_GROUP_CREATE ,
  DRM_PANTHOR_GROUP_DESTROY , DRM_PANTHOR_GROUP_SUBMIT , DRM_PANTHOR_GROUP_GET_STATE , DRM_PANTHOR_TILER_HEAP_CREATE ,
  DRM_PANTHOR_TILER_HEAP_DESTROY , DRM_PANTHOR_BO_SET_LABEL , DRM_PANTHOR_SET_USER_MMIO_OFFSET , DRM_PANTHOR_BO_SYNC ,
  DRM_PANTHOR_BO_QUERY_INFO
}
 
enum  drm_panthor_sync_op_flags {
  DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK = 0xff , DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ = 0 , DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ = 1 , DRM_PANTHOR_SYNC_OP_WAIT = 0 << 31 ,
  DRM_PANTHOR_SYNC_OP_SIGNAL = (int)(1u << 31)
}
 
enum  drm_panthor_dev_query_type { DRM_PANTHOR_DEV_QUERY_GPU_INFO = 0 , DRM_PANTHOR_DEV_QUERY_CSIF_INFO , DRM_PANTHOR_DEV_QUERY_TIMESTAMP_INFO , DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO }
 
enum  drm_panthor_gpu_coherency { DRM_PANTHOR_GPU_COHERENCY_ACE_LITE = 0 , DRM_PANTHOR_GPU_COHERENCY_ACE = 1 , DRM_PANTHOR_GPU_COHERENCY_NONE = 31 }
 
enum  drm_panthor_timestamp_info_flags {
  DRM_PANTHOR_TIMESTAMP_GPU = 1 << 0 , DRM_PANTHOR_TIMESTAMP_CPU_NONE = 0 << 1 , DRM_PANTHOR_TIMESTAMP_CPU_MONOTONIC = 1 << 1 , DRM_PANTHOR_TIMESTAMP_CPU_MONOTONIC_RAW = 2 << 1 ,
  DRM_PANTHOR_TIMESTAMP_CPU_TYPE_MASK = 7 << 1 , DRM_PANTHOR_TIMESTAMP_GPU_OFFSET = 1 << 4 , DRM_PANTHOR_TIMESTAMP_GPU_CYCLE_COUNT = 1 << 5 , DRM_PANTHOR_TIMESTAMP_FREQ = 1 << 6 ,
  DRM_PANTHOR_TIMESTAMP_DURATION = 1 << 7
}
 
enum  drm_panthor_vm_bind_op_flags {
  DRM_PANTHOR_VM_BIND_OP_MAP_READONLY = 1 << 0 , DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC = 1 << 1 , DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2 , DRM_PANTHOR_VM_BIND_OP_TYPE_MASK = (int)(0xfu << 28) ,
  DRM_PANTHOR_VM_BIND_OP_TYPE_MAP = 0 << 28 , DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP = 1 << 28 , DRM_PANTHOR_VM_BIND_OP_TYPE_SYNC_ONLY = 2 << 28
}
 
enum  drm_panthor_vm_bind_flags { DRM_PANTHOR_VM_BIND_ASYNC = 1 << 0 }
 
enum  drm_panthor_vm_state { DRM_PANTHOR_VM_STATE_USABLE , DRM_PANTHOR_VM_STATE_UNUSABLE }
 
enum  drm_panthor_bo_flags { DRM_PANTHOR_BO_NO_MMAP = (1 << 0) , DRM_PANTHOR_BO_WB_MMAP = (1 << 1) }
 
enum  drm_panthor_group_priority { PANTHOR_GROUP_PRIORITY_LOW = 0 , PANTHOR_GROUP_PRIORITY_MEDIUM , PANTHOR_GROUP_PRIORITY_HIGH , PANTHOR_GROUP_PRIORITY_REALTIME }
 
enum  drm_panthor_group_state_flags { DRM_PANTHOR_GROUP_STATE_TIMEDOUT = 1 << 0 , DRM_PANTHOR_GROUP_STATE_FATAL_FAULT = 1 << 1 , DRM_PANTHOR_GROUP_STATE_INNOCENT = 1 << 2 }
 
enum  drm_panthor_bo_sync_op_type { DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH = 0 , DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE = 1 }
 
enum  drm_panthor_bo_extra_flags { DRM_PANTHOR_BO_IS_IMPORTED = (1 << 0) }
 
enum  {
  DRM_IOCTL_PANTHOR_DEV_QUERY , DRM_IOCTL_PANTHOR_VM_CREATE , DRM_IOCTL_PANTHOR_VM_DESTROY , DRM_IOCTL_PANTHOR_VM_BIND ,
  DRM_IOCTL_PANTHOR_VM_GET_STATE , DRM_IOCTL_PANTHOR_BO_CREATE , DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET , DRM_IOCTL_PANTHOR_GROUP_CREATE ,
  DRM_IOCTL_PANTHOR_GROUP_DESTROY , DRM_IOCTL_PANTHOR_GROUP_SUBMIT , DRM_IOCTL_PANTHOR_GROUP_GET_STATE , DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE ,
  DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY , DRM_IOCTL_PANTHOR_BO_SET_LABEL , DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET , DRM_IOCTL_PANTHOR_BO_SYNC ,
  DRM_IOCTL_PANTHOR_BO_QUERY_INFO
}
 

Macro Definition Documentation

◆ DRM_IOCTL_PANTHOR

#define DRM_IOCTL_PANTHOR (   __access,
  __id,
  __type 
)
Value:
DRM_IO ## __access(DRM_COMMAND_BASE + DRM_PANTHOR_ ## __id, \
struct drm_panthor_ ## __type)
#define DRM_COMMAND_BASE
Definition drm.h:1363
#define DRM_IO(nr)
Definition drm.h:1077

DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number @__access: Access type. Must be R, W or RW. @__id: One of the DRM_PANTHOR_xxx id. @__type: Suffix of the type being passed to the IOCTL.

Don't use this macro directly, use the DRM_IOCTL_PANTHOR_xxx values instead.

Return: An IOCTL number to be passed to ioctl() from userspace.

◆ DRM_PANTHOR_ARCH_MAJOR

#define DRM_PANTHOR_ARCH_MAJOR (   x)    ((x) >> 28)

◆ DRM_PANTHOR_ARCH_MINOR

#define DRM_PANTHOR_ARCH_MINOR (   x)    (((x) >> 24) & 0xf)

◆ DRM_PANTHOR_ARCH_REV

#define DRM_PANTHOR_ARCH_REV (   x)    (((x) >> 20) & 0xf)

◆ DRM_PANTHOR_CSHW_MAJOR

#define DRM_PANTHOR_CSHW_MAJOR (   x)    (((x) >> 26) & 0x3f)

◆ DRM_PANTHOR_CSHW_MINOR

#define DRM_PANTHOR_CSHW_MINOR (   x)    (((x) >> 20) & 0x3f)

◆ DRM_PANTHOR_CSHW_REV

#define DRM_PANTHOR_CSHW_REV (   x)    (((x) >> 16) & 0xf)

◆ DRM_PANTHOR_MCU_MAJOR

#define DRM_PANTHOR_MCU_MAJOR (   x)    (((x) >> 10) & 0x3f)

◆ DRM_PANTHOR_MCU_MINOR

#define DRM_PANTHOR_MCU_MINOR (   x)    (((x) >> 4) & 0x3f)

◆ DRM_PANTHOR_MCU_REV

#define DRM_PANTHOR_MCU_REV (   x)    ((x) & 0xf)

◆ DRM_PANTHOR_MMU_VA_BITS

#define DRM_PANTHOR_MMU_VA_BITS (   x)    ((x) & 0xff)

◆ DRM_PANTHOR_OBJ_ARRAY

#define DRM_PANTHOR_OBJ_ARRAY (   cnt,
  ptr 
)     { .stride = sizeof((ptr)[0]), .count = (cnt), .array = (__u64)(uintptr_t)(ptr) }

DRM_PANTHOR_OBJ_ARRAY() - Initialize a drm_panthor_obj_array field. @cnt: Number of elements in the array. @ptr: Pointer to the array to pass to the kernel.

Macro initializing a drm_panthor_obj_array based on the object size as known by userspace.

◆ DRM_PANTHOR_PRODUCT_MAJOR

#define DRM_PANTHOR_PRODUCT_MAJOR (   x)    (((x) >> 16) & 0xf)

◆ DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET

#define DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET   (DRM_PANTHOR_USER_MMIO_OFFSET | 0)

◆ DRM_PANTHOR_USER_MMIO_OFFSET

#define DRM_PANTHOR_USER_MMIO_OFFSET
Value:
(sizeof(unsigned long) < 8 ? \
#define DRM_PANTHOR_USER_MMIO_OFFSET_32BIT
Definition panthor_drm.h:68
#define DRM_PANTHOR_USER_MMIO_OFFSET_64BIT
Definition panthor_drm.h:69

◆ DRM_PANTHOR_USER_MMIO_OFFSET_32BIT

#define DRM_PANTHOR_USER_MMIO_OFFSET_32BIT   (1ull << 43)

DOC: Introduction

This documentation describes the Panthor IOCTLs.

Just a few generic rules about the data passed to the Panthor IOCTLs:

  • Structures must be aligned on 64-bit/8-byte. If the object is not naturally aligned, a padding field must be added.
  • Fields must be explicitly aligned to their natural type alignment with pad[0..N] fields.
  • All padding fields will be checked by the driver to make sure they are zeroed.
  • Flags can be added, but not removed/replaced.
  • New fields can be added to the main structures (the structures directly passed to the ioctl). Those fields can be added at the end of the structure, or replace existing padding fields. Any new field being added must preserve the behavior that existed before those fields were added when a value of zero is passed.
  • New fields can be added to indirect objects (objects pointed by the main structure), iff those objects are passed a size to reflect the size known by the userspace driver (see drm_panthor_obj_array::stride or drm_panthor_dev_query::size).
  • If the kernel driver is too old to know some fields, those will be ignored if zero, and otherwise rejected (and so will be zero on output).
  • If userspace is too old to know some fields, those will be zeroed (input) before the structure is parsed by the kernel driver.
  • Each new flag/field addition must come with a driver version update so the userspace driver doesn't have to trial and error to know which flags are supported.
  • Structures should not contain unions, as this would defeat the extensibility of such structures.
  • IOCTLs can't be removed or replaced. New IOCTL IDs should be placed at the end of the drm_panthor_ioctl_id enum. DOC: MMIO regions exposed to userspace.

.. c:macro:: DRM_PANTHOR_USER_MMIO_OFFSET

File offset for all MMIO regions being exposed to userspace. Don't use this value directly, use DRM_PANTHOR_USER_<name>_OFFSET values instead. pgoffset passed to mmap2() is an unsigned long, which forces us to use a different offset on 32-bit and 64-bit systems.

.. c:macro:: DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET

File offset for the LATEST_FLUSH_ID register. The Userspace driver controls GPU cache flushing through CS instructions, but the flush reduction mechanism requires a flush_id. This flush_id could be queried with an ioctl, but Arm provides a well-isolated register page containing only this read-only register, so let's expose this page through a static mmap offset and allow direct mapping of this MMIO region so we can avoid the user <-> kernel round-trip.

◆ DRM_PANTHOR_USER_MMIO_OFFSET_64BIT

#define DRM_PANTHOR_USER_MMIO_OFFSET_64BIT   (1ull << 56)

◆ DRM_PANTHOR_VERSION_MAJOR

#define DRM_PANTHOR_VERSION_MAJOR (   x)    (((x) >> 12) & 0xf)

◆ DRM_PANTHOR_VERSION_MINOR

#define DRM_PANTHOR_VERSION_MINOR (   x)    (((x) >> 4) & 0xff)

◆ DRM_PANTHOR_VERSION_STATUS

#define DRM_PANTHOR_VERSION_STATUS (   x)    ((x) & 0xf)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DRM_IOCTL_PANTHOR_DEV_QUERY 
DRM_IOCTL_PANTHOR_VM_CREATE 
DRM_IOCTL_PANTHOR_VM_DESTROY 
DRM_IOCTL_PANTHOR_VM_BIND 
DRM_IOCTL_PANTHOR_VM_GET_STATE 
DRM_IOCTL_PANTHOR_BO_CREATE 
DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET 
DRM_IOCTL_PANTHOR_GROUP_CREATE 
DRM_IOCTL_PANTHOR_GROUP_DESTROY 
DRM_IOCTL_PANTHOR_GROUP_SUBMIT 
DRM_IOCTL_PANTHOR_GROUP_GET_STATE 
DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE 
DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY 
DRM_IOCTL_PANTHOR_BO_SET_LABEL 
DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET 
DRM_IOCTL_PANTHOR_BO_SYNC 
DRM_IOCTL_PANTHOR_BO_QUERY_INFO 

◆ drm_panthor_bo_extra_flags

enum drm_panthor_bo_extra_flags - Set of flags returned on a BO_QUERY_INFO request

Those are flags reflecting BO properties that are not directly coming from the flags passed are creation time, or information on BOs that were imported from other drivers.

Enumerator
DRM_PANTHOR_BO_IS_IMPORTED 

@DRM_PANTHOR_BO_IS_IMPORTED: BO has been imported from an external driver.

Note that imported dma-buf handles are not flagged as imported if they where exported by panthor. Only buffers that are coming from other drivers (dma heaps, other GPUs, display controllers, V4L, ...).

It's also important to note that all imported BOs are mapped cached and can't be considered IO-coherent even if the GPU is. This means they require explicit syncs that must go through the DRM_PANTHOR_BO_SYNC ioctl (userland cache maintenance is not allowed in that case, because extra operations might be needed to make changes visible to the CPU/device, like buffer migration when the exporter is a GPU with its own VRAM).

◆ drm_panthor_bo_flags

enum drm_panthor_bo_flags - Buffer object flags, passed at creation time.

Enumerator
DRM_PANTHOR_BO_NO_MMAP 

@DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace.

DRM_PANTHOR_BO_WB_MMAP 

@DRM_PANTHOR_BO_WB_MMAP: Force "Write-Back Cacheable" CPU mapping.

CPU map the buffer object in userspace by forcing the "Write-Back Cacheable" cacheability attribute. The mapping otherwise uses the "Non-Cacheable" attribute if the GPU is not IO coherent.

◆ drm_panthor_bo_sync_op_type

enum drm_panthor_bo_sync_op_type - BO sync type

Enumerator
DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH 

@DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH: Flush CPU caches.

DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE 

@DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE: Flush and invalidate CPU caches.

◆ drm_panthor_dev_query_type

enum drm_panthor_dev_query_type - Query type

Place new types at the end, don't re-order, don't remove or replace.

Enumerator
DRM_PANTHOR_DEV_QUERY_GPU_INFO 

@DRM_PANTHOR_DEV_QUERY_GPU_INFO: Query GPU information.

DRM_PANTHOR_DEV_QUERY_CSIF_INFO 

@DRM_PANTHOR_DEV_QUERY_CSIF_INFO: Query command-stream interface information.

DRM_PANTHOR_DEV_QUERY_TIMESTAMP_INFO 

@DRM_PANTHOR_DEV_QUERY_TIMESTAMP_INFO: Query timestamp information.

DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO 

@DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.

◆ drm_panthor_gpu_coherency

enum drm_panthor_gpu_coherency: Type of GPU coherency

Enumerator
DRM_PANTHOR_GPU_COHERENCY_ACE_LITE 

@DRM_PANTHOR_GPU_COHERENCY_ACE_LITE: ACE Lite coherency.

DRM_PANTHOR_GPU_COHERENCY_ACE 

@DRM_PANTHOR_GPU_COHERENCY_ACE: ACE coherency.

DRM_PANTHOR_GPU_COHERENCY_NONE 

@DRM_PANTHOR_GPU_COHERENCY_NONE: No coherency.

◆ drm_panthor_group_priority

enum drm_panthor_group_priority - Scheduling group priority

Enumerator
PANTHOR_GROUP_PRIORITY_LOW 

@PANTHOR_GROUP_PRIORITY_LOW: Low priority group.

PANTHOR_GROUP_PRIORITY_MEDIUM 

@PANTHOR_GROUP_PRIORITY_MEDIUM: Medium priority group.

PANTHOR_GROUP_PRIORITY_HIGH 

@PANTHOR_GROUP_PRIORITY_HIGH: High priority group.

Requires CAP_SYS_NICE or DRM_MASTER.

PANTHOR_GROUP_PRIORITY_REALTIME 

@PANTHOR_GROUP_PRIORITY_REALTIME: Realtime priority group.

Requires CAP_SYS_NICE or DRM_MASTER.

◆ drm_panthor_group_state_flags

enum drm_panthor_group_state_flags - Group state flags

Enumerator
DRM_PANTHOR_GROUP_STATE_TIMEDOUT 

@DRM_PANTHOR_GROUP_STATE_TIMEDOUT: Group had unfinished jobs.

When a group ends up with this flag set, no jobs can be submitted to its queues.

DRM_PANTHOR_GROUP_STATE_FATAL_FAULT 

@DRM_PANTHOR_GROUP_STATE_FATAL_FAULT: Group had fatal faults.

When a group ends up with this flag set, no jobs can be submitted to its queues.

DRM_PANTHOR_GROUP_STATE_INNOCENT 

@DRM_PANTHOR_GROUP_STATE_INNOCENT: Group was killed during a reset caused by other groups.

This flag can only be set if DRM_PANTHOR_GROUP_STATE_TIMEDOUT is set and DRM_PANTHOR_GROUP_STATE_FATAL_FAULT is not.

◆ drm_panthor_ioctl_id

DOC: IOCTL IDs

enum drm_panthor_ioctl_id - IOCTL IDs

Place new ioctls at the end, don't re-order, don't replace or remove entries.

These IDs are not meant to be used directly. Use the DRM_IOCTL_PANTHOR_xxx definitions instead.

Enumerator
DRM_PANTHOR_DEV_QUERY 

@DRM_PANTHOR_DEV_QUERY: Query device information.

DRM_PANTHOR_VM_CREATE 

@DRM_PANTHOR_VM_CREATE: Create a VM.

DRM_PANTHOR_VM_DESTROY 

@DRM_PANTHOR_VM_DESTROY: Destroy a VM.

DRM_PANTHOR_VM_BIND 

@DRM_PANTHOR_VM_BIND: Bind/unbind memory to a VM.

DRM_PANTHOR_VM_GET_STATE 

@DRM_PANTHOR_VM_GET_STATE: Get VM state.

DRM_PANTHOR_BO_CREATE 

@DRM_PANTHOR_BO_CREATE: Create a buffer object.

DRM_PANTHOR_BO_MMAP_OFFSET 

@DRM_PANTHOR_BO_MMAP_OFFSET: Get the file offset to pass to mmap to map a GEM object.

DRM_PANTHOR_GROUP_CREATE 

@DRM_PANTHOR_GROUP_CREATE: Create a scheduling group.

DRM_PANTHOR_GROUP_DESTROY 

@DRM_PANTHOR_GROUP_DESTROY: Destroy a scheduling group.

DRM_PANTHOR_GROUP_SUBMIT 

@DRM_PANTHOR_GROUP_SUBMIT: Submit jobs to queues belonging to a specific scheduling group.

DRM_PANTHOR_GROUP_GET_STATE 

@DRM_PANTHOR_GROUP_GET_STATE: Get the state of a scheduling group.

DRM_PANTHOR_TILER_HEAP_CREATE 

@DRM_PANTHOR_TILER_HEAP_CREATE: Create a tiler heap.

DRM_PANTHOR_TILER_HEAP_DESTROY 

@DRM_PANTHOR_TILER_HEAP_DESTROY: Destroy a tiler heap.

DRM_PANTHOR_BO_SET_LABEL 

@DRM_PANTHOR_BO_SET_LABEL: Label a BO.

DRM_PANTHOR_SET_USER_MMIO_OFFSET 

@DRM_PANTHOR_SET_USER_MMIO_OFFSET: Set the offset to use as the user MMIO offset.

The default behavior is to pick the MMIO offset based on the size of the pgoff_t type seen by the process that manipulates the FD, such that a 32-bit process can always map the user MMIO ranges. But this approach doesn't work well for emulators like FEX, where the emulator is an 64-bit binary which might be executing 32-bit code. In that case, the kernel thinks it's the 64-bit process and assumes DRM_PANTHOR_USER_MMIO_OFFSET_64BIT is in use, but the UMD library expects DRM_PANTHOR_USER_MMIO_OFFSET_32BIT, because it can't mmap() anything above the pgoff_t size.

DRM_PANTHOR_BO_SYNC 

@DRM_PANTHOR_BO_SYNC: Sync BO data to/from the device

DRM_PANTHOR_BO_QUERY_INFO 

@DRM_PANTHOR_BO_QUERY_INFO: Query information about a BO.

This is useful for imported BOs.

◆ drm_panthor_sync_op_flags

enum drm_panthor_sync_op_flags - Synchronization operation flags.

Enumerator
DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK 

@DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK: Synchronization handle type mask.

DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ 

@DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ: Synchronization object type.

DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ 

@DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ: Timeline synchronization object type.

DRM_PANTHOR_SYNC_OP_WAIT 

@DRM_PANTHOR_SYNC_OP_WAIT: Wait operation.

DRM_PANTHOR_SYNC_OP_SIGNAL 

@DRM_PANTHOR_SYNC_OP_SIGNAL: Signal operation.

◆ drm_panthor_timestamp_info_flags

enum drm_panthor_timestamp_info_flags - drm_panthor_timestamp_info.flags

Enumerator
DRM_PANTHOR_TIMESTAMP_GPU 

@DRM_PANTHOR_TIMESTAMP_GPU: Query GPU time.

DRM_PANTHOR_TIMESTAMP_CPU_NONE 

@DRM_PANTHOR_TIMESTAMP_CPU_NONE: Don't query CPU time.

DRM_PANTHOR_TIMESTAMP_CPU_MONOTONIC 

@DRM_PANTHOR_TIMESTAMP_CPU_MONOTONIC: Query CPU time using CLOCK_MONOTONIC.

DRM_PANTHOR_TIMESTAMP_CPU_MONOTONIC_RAW 

@DRM_PANTHOR_TIMESTAMP_CPU_MONOTONIC_RAW: Query CPU time using CLOCK_MONOTONIC_RAW.

DRM_PANTHOR_TIMESTAMP_CPU_TYPE_MASK 

@DRM_PANTHOR_TIMESTAMP_CPU_TYPE_MASK: Space reserved for CPU clock type.

DRM_PANTHOR_TIMESTAMP_GPU_OFFSET 

@DRM_PANTHOR_TIMESTAMP_GPU_OFFSET: Query GPU offset.

DRM_PANTHOR_TIMESTAMP_GPU_CYCLE_COUNT 

@DRM_PANTHOR_TIMESTAMP_GPU_CYCLE_COUNT: Query GPU cycle count.

DRM_PANTHOR_TIMESTAMP_FREQ 

@DRM_PANTHOR_TIMESTAMP_FREQ: Query timestamp frequency.

DRM_PANTHOR_TIMESTAMP_DURATION 

@DRM_PANTHOR_TIMESTAMP_DURATION: Return duration of time query.

◆ drm_panthor_vm_bind_flags

enum drm_panthor_vm_bind_flags - VM bind flags

Enumerator
DRM_PANTHOR_VM_BIND_ASYNC 

@DRM_PANTHOR_VM_BIND_ASYNC: VM bind operations are queued to the VM queue instead of being executed synchronously.

◆ drm_panthor_vm_bind_op_flags

enum drm_panthor_vm_bind_op_flags - VM bind operation flags

Enumerator
DRM_PANTHOR_VM_BIND_OP_MAP_READONLY 

@DRM_PANTHOR_VM_BIND_OP_MAP_READONLY: Map the memory read-only.

Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP.

DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC 

@DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC: Map the memory not-executable.

Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP.

DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED 

@DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED: Map the memory uncached.

Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP.

DRM_PANTHOR_VM_BIND_OP_TYPE_MASK 

@DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.

DRM_PANTHOR_VM_BIND_OP_TYPE_MAP 

@DRM_PANTHOR_VM_BIND_OP_TYPE_MAP: Map operation.

DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP 

@DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP: Unmap operation.

DRM_PANTHOR_VM_BIND_OP_TYPE_SYNC_ONLY 

@DRM_PANTHOR_VM_BIND_OP_TYPE_SYNC_ONLY: No VM operation.

Just serves as a synchronization point on a VM queue.

Only valid if DRM_PANTHOR_VM_BIND_ASYNC is set in drm_panthor_vm_bind::flags, and drm_panthor_vm_bind_op::syncs contains at least one element.

◆ drm_panthor_vm_state

enum drm_panthor_vm_state - VM states.

Enumerator
DRM_PANTHOR_VM_STATE_USABLE 

@DRM_PANTHOR_VM_STATE_USABLE: VM is usable.

New VM operations will be accepted on this VM.

DRM_PANTHOR_VM_STATE_UNUSABLE 

@DRM_PANTHOR_VM_STATE_UNUSABLE: VM is unusable.

Something put the VM in an unusable state (like an asynchronous VM_BIND request failing for any reason).

Once the VM is in this state, all new MAP operations will be rejected, and any GPU job targeting this VM will fail. UNMAP operations are still accepted.

The only way to recover from an unusable VM is to create a new VM, and destroy the old one.