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

#include <xe_drm.h>

Public Attributes

__u64 extensions
 
__u32 handle
 
__u32 flags
 
__u64 offset
 
__u64 reserved [2]
 

Detailed Description

struct drm_xe_gem_mmap_offset - Input of &DRM_IOCTL_XE_GEM_MMAP_OFFSET

The @flags can be:

Note: The mmap size can be at most 4K, due to HW limitations. As a result this interface is only supported on CPU architectures that support 4K page size. The mmap_offset ioctl will detect this and gracefully return an error, where userspace is expected to have a different fallback method for triggering a barrier.

Roughly the usage would be as follows:

.. code-block:: C

struct drm_xe_gem_mmap_offset mmo = {
    .handle = 0, // must be set to 0
    .flags = DRM_XE_MMAP_OFFSET_FLAG_PCI_BARRIER,
};

err = ioctl(fd, DRM_IOCTL_XE_GEM_MMAP_OFFSET, &mmo);
map = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, mmo.offset);
map[i] = 0xdeadbeef; // issue barrier

Member Data Documentation

◆ extensions

__u64 drm_xe_gem_mmap_offset::extensions

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

◆ flags

__u32 drm_xe_gem_mmap_offset::flags

@flags: Flags

◆ handle

__u32 drm_xe_gem_mmap_offset::handle

@handle: Handle for the object being mapped.

◆ offset

__u64 drm_xe_gem_mmap_offset::offset

@offset: The fake offset to use for subsequent mmap call

◆ reserved

__u64 drm_xe_gem_mmap_offset::reserved[2]

@reserved: Reserved


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