lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTBz7UTCoPvzyJcA@lstrano-desk.jf.intel.com>
Date: Wed, 3 Dec 2025 09:31:25 -0800
From: Matthew Brost <matthew.brost@...el.com>
To: Christian König <christian.koenig@....com>
CC: <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>, 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>, <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 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 <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.
> 

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.

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);
> >>
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ