diff options
author | Christian König <christian.koenig@amd.com> | 2016-01-11 09:35:22 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-13 12:22:59 -0500 |
commit | d8e0cae645504a787b05abfb91afee8cd7fa1701 (patch) | |
tree | 20758bba33a2bd997665565b3c0cfb789b8b4cb0 | |
parent | eceb8a1562db6fc3e1c21cd54a4be0189aa1d0e3 (diff) |
drm/amdgpu: validate duplicates first
Most VM BOs end up in the duplicates list, validate it
first make -ENOMEM less likely.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 1fffc338f69d..6f89f8e034d0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -421,11 +421,11 @@ static int amdgpu_cs_parser_relocs(struct amdgpu_cs_parser *p) | |||
421 | 421 | ||
422 | amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates); | 422 | amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates); |
423 | 423 | ||
424 | r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated); | 424 | r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &duplicates); |
425 | if (r) | 425 | if (r) |
426 | goto error_validate; | 426 | goto error_validate; |
427 | 427 | ||
428 | r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &duplicates); | 428 | r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated); |
429 | 429 | ||
430 | error_validate: | 430 | error_validate: |
431 | if (r) { | 431 | if (r) { |