Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-15 Thread Philipp Stanner
On Tue, 2025-04-15 at 11:56 +0200, Christian König wrote: > Am 14.04.25 um 16:27 schrieb Danilo Krummrich: > > On Mon, Apr 14, 2025 at 10:54:25AM +0200, Philipp Stanner wrote: > > > @Danilo: > > > We have now 2 possible solutions for the firing WARN_ON floating. > > > > > > Version A (Christian) >

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-15 Thread Christian König
Am 14.04.25 um 16:27 schrieb Danilo Krummrich: > On Mon, Apr 14, 2025 at 10:54:25AM +0200, Philipp Stanner wrote: >> @Danilo: >> We have now 2 possible solutions for the firing WARN_ON floating. >> >> Version A (Christian) >> Check in nouveau_fence_context_kill() whether a fence is already >> signa

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-14 Thread Danilo Krummrich
On Mon, Apr 14, 2025 at 10:54:25AM +0200, Philipp Stanner wrote: > @Danilo: > We have now 2 possible solutions for the firing WARN_ON floating. > > Version A (Christian) > Check in nouveau_fence_context_kill() whether a fence is already > signaled before setting an error. > > Version B (Me) > Thi

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-14 Thread Philipp Stanner
On Fri, 2025-04-11 at 16:10 +0200, Philipp Stanner wrote: > On Fri, 2025-04-11 at 15:06 +0200, Christian König wrote: > > Am 11.04.25 um 14:44 schrieb Philipp Stanner: > > > On Fri, 2025-04-11 at 13:05 +0200, Christian König wrote: > > > >  Am 11.04.25 um 11:29 schrieb Philipp Stanner: > > > >   >

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-11 Thread Philipp Stanner
On Fri, 2025-04-11 at 15:06 +0200, Christian König wrote: > Am 11.04.25 um 14:44 schrieb Philipp Stanner: > > On Fri, 2025-04-11 at 13:05 +0200, Christian König wrote: > > >  Am 11.04.25 um 11:29 schrieb Philipp Stanner: > > >   > > > > [SNIP] > > > >   > > > > It could be, however, that at the sam

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-11 Thread Christian König
Am 11.04.25 um 14:44 schrieb Philipp Stanner: > On Fri, 2025-04-11 at 13:05 +0200, Christian König wrote: >>  Am 11.04.25 um 11:29 schrieb Philipp Stanner: >>   >>> [SNIP] >>>   >>> It could be, however, that at the same moment >>> nouveau_fence_signal() is >>> removing that entry, holding the appr

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-11 Thread Philipp Stanner
On Fri, 2025-04-11 at 13:05 +0200, Christian König wrote: >  Am 11.04.25 um 11:29 schrieb Philipp Stanner: >   > > [SNIP] > >   > > It could be, however, that at the same moment > > nouveau_fence_signal() is > > removing that entry, holding the appropriate lock. > > > > So we have a race. Again. >

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-11 Thread Christian König
Am 11.04.25 um 11:29 schrieb Philipp Stanner: > [SNIP] > It could be, however, that at the same moment nouveau_fence_signal() is > removing that entry, holding the appropriate lock. > > So we have a race. Again. Ah, yes of course. If signaled is called with or without the lock is actually undeter

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-11 Thread Philipp Stanner
On Thu, 2025-04-10 at 17:36 +0200, Philipp Stanner wrote: > On Thu, 2025-04-10 at 15:16 +0200, Christian König wrote: > > Am 10.04.25 um 15:09 schrieb Philipp Stanner: > > > On Thu, 2025-04-10 at 14:58 +0200, Christian König wrote: > > > > Am 10.04.25 um 11:24 schrieb Philipp Stanner: > > > > > Nou

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Christian König
Am 10.04.25 um 11:24 schrieb Philipp Stanner: > Nouveau currently relies on the assumption that dma_fences will only > ever get signaled through nouveau_fence_signal(), which takes care of > removing a signaled fence from the list nouveau_fence_chan.pending. > > This self-imposed rule is violated i

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Philipp Stanner
On Thu, 2025-04-10 at 15:16 +0200, Christian König wrote: > Am 10.04.25 um 15:09 schrieb Philipp Stanner: > > On Thu, 2025-04-10 at 14:58 +0200, Christian König wrote: > > > Am 10.04.25 um 11:24 schrieb Philipp Stanner: > > > > Nouveau currently relies on the assumption that dma_fences will > > > >

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Danilo Krummrich
On Thu, Apr 10, 2025 at 02:13:34PM +0200, Christian König wrote: > Am 10.04.25 um 11:24 schrieb Philipp Stanner: > > Nouveau currently relies on the assumption that dma_fences will only > > ever get signaled through nouveau_fence_signal(), which takes care of > > removing a signaled fence from the

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Christian König
Am 10.04.25 um 15:09 schrieb Philipp Stanner: > On Thu, 2025-04-10 at 14:58 +0200, Christian König wrote: >> Am 10.04.25 um 11:24 schrieb Philipp Stanner: >>> Nouveau currently relies on the assumption that dma_fences will >>> only >>> ever get signaled through nouveau_fence_signal(), which takes c

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Philipp Stanner
On Thu, 2025-04-10 at 14:58 +0200, Christian König wrote: > Am 10.04.25 um 11:24 schrieb Philipp Stanner: > > Nouveau currently relies on the assumption that dma_fences will > > only > > ever get signaled through nouveau_fence_signal(), which takes care > > of > > removing a signaled fence from the

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Christian König
Am 10.04.25 um 14:21 schrieb Danilo Krummrich: > On Thu, Apr 10, 2025 at 02:13:34PM +0200, Christian König wrote: >> Am 10.04.25 um 11:24 schrieb Philipp Stanner: >>> Nouveau currently relies on the assumption that dma_fences will only >>> ever get signaled through nouveau_fence_signal(), which tak

Re: [PATCH 1/3] drm/nouveau: Prevent signaled fences in pending list

2025-04-10 Thread Christian König
Am 10.04.25 um 11:24 schrieb Philipp Stanner: > Nouveau currently relies on the assumption that dma_fences will only > ever get signaled through nouveau_fence_signal(), which takes care of > removing a signaled fence from the list nouveau_fence_chan.pending. > > This self-imposed rule is violated i