]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/panthor: Lock the VM resv before calling drm_gpuvm_bo_obtain_prealloc()
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 13 Sep 2024 11:27:22 +0000 (13:27 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 1 Oct 2024 16:37:13 +0000 (18:37 +0200)
commitfa998a9eac8809da4f219aad49836fcad2a9bf5c
treea48bb700da9cd6b868726bf2c3125826f6981d3b
parent2b55639a4e25ff02ee496368b03456bd28ebdc0b
drm/panthor: Lock the VM resv before calling drm_gpuvm_bo_obtain_prealloc()

drm_gpuvm_bo_obtain_prealloc() will call drm_gpuvm_bo_put() on our
pre-allocated BO if the <BO,VM> association exists. Given we
only have one ref on preallocated_vm_bo, drm_gpuvm_bo_destroy() will
be called immediately, and we have to hold the VM resv lock when
calling this function.

Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240913112722.492144-1-boris.brezillon@collabora.com
drivers/gpu/drm/panthor/panthor_mmu.c