mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 13:18:04 +02: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> (cherry picked from commit92f12952f3)
This commit is contained in:
parent
a1248b811e
commit
6a526efcfb
2 changed files with 9 additions and 11 deletions
|
|
@ -1957,7 +1957,7 @@
|
|||
"description": "nouveau: reinstate fencing on screen destroy",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "28a781323fba87e6e338cfecb0b6fe25a08f61a4"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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