-
- Downloads
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: 7f2a0b50 ("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
Showing
- drivers/gpu/drm/nouveau/dispnv04/crtc.c 1 addition, 8 deletionsdrivers/gpu/drm/nouveau/dispnv04/crtc.c
- drivers/gpu/drm/nouveau/nouveau_bo.c 1 addition, 7 deletionsdrivers/gpu/drm/nouveau/nouveau_bo.c
- drivers/gpu/drm/nouveau/nouveau_chan.c 2 additions, 4 deletionsdrivers/gpu/drm/nouveau/nouveau_chan.c
- drivers/gpu/drm/nouveau/nouveau_dmem.c 3 additions, 6 deletionsdrivers/gpu/drm/nouveau/nouveau_dmem.c
- drivers/gpu/drm/nouveau/nouveau_exec.c 8 additions, 3 deletionsdrivers/gpu/drm/nouveau/nouveau_exec.c
- drivers/gpu/drm/nouveau/nouveau_fence.c 26 additions, 6 deletionsdrivers/gpu/drm/nouveau/nouveau_fence.c
- drivers/gpu/drm/nouveau/nouveau_fence.h 3 additions, 2 deletionsdrivers/gpu/drm/nouveau/nouveau_fence.h
- drivers/gpu/drm/nouveau/nouveau_gem.c 1 addition, 4 deletionsdrivers/gpu/drm/nouveau/nouveau_gem.c
Loading
Please register or sign in to comment