Skip to content

Commit 54b2f90

Browse files
MTCostergregkh
authored andcommitted
drm/imagination: Use pvr_vm_context_get()
[ Upstream commit eb4accc ] 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: ff5f643 ("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>
1 parent d968f2c commit 54b2f90

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/imagination/pvr_vm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,7 @@ pvr_vm_context_lookup(struct pvr_file *pvr_file, u32 handle)
654654

655655
xa_lock(&pvr_file->vm_ctx_handles);
656656
vm_ctx = xa_load(&pvr_file->vm_ctx_handles, handle);
657-
if (vm_ctx)
658-
kref_get(&vm_ctx->ref_count);
659-
657+
pvr_vm_context_get(vm_ctx);
660658
xa_unlock(&pvr_file->vm_ctx_handles);
661659

662660
return vm_ctx;

0 commit comments

Comments
 (0)