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

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

2025-04-10 Thread 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 in nouveau_fence_done(), where dma_fence_is_signaled() (

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