[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7b6efe8-5343-45a7-b16e-441da15145cd@amd.com>
Date: Wed, 3 Dec 2025 16:24:26 +0100
From: Christian König <christian.koenig@....com>
To: phasta@...nel.org, Sumit Semwal <sumit.semwal@...aro.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Felix Kuehling <Felix.Kuehling@....com>,
Alex Deucher <alexander.deucher@....com>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko Ursulin
<tursulin@...ulin.net>, Huang Rui <ray.huang@....com>,
Matthew Auld <matthew.auld@...el.com>,
Matthew Brost <matthew.brost@...el.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
Lucas De Marchi <lucas.demarchi@...el.com>,
Thomas Hellström <thomas.hellstrom@...ux.intel.com>
Cc: linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, intel-xe@...ts.freedesktop.org
Subject: Re: [PATCH v2 8/8] drm/xe: Use dma_fence_test_signaled_flag()
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 <phasta@...nel.org>
>>
>> Acked-by: Christian König <christian.koenig@....com>
>
> 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.
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);
>>
>
Powered by blists - more mailing lists