[PATCH v2 0/7] Enable device atomics with a VM bind flag

Nirmoy Das nirmoy.das at intel.com
Fri Apr 12 09:22:42 UTC 2024


Currently device atomics in SMEM only buffer is not supported and
given that simultaneous usage of device atomics and CPU atomics on
the same SMEM buffer is not guaranteed to function without migration,
and UMD expects no migration for SMEM-only buffer objects, so this
provide a way to set device atomics when UMD is certain to use the
buffer only for device atomics.

v2: Add BO helper func in xe_vm_bind_ioctl()(Matt B).
    Use XE_IOCTL_DBG for checks(Matt B).
    Move platform checks with help of adding flags in
    intel_device_info(Matt B).
    Add document for DRM_XE_VM_BIND_FLAG_DEVICE_ATOMICS(Matt B). 
    Create query uAPI for this newly added VM bind flag(Jose, Lionel).

Test-with: 20240412090117.32727-1-nirmoy.das at intel.com
Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
Cc: Brian Welty <brian.welty at intel.com>
Cc: Fei Yang <fei.yang at intel.com>
Cc: Jose Souza <jose.souza at intel.com>
Cc: Lionel G Landwerlin <lionel.g.landwerlin at intel.com>
Cc: Matt Roper <matthew.d.roper at intel.com>
Cc: Matthew Brost <matthew.brost at intel.com>
Cc: Michal Mrozek <michal.mrozek at intel.com>
Cc: Oak Zeng <oak.zeng at intel.com>
Cc: Thomas Hellstr_m <thomas.hellstrom at linux.intel.com>

Nirmoy Das (7):
  drm/xe: Introduce has_atomic_enable_pte_bit device info
  drm/xe: Consolidate setting PTE_AE into one place
  drm/xe: Add function to check if BO has single placement
  drm/xe: Move vm bind bo validation to a helper function
  drm/xe: Introduce has_device_atomics_on_smem device info
  drm/xe/uapi: Introduce VMA bind flag for device atomics
  drm/xe/uapi: Add a query flag for has_device_atomics_on_smem

 drivers/gpu/drm/xe/xe_bo.c           |  14 ++++
 drivers/gpu/drm/xe/xe_bo.h           |   1 +
 drivers/gpu/drm/xe/xe_device_types.h |   4 ++
 drivers/gpu/drm/xe/xe_pci.c          |   5 ++
 drivers/gpu/drm/xe/xe_pci_types.h    |   2 +
 drivers/gpu/drm/xe/xe_pt.c           |   4 +-
 drivers/gpu/drm/xe/xe_query.c        |   4 +-
 drivers/gpu/drm/xe/xe_vm.c           | 101 +++++++++++++++++----------
 drivers/gpu/drm/xe/xe_vm_types.h     |   2 +
 include/uapi/drm/xe_drm.h            |  20 ++++--
 10 files changed, 113 insertions(+), 44 deletions(-)

-- 
2.42.0



More information about the Intel-xe mailing list