Lines Matching +full:vm +full:- +full:map
1 /* SPDX-License-Identifier: MIT */
19 * - Structures must be aligned on 64-bit/8-byte. If the object is not
21 * - Fields must be explicitly aligned to their natural type alignment with
23 * - All padding fields will be checked by the driver to make sure they are
25 * - Flags can be added, but not removed/replaced.
26 * - New fields can be added to the main structures (the structures
31 * - New fields can be added to indirect objects (objects pointed by the
35 * - If the kernel driver is too old to know some fields, those will be
37 * - If userspace is too old to know some fields, those will be zeroed
39 * - Each new flag/field addition must come with a driver version update so
42 * - Structures should not contain unions, as this would defeat the
44 * - IOCTLs can't be removed or replaced. New IOCTL IDs should be placed
56 * different offset on 32-bit and 64-bit systems.
63 * ioctl, but Arm provides a well-isolated register page containing only this
64 * read-only register, so let's expose this page through a static mmap offset
66 * user <-> kernel round-trip.
78 * enum drm_panthor_ioctl_id - IOCTL IDs
80 * Place new ioctls at the end, don't re-order, don't replace or remove entries.
89 /** @DRM_PANTHOR_VM_CREATE: Create a VM. */
92 /** @DRM_PANTHOR_VM_DESTROY: Destroy a VM. */
95 /** @DRM_PANTHOR_VM_BIND: Bind/unbind memory to a VM. */
98 /** @DRM_PANTHOR_VM_GET_STATE: Get VM state. */
106 * mmap to map a GEM object.
133 * DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number
179 * struct drm_panthor_obj_array - Object array.
201 * DRM_PANTHOR_OBJ_ARRAY() - Initialize a drm_panthor_obj_array field.
212 * enum drm_panthor_sync_op_flags - Synchronization operation flags.
235 * struct drm_panthor_sync_op - Synchronization operation.
253 * enum drm_panthor_dev_query_type - Query type
255 * Place new types at the end, don't re-order, don't remove or replace.
261 /** @DRM_PANTHOR_DEV_QUERY_CSIF_INFO: Query command-stream interface information. */
274 * struct drm_panthor_gpu_info - GPU information
301 /** @l2_features: L2-cache features. */
335 /** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */
355 * struct drm_panthor_csif_info - Command stream interface information
377 * [cs_slot_count - unpreserved_cs_reg_count .. cs_slot_count] registers are
389 * struct drm_panthor_timestamp_info - Timestamp information
408 * struct drm_panthor_group_priorities_info - Group priorities information
425 * struct drm_panthor_dev_query - Arguments passed to DRM_PANTHOR_IOCTL_DEV_QUERY
453 * struct drm_panthor_vm_create - Arguments passed to DRM_PANTHOR_IOCTL_VM_CREATE
456 /** @flags: VM flags, MBZ. */
459 /** @id: Returned VM ID. */
465 * The kernel will pick the remaining space to map kernel-only objects to the
466 * VM (heap chunks, heap context, ring buffers, kernel synchronization objects,
475 * while still allowing the kernel to map some amount of kernel objects in
486 * struct drm_panthor_vm_destroy - Arguments passed to DRM_PANTHOR_IOCTL_VM_DESTROY
489 /** @id: ID of the VM to destroy. */
497 * enum drm_panthor_vm_bind_op_flags - VM bind operation flags
501 * @DRM_PANTHOR_VM_BIND_OP_MAP_READONLY: Map the memory read-only.
508 * @DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC: Map the memory not-executable.
515 * @DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED: Map the memory uncached.
526 /** @DRM_PANTHOR_VM_BIND_OP_TYPE_MAP: Map operation. */
533 * @DRM_PANTHOR_VM_BIND_OP_TYPE_SYNC_ONLY: No VM operation.
535 * Just serves as a synchronization point on a VM queue.
544 * struct drm_panthor_vm_bind_op - VM bind operation
551 * @bo_handle: Handle of the buffer object to map.
552 * MBZ for unmap or sync-only operations.
558 * MBZ for unmap or sync-only operations.
563 * @va: Virtual address to map/unmap.
564 * MBZ for sync-only operations.
569 * @size: Size to map/unmap.
570 * MBZ for sync-only operations.
579 * the drm_panthor_vm_bind object containing this VM bind operation.
581 * This array shall not be empty for sync-only operations.
588 * enum drm_panthor_vm_bind_flags - VM bind flags
592 * @DRM_PANTHOR_VM_BIND_ASYNC: VM bind operations are queued to the VM
599 * struct drm_panthor_vm_bind - Arguments passed to DRM_IOCTL_PANTHOR_VM_BIND
602 /** @vm_id: VM targeted by the bind request. */
613 * enum drm_panthor_vm_state - VM states.
617 * @DRM_PANTHOR_VM_STATE_USABLE: VM is usable.
619 * New VM operations will be accepted on this VM.
624 * @DRM_PANTHOR_VM_STATE_UNUSABLE: VM is unusable.
626 * Something put the VM in an unusable state (like an asynchronous
629 * Once the VM is in this state, all new MAP operations will be
630 * rejected, and any GPU job targeting this VM will fail.
633 * The only way to recover from an unusable VM is to create a new
634 * VM, and destroy the old one.
640 * struct drm_panthor_vm_get_state - Get VM state.
643 /** @vm_id: VM targeted by the get_state request. */
655 * enum drm_panthor_bo_flags - Buffer object flags, passed at creation time.
658 /** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */
663 * struct drm_panthor_bo_create - Arguments passed to DRM_IOCTL_PANTHOR_BO_CREATE.
669 * The (page-aligned) allocated size for the object will be returned.
679 * @exclusive_vm_id: Exclusive VM this buffer object will be mapped to.
681 * If not zero, the field must refer to a valid VM ID, and implies that:
682 * - the buffer object will only ever be bound to that VM
683 * - cannot be exported as a PRIME fd
699 * struct drm_panthor_bo_mmap_offset - Arguments passed to DRM_IOCTL_PANTHOR_BO_MMAP_OFFSET.
713 * struct drm_panthor_queue_create - Queue creation arguments.
730 * enum drm_panthor_group_priority - Scheduling group priority
755 * struct drm_panthor_group_create - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_CREATE
819 * @vm_id: VM ID to bind this group to.
821 * All submission to queues bound to this group will use this VM.
833 * struct drm_panthor_group_destroy - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_DESTROY
844 * struct drm_panthor_queue_submit - Job submission arguments.
847 * command stream ring-buffer. Queue submission is always part of a group
857 * Must be 64-bit/8-byte aligned (the size of a CS instruction)
869 * Must be aligned on 64-byte.
896 * struct drm_panthor_group_submit - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_SUBMIT
910 * enum drm_panthor_group_state_flags - Group state flags
938 * struct drm_panthor_group_get_state - Arguments passed to DRM_IOCTL_PANTHOR_GROUP_GET_STATE
961 * struct drm_panthor_tiler_heap_create - Arguments passed to DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE
964 /** @vm_id: VM ID the tiler heap should be mapped to */
973 * Must be page-aligned and lie in the [128k:8M] range.
985 * @target_in_flight: Maximum number of in-flight render passes.
987 * If the heap has more than tiler jobs in-flight, the FW will wait for render
1001 * The tiler heap is formed of heap chunks forming a single-link list. This
1008 * struct drm_panthor_tiler_heap_destroy - Arguments passed to DRM_IOCTL_PANTHOR_TILER_HEAP_DESTROY