Skip to content
Snippets Groups Projects
Verified Commit 4aa89e86 authored by Danilo Krummrich's avatar Danilo Krummrich Committed by Maxime Ripard
Browse files

drm/imagination: vm: prevent duplicate drm_gpuvm_bo instances


Use drm_gpuvm_bo_obtain() instead of drm_gpuvm_bo_create(). The latter
should only be used in conjunction with drm_gpuvm_bo_obtain_prealloc().

drm_gpuvm_bo_obtain() re-uses existing instances of a given VM and BO
combination, whereas drm_gpuvm_bo_create() would always create a new
instance of struct drm_gpuvm_bo and hence leave us with duplicates.

Fixes: ff5f643d ("drm/imagination: Add GEM and VM related code")
Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
Reviewed-by: default avatarDonald Robson <donald.robson@imgtec.com>
Tested-by: default avatarFrank Binns <frank.binns@imgtec.com>
Signed-off-by: Maxime Ripard's avatarMaxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231124233650.152653-2-dakr@redhat.com
parent 3519d772
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment