• Matthew Brost's avatar
    drm/xe: Convert multiple bind ops into single job · e8babb28
    Matthew Brost authored
    This aligns with the uAPI of an array of binds or single bind that
    results in multiple GPUVA ops to be considered a single atomic
    operations.
    
    The design is roughly:
    - xe_vma_ops is a list of xe_vma_op (GPUVA op)
    - each xe_vma_op resolves to 0-3 PT ops
    - xe_vma_ops creates a single job
    - if at any point during binding a failure occurs, xe_vma_ops contains
      the information necessary unwind the PT and VMA (GPUVA) state
    
    v2:
     - add missing dma-resv slot reservation (CI, testing)
    v4:
     - Fix TLB invalidation (Paulo)
     - Add missing xe_sched_job_last_fence_add/test_dep check (Inspection)
    v5:
     - Invert i, j usage (Matthew Auld)
     - Add helper to test and add job dep (Matthew Auld)
     - Return on anything but -ETIME for cpu bind (Matthew Auld)
     - Return -ENOBUFS if suballoc of BB fails due to size (Matthew Auld)
     - s/do/Do (Matthew Auld)
     - Add missing comma (Matthew Auld)
     - Do not assign return value to xe_range_fence_insert (Matthew Auld)
    v6:
     - s/0x1ff/MAX_PTE_PER_SDI (Matthew Auld, CI)
     - Check to large of SA in Xe to avoid triggering WARN (Matthew Auld)
     - Fix checkpatch issues
    v7:
     - Rebase
     - Support more than 510 PTEs updates in a bind job (Paulo, mesa testing)
    v8:
     - Rebase
    
    Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
    Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240704041652.272920-5-matthew.brost@intel.com
    e8babb28
xe_pt.c 55.3 KB