|
XenevaOS
|
#include "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) |
| #define DRM_IOCTL_PANTHOR | ( | __access, | |
| __id, | |||
| __type | |||
| ) |
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.
| #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_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_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.
| #define DRM_PANTHOR_PRODUCT_MAJOR | ( | x | ) | (((x) >> 16) & 0xf) |
| #define DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET (DRM_PANTHOR_USER_MMIO_OFFSET | 0) |
| #define DRM_PANTHOR_USER_MMIO_OFFSET |
| #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:
.. 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.
| #define DRM_PANTHOR_USER_MMIO_OFFSET_64BIT (1ull << 56) |
| #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) |
| anonymous enum |
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.
| enum drm_panthor_bo_flags |
enum drm_panthor_bo_flags - Buffer object flags, passed at creation time.
enum drm_panthor_dev_query_type - Query type
Place new types at the end, don't re-order, don't remove or replace.
enum drm_panthor_gpu_coherency: Type of GPU coherency
enum drm_panthor_group_priority - Scheduling group priority
enum drm_panthor_group_state_flags - Group state flags
| enum 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. |
enum drm_panthor_sync_op_flags - Synchronization operation flags.
enum drm_panthor_timestamp_info_flags - drm_panthor_timestamp_info.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. |
| enum drm_panthor_vm_state |
enum drm_panthor_vm_state - VM states.