mirror_ubuntu-kernels/drivers/gpu/drm/nouveau/dispnv04
Danilo Krummrich 978474dc82 drm/nouveau: fence: fix undefined fence state after emit
nouveau_fence_emit() can fail before and after initializing the
dma-fence and hence before and after initializing the dma-fence' kref.

In order to avoid nouveau_fence_emit() potentially failing before
dma-fence initialization pass the channel to nouveau_fence_new() already
and perform the required check before even allocating the fence.

While at it, restore the original behavior of nouveau_fence_new() and
add nouveau_fence_create() for separate (pre-)allocation instead. Always
splitting up allocation end emit wasn't a good idea in the first place.
Hence, limit it to the places where we actually need to pre-allocate.

Fixes: 7f2a0b50b2 ("drm/nouveau: fence: separate fence alloc and emit")
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230829223847.4406-1-dakr@redhat.com
2023-08-31 00:46:23 +02:00
..
arb.c
crtc.c drm/nouveau: fence: fix undefined fence state after emit 2023-08-31 00:46:23 +02:00
cursor.c
dac.c drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
dfp.c drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
disp.c drm/nouveau/disp: expose page flip event class 2022-11-09 10:44:27 +10:00
disp.h drm/nouveau/disp: expose page flip event class 2022-11-09 10:44:27 +10:00
hw.c
hw.h
Kbuild
nvreg.h
overlay.c drm/plane: Remove drm_plane_init() 2022-09-20 09:37:12 +02:00
tvmodesnv17.c drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
tvnv04.c drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
tvnv17.c drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
tvnv17.h