diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 08bc7722ddb8..8660c0854a1e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |||
@@ -219,6 +219,13 @@ struct amdgpu_ctx *amdgpu_ctx_get(struct amdgpu_fpriv *fpriv, uint32_t id) | |||
219 | return ctx; | 219 | return ctx; |
220 | } | 220 | } |
221 | 221 | ||
222 | struct amdgpu_ctx *amdgpu_ctx_get_ref(struct amdgpu_ctx *ctx) | ||
223 | { | ||
224 | if (ctx) | ||
225 | kref_get(&ctx->refcount); | ||
226 | return ctx; | ||
227 | } | ||
228 | |||
222 | int amdgpu_ctx_put(struct amdgpu_ctx *ctx) | 229 | int amdgpu_ctx_put(struct amdgpu_ctx *ctx) |
223 | { | 230 | { |
224 | if (ctx == NULL) | 231 | if (ctx == NULL) |