drm/xe/hw_engine_group: Add helper to wait for dma fence jobs
authorFrancois Dugast <francois.dugast@intel.com>
Fri, 9 Aug 2024 15:51:32 +0000 (17:51 +0200)
committerMatthew Brost <matthew.brost@intel.com>
Sun, 18 Aug 2024 01:31:55 +0000 (18:31 -0700)
commit2750ff97ee385b85195c5579ee911a551fbb0dd9
tree2e6c204d3ee779b9b3b5e9de3b5670738e237ab3
parent0d92cd8935a3fffbbfee0fd59cdc89ac5167b14a
drm/xe/hw_engine_group: Add helper to wait for dma fence jobs

This is a required feature for faulting long running jobs not to be
submitted while dma fence jobs are running on the hw engine group.

v2: Switch to lockdep_assert_held_write in worker, get a proper reference
    for the last fence (Matt Brost)

v3: Directly call dma_fence_put with the fence ref (Matt Brost)

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809155156.1955925-8-francois.dugast@intel.com
drivers/gpu/drm/xe/xe_hw_engine_group.c