Unverified Commit eb4accc5 authored by Matt Coster's avatar Matt Coster Committed by Matt Coster
Browse files

drm/imagination: Use pvr_vm_context_get()



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: ff5f643d ("drm/imagination: Add GEM and VM related code")
Reviewed-by: default avatarFrank Binns <frank.binns@imgtec.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8616641d-6005-4b25-bc0a-0b53985a0e08@imgtec.com


Signed-off-by: default avatarMatt Coster <matt.coster@imgtec.com>
parent c7d84a45
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -636,9 +636,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;