drm/imagination: Use pvr_vm_context_get()
BugLink: https://bugs.launchpad.net/bugs/2101915
[ Upstream commit eb4accc5234525e2cb2b720187ccaf6db99b705f ]
I missed this open-coded kref_get() while trying to debug a refcount
bug, so let's use the helper function here to avoid that waste of time
again in the future.
Fixes: ff5f643de0 ("drm/imagination: Add GEM and VM related code")
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8616641d-6005-4b25-bc0a-0b53985a0e08@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
8f34e1f952
commit
e708339e42
@@ -654,9 +654,7 @@ pvr_vm_context_lookup(struct pvr_file *pvr_file, u32 handle)
|
||||
|
||||
xa_lock(&pvr_file->vm_ctx_handles);
|
||||
vm_ctx = xa_load(&pvr_file->vm_ctx_handles, handle);
|
||||
if (vm_ctx)
|
||||
kref_get(&vm_ctx->ref_count);
|
||||
|
||||
pvr_vm_context_get(vm_ctx);
|
||||
xa_unlock(&pvr_file->vm_ctx_handles);
|
||||
|
||||
return vm_ctx;
|
||||
|
||||
Reference in New Issue
Block a user