Documentation/gpu/drm-vm-bind-async.rst

Source file repositories/reference/linux-study-clean/Documentation/gpu/drm-vm-bind-async.rst

File Facts

System
Linux kernel
Corpus path
Documentation/gpu/drm-vm-bind-async.rst
Extension
.rst
Size
12346 bytes
Lines
310
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct drm_xe_vm_bind_op {
	/**
	 * @obj: GEM object to operate on, MBZ for MAP_USERPTR, MBZ for UNMAP
	 */
	__u32 obj;

	/** @pad: MBZ */
	__u32 pad;

	union {
		/**
		 * @obj_offset: Offset into the object for MAP.
		 */
		__u64 obj_offset;

		/** @userptr: user virtual address for MAP_USERPTR */
		__u64 userptr;
	};

	/**
	 * @range: Number of bytes from the object to bind to addr, MBZ for UNMAP_ALL
	 */
	__u64 range;

	/** @addr: Address to operate on, MBZ for UNMAP_ALL */
	__u64 addr;

	/**
	 * @tile_mask: Mask for which tiles to create binds for, 0 == All tiles,
	 * only applies to creating new VMAs
	 */
	__u64 tile_mask;

       /* Map (parts of) an object into the GPU virtual address range.
    #define XE_VM_BIND_OP_MAP		0x0
        /* Unmap a GPU virtual address range */
    #define XE_VM_BIND_OP_UNMAP		0x1
        /*
	 * Map a CPU virtual address range into a GPU virtual
	 * address range.
	 */
    #define XE_VM_BIND_OP_MAP_USERPTR	0x2
        /* Unmap a gem object from the VM. */
    #define XE_VM_BIND_OP_UNMAP_ALL	0x3
        /*
	 * Make the backing memory of an address range resident if
	 * possible. Note that this doesn't pin backing memory.
	 */
    #define XE_VM_BIND_OP_PREFETCH	0x4

        /* Make the GPU map readonly. */
    #define XE_VM_BIND_FLAG_READONLY	(0x1 << 16)
	/*
	 * Valid on a faulting VM only, do the MAP operation immediately rather
	 * than deferring the MAP to the page fault handler.
	 */
    #define XE_VM_BIND_FLAG_IMMEDIATE	(0x1 << 17)
	/*
	 * When the NULL flag is set, the page tables are setup with a special
	 * bit which indicates writes are dropped and all reads return zero.  In
	 * the future, the NULL flags will only be valid for XE_VM_BIND_OP_MAP
	 * operations, the BO handle MBZ, and the BO offset MBZ. This flag is
	 * intended to implement VK sparse bindings.
	 */
    #define XE_VM_BIND_FLAG_NULL	(0x1 << 18)
	/** @op: Operation to perform (lower 16 bits) and flags (upper 16 bits) */
	__u32 op;

	/** @mem_region: Memory region to prefetch VMA to, instance not a mask */
	__u32 region;

Annotation

Implementation Notes