mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
nouveau: reinstate fencing on screen destroy
As it turns out, the wait is required as the driver expects for
rendering to be quiesced on exit. This can trigger channel failures,
which in turn trigger recovery. This can fail and destroy the whole
system.
Fixes: 28a781323f ("nouveau: change fence destruction logic on screen destroy")
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4223
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8867>
This commit is contained in:
parent
0464117ad9
commit
92f12952f3
1 changed files with 8 additions and 10 deletions
|
|
@ -111,17 +111,15 @@ nouveau_fence_del(struct nouveau_fence *fence)
|
|||
void
|
||||
nouveau_fence_cleanup(struct nouveau_screen *screen)
|
||||
{
|
||||
struct nouveau_fence *fence, *next;
|
||||
|
||||
for (fence = screen->fence.head; fence; fence = next) {
|
||||
next = fence->next;
|
||||
nouveau_fence_trigger_work(fence);
|
||||
nouveau_fence_ref(NULL, &fence);
|
||||
}
|
||||
screen->fence.head = NULL;
|
||||
screen->fence.tail = NULL;
|
||||
if (screen->fence.current) {
|
||||
nouveau_fence_trigger_work(screen->fence.current);
|
||||
struct nouveau_fence *current = NULL;
|
||||
|
||||
/* nouveau_fence_wait will create a new current fence, so wait on the
|
||||
* _current_ one, and remove both.
|
||||
*/
|
||||
nouveau_fence_ref(screen->fence.current, ¤t);
|
||||
nouveau_fence_wait(current, NULL);
|
||||
nouveau_fence_ref(NULL, ¤t);
|
||||
nouveau_fence_ref(NULL, &screen->fence.current);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue