summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorChristian König2015-12-11 21:01:23 +0100
committerAlex Deucher2015-12-18 23:29:46 +0100
commitee1782c3f27fec5462363af48f27811b049155ab (patch)
tree9230f1a1cdd3c3eb183ba36300d9ede2fe9bfe81 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amdgpu: split VM PD and PT handling during CS (diff)
downloadkernel-qcow2-linux-ee1782c3f27fec5462363af48f27811b049155ab.tar.gz
kernel-qcow2-linux-ee1782c3f27fec5462363af48f27811b049155ab.tar.xz
kernel-qcow2-linux-ee1782c3f27fec5462363af48f27811b049155ab.zip
drm/amdgpu: keep the PTs validation list in the VM v2
This avoids allocating it on the fly. v2: fix grammar in comment Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 3fb21ecd29e0..6ce595ff1aff 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -396,11 +396,7 @@ static int amdgpu_cs_parser_relocs(struct amdgpu_cs_parser *p)
if (unlikely(r != 0))
goto error_reserve;
- p->vm_bos = amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates);
- if (!p->vm_bos) {
- r = -ENOMEM;
- goto error_validate;
- }
+ amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates);
r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated);
if (r)
@@ -483,7 +479,6 @@ static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser, int error, bo
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);
kfree(parser->chunks);