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

Matthew Brost matthew.brost at intel.com
Tue Nov 7 05:25:36 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.

v2: Rebase, Take in-syncs into account when num_execs or num_binds == 0

Matt 

Matthew Brost (27):
  drm/xe: Allow num_binds == 0 in VM bind IOCTL
  drm/xe: Allow num_batch_buffer == 0 in exec IOCTL
  drm/xe: Take in-syncs into account when num_execs or num_binds == 0
  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                |  53 +-
 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             | 377 +++-----
 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                |  78 +-
 drivers/gpu/drm/xe/xe_sync.h                |   7 +-
 drivers/gpu/drm/xe/xe_vm.c                  | 998 ++++++++------------
 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, 1632 insertions(+), 1443 deletions(-)

-- 
2.34.1



More information about the Intel-xe mailing list