drm/amdgpu: abstract amdgpu_job for scheduler

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
This commit is contained in:
Chunming Zhou
2015-08-18 15:16:40 +08:00
committed by Alex Deucher
parent 6055f37afd
commit bb977d3711
9 changed files with 130 additions and 136 deletions

View File

@@ -219,6 +219,13 @@ struct amdgpu_ctx *amdgpu_ctx_get(struct amdgpu_fpriv *fpriv, uint32_t id)
return ctx;
}
struct amdgpu_ctx *amdgpu_ctx_get_ref(struct amdgpu_ctx *ctx)
{
if (ctx)
kref_get(&ctx->refcount);
return ctx;
}
int amdgpu_ctx_put(struct amdgpu_ctx *ctx)
{
if (ctx == NULL)