XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
drm_xe_vm_bind Struct Reference

#include <xe_drm.h>

Collaboration diagram for drm_xe_vm_bind:
Collaboration graph
[legend]

Public Attributes

__u64 extensions
 
__u32 vm_id
 
__u32 exec_queue_id
 
__u32 pad
 
__u32 num_binds
 
union { 
 
   struct drm_xe_vm_bind_op   bind 
 
   __u64   vector_of_binds 
 
};  
 
__u32 pad2
 
__u32 num_syncs
 
__u64 syncs
 
__u64 reserved [2]
 

Detailed Description

struct drm_xe_vm_bind - Input of &DRM_IOCTL_XE_VM_BIND

Below is an example of a minimal use of &struct drm_xe_vm_bind to asynchronously bind the buffer data at address BIND_ADDRESS to illustrate userptr. It can be synchronized by using the example provided for &struct drm_xe_sync.

.. code-block:: C

data = aligned_alloc(ALIGNMENT, BO_SIZE);
struct drm_xe_vm_bind bind = {
    .vm_id = vm,
    .num_binds = 1,
    .bind.obj = 0,
    .bind.obj_offset = to_user_pointer(data),
    .bind.range = BO_SIZE,
    .bind.addr = BIND_ADDRESS,
    .bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR,
    .bind.flags = 0,
    .num_syncs = 1,
    .syncs = &sync,
    .exec_queue_id = 0,
};
ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);

Member Data Documentation

◆ [union]

union { ... } drm_xe_vm_bind

◆ bind

struct drm_xe_vm_bind_op drm_xe_vm_bind::bind

@bind: used if num_binds == 1

◆ exec_queue_id

__u32 drm_xe_vm_bind::exec_queue_id

@exec_queue_id: exec_queue_id, must be of class DRM_XE_ENGINE_CLASS_VM_BIND and exec queue must have same vm_id. If zero, the default VM bind engine is used.

◆ extensions

__u64 drm_xe_vm_bind::extensions

@extensions: Pointer to the first extension struct, if any

◆ num_binds

__u32 drm_xe_vm_bind::num_binds

@num_binds: number of binds in this IOCTL

◆ num_syncs

__u32 drm_xe_vm_bind::num_syncs

@num_syncs: amount of syncs to wait on

◆ pad

__u32 drm_xe_vm_bind::pad

@pad: MBZ

◆ pad2

__u32 drm_xe_vm_bind::pad2

@pad2: MBZ

◆ reserved

__u64 drm_xe_vm_bind::reserved[2]

@reserved: Reserved

◆ syncs

__u64 drm_xe_vm_bind::syncs

@syncs: pointer to struct drm_xe_sync array

◆ vector_of_binds

__u64 drm_xe_vm_bind::vector_of_binds

@vector_of_binds: userptr to array of struct drm_xe_vm_bind_op if num_binds > 1

◆ vm_id

__u32 drm_xe_vm_bind::vm_id

@vm_id: The ID of the VM to bind to


The documentation for this struct was generated from the following file: