On Wed, Dec 03, 2025 at 09:31:25AM -0800, Matthew Brost wrote: > On Wed, Dec 03, 2025 at 04:24:26PM +0100, Christian König wrote: > > On 12/3/25 16:18, Philipp Stanner wrote: > > > On Wed, 2025-12-03 at 14:15 +0100, Christian König wrote: > > >> On 12/1/25 11:50, Philipp Stanner wrote: > > >>> There is a new dma_fence helper which simplifies testing for a fence's > > >>> signaled_flag. Use it in xe. > > >>> > > >>> Signed-off-by: Philipp Stanner <[email protected]> > > >> > > >> Acked-by: Christian König <[email protected]> > > > > > > This series would then be completely reviewed, it seems. So one could > > > push it. Question is just who and where, and what to do about the merge > > > conflict with intel. > > > > I think as long as it isn't a major merge conflict push it to drm-misc-next > > and make sure that drm-tip had the correct conflict resolution. > > > > > Matthew? > > > > Should have the last word on this when it's an XE merge conflict. > > > > It isn't pressing to get this patch into Xe as it is just an addition > compared to patch 4 which I believe is actually required for > functionality in Xe. So to avoid conflicts maybe just push the first 7 > and for patch 8 once these patches propagate to drm-xe-next, I'll rebase > the last patch and push it into our tree.
If that can wait good, but if not I don't believe it will be hard conflicts. in case it is needed to ge to other trees: Acked-by: Rodrigo Vivi <[email protected]> > > Matt > > > Christian. > > > > > > > > > > > P. > > > > > >> > > >>> --- > > >>> drivers/gpu/drm/xe/xe_exec_queue.c | 9 +++------ > > >>> drivers/gpu/drm/xe/xe_pt.c | 3 +-- > > >>> drivers/gpu/drm/xe/xe_sched_job.c | 2 +- > > >>> 3 files changed, 5 insertions(+), 9 deletions(-) > > >>> > > >>> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c > > >>> b/drivers/gpu/drm/xe/xe_exec_queue.c > > >>> index cb5f204c08ed..06736f52fbaa 100644 > > >>> --- a/drivers/gpu/drm/xe/xe_exec_queue.c > > >>> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c > > >>> @@ -1037,8 +1037,7 @@ struct dma_fence > > >>> *xe_exec_queue_last_fence_get(struct xe_exec_queue *q, > > >>> > > >>> xe_exec_queue_last_fence_lockdep_assert(q, vm); > > >>> > > >>> - if (q->last_fence && > > >>> - test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, > > >>> &q->last_fence->flags)) > > >>> + if (q->last_fence && > > >>> dma_fence_test_signaled_flag(q->last_fence)) > > >>> xe_exec_queue_last_fence_put(q, vm); > > >>> > > >>> fence = q->last_fence ? q->last_fence : dma_fence_get_stub(); > > >>> @@ -1064,8 +1063,7 @@ struct dma_fence > > >>> *xe_exec_queue_last_fence_get_for_resume(struct xe_exec_queue * > > >>> > > >>> lockdep_assert_held_write(&q->hwe->hw_engine_group->mode_sem); > > >>> > > >>> - if (q->last_fence && > > >>> - test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, > > >>> &q->last_fence->flags)) > > >>> + if (q->last_fence && > > >>> dma_fence_test_signaled_flag(q->last_fence)) > > >>> xe_exec_queue_last_fence_put_unlocked(q); > > >>> > > >>> fence = q->last_fence ? q->last_fence : dma_fence_get_stub(); > > >>> @@ -1106,8 +1104,7 @@ int xe_exec_queue_last_fence_test_dep(struct > > >>> xe_exec_queue *q, struct xe_vm *vm) > > >>> > > >>> fence = xe_exec_queue_last_fence_get(q, vm); > > >>> if (fence) { > > >>> - err = test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, > > >>> &fence->flags) ? > > >>> - 0 : -ETIME; > > >>> + err = dma_fence_test_signaled_flag(fence) ? 0 : -ETIME; > > >>> dma_fence_put(fence); > > >>> } > > >>> > > >>> diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c > > >>> index 07f96bda638a..1ca2dec18e51 100644 > > >>> --- a/drivers/gpu/drm/xe/xe_pt.c > > >>> +++ b/drivers/gpu/drm/xe/xe_pt.c > > >>> @@ -1208,8 +1208,7 @@ static bool no_in_syncs(struct xe_sync_entry > > >>> *syncs, u32 num_syncs) > > >>> for (i = 0; i < num_syncs; i++) { > > >>> struct dma_fence *fence = syncs[i].fence; > > >>> > > >>> - if (fence && !test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, > > >>> - &fence->flags)) > > >>> + if (fence && !dma_fence_test_signaled_flag(fence)) > > >>> return false; > > >>> } > > >>> > > >>> diff --git a/drivers/gpu/drm/xe/xe_sched_job.c > > >>> b/drivers/gpu/drm/xe/xe_sched_job.c > > >>> index d21bf8f26964..1c9ba49a325b 100644 > > >>> --- a/drivers/gpu/drm/xe/xe_sched_job.c > > >>> +++ b/drivers/gpu/drm/xe/xe_sched_job.c > > >>> @@ -188,7 +188,7 @@ static bool xe_fence_set_error(struct dma_fence > > >>> *fence, int error) > > >>> bool signaled; > > >>> > > >>> spin_lock_irqsave(fence->lock, irq_flags); > > >>> - signaled = test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags); > > >>> + signaled = dma_fence_test_signaled_flag(fence); > > >>> if (!signaled) > > >>> dma_fence_set_error(fence, error); > > >>> spin_unlock_irqrestore(fence->lock, irq_flags); > > >> > > > > >
