]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: add VM_BIND DECOMPRESS uapi flag
authorNitin Gote <nitin.r.gote@intel.com>
Wed, 4 Mar 2026 12:38:00 +0000 (18:08 +0530)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 12 Mar 2026 09:37:38 +0000 (09:37 +0000)
commit2270bd7124f4d25497d58c293cd40ea014ddaf01
tree4c9edb431cd7cac80eec13237cf37da839180564
parent07d40fb889109cb69e1e607a652dc060c98f2fc1
drm/xe: add VM_BIND DECOMPRESS uapi flag

Add a new VM_BIND flag, DRM_XE_VM_BIND_FLAG_DECOMPRESS, that lets userspace
express intent for the driver to perform on-device in-place decompression
for the GPU mapping created by a MAP bind operation.

This flag is used by subsequent driver changes to trigger scheduling of
GPU work that resolves compressed VRAM pages into an uncompressed PAT
VM mapping.

Behavior and semantics:
- Valid only for DRM_XE_VM_BIND_OP_MAP. IOCTLs using this flag on other ops
  are rejected (-EINVAL).
- The bind's pat_index must select the device "no-compression" PAT entry;
  otherwise the ioctl is rejected (-EINVAL).
- Only meaningful for VRAM-backed BOs on devices that support Flat CCS and
  the required hardware generation (driver will return -EOPNOTSUPP if not).
- On success the driver schedules a migrate/resolve and installs the
  returned dma_fence into the BO's kernel reservation
  (DMA_RESV_USAGE_KERNEL).

Compute PR: https://github.com/intel/compute-runtime/pull/898

v3: Rebase on latest drm-tip and add compute pr info

v2: Add kernel doc (Matt)

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mrozek, Michal <michal.mrozek@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
Acked-by: Michal Mrozek <michal.mrozek@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260304123758.3050386-6-nitin.r.gote@intel.com
include/uapi/drm/xe_drm.h