Skip to content

Commit 8c2f5dd

Browse files
larunbebbrezillon
authored andcommitted
drm/lima: Fix dma_resv deadlock at drm object pin time
Commit a780278 ("drm/gem: Acquire reservation lock in drm_gem_{pin/unpin}()") moved locking the DRM object's dma reservation to drm_gem_pin(), but Lima's pin callback kept calling drm_gem_shmem_pin, which also tries to lock the same dma_resv, leading to a double lock situation. As was already done for Panfrost in the previous commit, fix it by replacing drm_gem_shmem_pin() with its locked variant. Cc: Thomas Zimmermann <[email protected]> Cc: Dmitry Osipenko <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Steven Price <[email protected]> Fixes: a780278 ("drm/gem: Acquire reservation lock in drm_gem_{pin/unpin}()") Signed-off-by: Adrián Larumbe <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Tested-by: Val Packett <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e57f218 commit 8c2f5dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/lima/lima_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int lima_gem_pin(struct drm_gem_object *obj)
185185
if (bo->heap_size)
186186
return -EINVAL;
187187

188-
return drm_gem_shmem_pin(&bo->base);
188+
return drm_gem_shmem_pin_locked(&bo->base);
189189
}
190190

191191
static int lima_gem_vmap(struct drm_gem_object *obj, struct iosys_map *map)

0 commit comments

Comments
 (0)