[Intel-xe] [PATCH 00/26] Refactor VM bind code

Matthew Brost matthew.brost at intel.com
Thu Oct 26 04:01:47 UTC 2023


WIP on refactoring VM bind to final error handling solution.

Major changes are:
1. Allow bind / exec IOCTLs with zero binds / batches
2. Convert multiple binds from IOCTL into single job
3. CPU binds in jobs
4. Sync vs async bind per IOCTL rather than per queue

Error handling still not 100% correct but this this series structures
the code to make it possible.

This series shouldn't break any uAPI compatibility until the last patch
in the series.

Matt  

Matthew Brost (26):
  drm/xe: Allow num_binds == 0 in VM bind IOCTL
  drm/xe: Allow num_batch_buffer == 0 in exec IOCTL
  drm/xe: Lock all gpuva ops during VM bind IOCTL
  drm/xe: Add ops_execute function which returns a fence
  drm/xe: Move migrate to prefetch to op_lock funtion
  drm/xe: Add struct xe_vma_ops abstraction
  drm/xe: Update xe_vm_rebind to use dummy VMA operations
  drm/xe: Move drm exec loop to vm_bind_ioctl_ops_execute
  drm/xe: Fixup error handling / ref counting in VM bind IOCTL
  drm/xe: Convert pagefault rebind to use ops interface
  drm/xe: Add some members to xe_vma_ops
  drm/xe: Add vm_bind_ioctl_ops_install_fences helper
  drm/xe: Drop rebind argument from xe_pt_prepare_bind
  drm/xe: Add xe_vm_pgtable_update_op to xe_vma_ops
  drm/xe: Move setting last fence and sync wait to
    vm_bind_ioctl_ops_install_fences
  drm/xe: Fix vma_is_valid to use tile argument
  drm/xe: Adjust tile mask in operations create
  drm/xe: Add xe_gt_tlb_invalidation_range and convert PT layer to use
    this
  drm/xe: s/xe_tile_migrate_engine/xe_tile_migrate_exec_queue
  drm/xe: Convert multiple bind ops into single job
  drm/xe: Update clear / populate arguments
  drm/xe: Add __xe_migrate_update_pgtables_cpu helper
  drm/xe: Add xe_hw_fence_signal helper
  drm/xe: CPU binds for jobs
  drm/xe: Don't use migrate exec queue for page fault binds
  drm/xe/uapi: Make sync vs async VM bind operations per IOCTL rather
    than queue

 drivers/gpu/drm/xe/xe_bo.c                  |   7 +-
 drivers/gpu/drm/xe/xe_bo.h                  |   6 +-
 drivers/gpu/drm/xe/xe_bo_types.h            |   2 +
 drivers/gpu/drm/xe/xe_device.c              |  23 +
 drivers/gpu/drm/xe/xe_device.h              |   7 +
 drivers/gpu/drm/xe/xe_device_types.h        |   4 +
 drivers/gpu/drm/xe/xe_exec.c                |  48 +-
 drivers/gpu/drm/xe/xe_exec_queue.c          |  20 +-
 drivers/gpu/drm/xe/xe_exec_queue_types.h    |   7 +-
 drivers/gpu/drm/xe/xe_gt_pagefault.c        |  18 +-
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c |  60 +-
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h |   3 +
 drivers/gpu/drm/xe/xe_guc_submit.c          |  43 +-
 drivers/gpu/drm/xe/xe_hw_fence.c            |   8 +
 drivers/gpu/drm/xe/xe_hw_fence.h            |   1 +
 drivers/gpu/drm/xe/xe_migrate.c             | 382 +++-----
 drivers/gpu/drm/xe/xe_migrate.h             |  46 +-
 drivers/gpu/drm/xe/xe_pt.c                  | 992 ++++++++++++--------
 drivers/gpu/drm/xe/xe_pt.h                  |   8 +
 drivers/gpu/drm/xe/xe_pt_types.h            |  51 +
 drivers/gpu/drm/xe/xe_sched_job.c           |   4 +-
 drivers/gpu/drm/xe/xe_sched_job_types.h     |  31 +-
 drivers/gpu/drm/xe/xe_sync.c                |   5 +-
 drivers/gpu/drm/xe/xe_sync.h                |   2 +-
 drivers/gpu/drm/xe/xe_vm.c                  | 981 ++++++++-----------
 drivers/gpu/drm/xe/xe_vm.h                  |   7 +
 drivers/gpu/drm/xe/xe_vm_types.h            | 208 ++--
 include/uapi/drm/xe_drm.h                   |   6 +-
 28 files changed, 1536 insertions(+), 1444 deletions(-)

-- 
2.34.1



More information about the Intel-xe mailing list