summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChunming Zhou <david1.zhou@amd.com>2015-08-18 16:25:46 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-08-20 17:02:58 -0400
commita3348bb801bac5c9a81fb3da4b1a2f0479e97923 (patch)
treef1521020a7e93598e3b960c7527ee7f5a41e44a1 /drivers/gpu/drm
parent3c4adead8480f81df687a181d1e54a39b91b9363 (diff)
drm/amdgpu: don't need to use bo_list_clone any more
Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 77fc7cd0fac3..2cf7f52a5650 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -156,7 +156,6 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
uint64_t *chunk_array_user;
uint64_t *chunk_array = NULL;
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
- struct amdgpu_bo_list *bo_list = NULL;
unsigned size, i;
int r = 0;
@@ -168,20 +167,7 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
r = -EINVAL;
goto out;
}
- bo_list = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle);
- if (!amdgpu_enable_scheduler)
- p->bo_list = bo_list;
- else {
- if (bo_list && !bo_list->has_userptr) {
- p->bo_list = amdgpu_bo_list_clone(bo_list);
- amdgpu_bo_list_put(bo_list);
- if (!p->bo_list)
- return -ENOMEM;
- } else if (bo_list && bo_list->has_userptr)
- p->bo_list = bo_list;
- else
- p->bo_list = NULL;
- }
+ p->bo_list = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle);
/* get chunks */
INIT_LIST_HEAD(&p->validated);
@@ -481,12 +467,9 @@ static void amdgpu_cs_parser_fini_late(struct amdgpu_cs_parser *parser)
unsigned i;
if (parser->ctx)
amdgpu_ctx_put(parser->ctx);
- if (parser->bo_list) {
- if (amdgpu_enable_scheduler && !parser->bo_list->has_userptr)
- amdgpu_bo_list_free(parser->bo_list);
- else
- amdgpu_bo_list_put(parser->bo_list);
- }
+ if (parser->bo_list)
+ amdgpu_bo_list_put(parser->bo_list);
+
drm_free_large(parser->vm_bos);
for (i = 0; i < parser->nchunks; i++)
drm_free_large(parser->chunks[i].kdata);