[PATCH v4 0/5] Refactor default device atomic settings

Nirmoy Das nirmoy.das at intel.com
Thu Apr 25 22:23:41 UTC 2024


The default behavior of device atomics depends on the
VM type and buffer allocation types. Device atomics are
expected to function with all types of allocations for
traditional applications/APIs. Additionally, in compute/SVM
API scenarios with fault mode or LR mode VMs, device atomics
must work with single-region allocations. In all other cases
device atomics should be disabled by default.

v4: Previous assumption that device atomics should be disabled
    by default on SMEM only BO was wrong as traditional applications
    will not use such allocations for CPU atomics. So remove the
    VM bind flag and the query uAPI and instead refactor default device 
    atomics settings as per VM type and buffer allocations.
      

v3: Capture ret value of xe_vm_bind_ioctl_validate_bo(Matt B).
    Remove redundant coh_mode param from xe_vm_bind_ioctl_validate_bo().
    Remove has_device_atomics_on_smem from xe_graphics_desc(Jose).
    Replace DRM_XE_QUERY_CONFIG_SUPP_DEV_ATOMIC_ON_SMEM with 
    config flag DRM_XE_QUERY_CONFIG_FLAG_HAS_DEV_ATOMIC_ON_SMEM(Jose).
    Mention that PTE_AE will not be applied to userptr(Matt R)

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).

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 (5):
  drm/xe: Introduce has_atomic_enable_pte_bit device info
  drm/xe: Move vm bind bo validation to a helper function
  drm/xe: Introduce has_device_atomics_on_smem device info
  drm/xe: Add function to check if BO has single placement
  drm/xe: Refactor default device atomic settings

 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    |  1 +
 drivers/gpu/drm/xe/xe_pt.c           | 24 +++++++--
 drivers/gpu/drm/xe/xe_vm.c           | 80 ++++++++++++++++------------
 7 files changed, 90 insertions(+), 39 deletions(-)

-- 
2.42.0



More information about the Intel-xe mailing list