]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/imagination: Hold drm_gem_gpuva lock for unmap
authorBrendan King <Brendan.King@imgtec.com>
Wed, 26 Feb 2025 15:43:06 +0000 (15:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:53 +0000 (13:01 +0100)
commit58e37cfcb12aaf78a4cf899e221950a6f1ced491
tree781ea6fb344de9c400000fa9c0e0f5819ddc90eb
parentd993ae7360923efd6ade43a32043459a121c28c1
drm/imagination: Hold drm_gem_gpuva lock for unmap

commit a5c4c3ba95a52d66315acdfbaba9bd82ed39c250 upstream.

Avoid a warning from drm_gem_gpuva_assert_lock_held in drm_gpuva_unlink.

The Imagination driver uses the GEM object reservation lock to protect
the gpuva list, but the GEM object was not always known in the code
paths that ended up calling drm_gpuva_unlink. When the GEM object isn't
known, it is found by calling drm_gpuva_find to lookup the object
associated with a given virtual address range, or by calling
drm_gpuva_find_first when removing all mappings.

Cc: stable@vger.kernel.org
Fixes: 4bc736f890ce ("drm/imagination: vm: make use of GPUVM's drm_exec helper")
Signed-off-by: Brendan King <brendan.king@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250226-hold-drm_gem_gpuva-lock-for-unmap-v2-1-3fdacded227f@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/imagination/pvr_fw_meta.c
drivers/gpu/drm/imagination/pvr_vm.c
drivers/gpu/drm/imagination/pvr_vm.h