nouveau: push event block/allowing out of the fence context
authorDave Airlie <airlied@gmail.com>
Fri, 22 Dec 2023 04:31:59 +0000 (14:31 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Jan 2024 02:27:53 +0000 (12:27 +1000)
commiteacabb5462717a52fccbbbba458365a4f5e61f35
treeda19f7f3a343afabd1f0747c08b56f7e214cbb44
parent9c9dd22ba5d747cceee3d1b1757448b5c48ac705
nouveau: push event block/allowing out of the fence context

There is a deadlock between the irq and fctx locks,
the irq handling takes irq then fctx lock
the fence signalling takes fctx then irq lock

This splits the fence signalling path so the code that hits
the irq lock is done in a separate work queue.

This seems to fix crashes/hangs when using nouveau gsp with
i915 primary GPU.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-11-airlied@gmail.com
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/nouveau/nouveau_fence.h