Commit d384ed35 authored by Christian König's avatar Christian König Committed by Tim Gardner

drm/amdgpu: validate duplicates first

BugLink: http://bugs.launchpad.net/bugs/1546572

Most VM BOs end up in the duplicates list, validate it
first make -ENOMEM less likely.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d8e0cae6)
Signed-off-by: default avatarAlberto Milone <alberto.milone@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent c72f6a2c
...@@ -421,11 +421,11 @@ static int amdgpu_cs_parser_relocs(struct amdgpu_cs_parser *p) ...@@ -421,11 +421,11 @@ static int amdgpu_cs_parser_relocs(struct amdgpu_cs_parser *p)
amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates); amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates);
r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated); r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &duplicates);
if (r) if (r)
goto error_validate; goto error_validate;
r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &duplicates); r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated);
error_validate: error_validate:
if (r) { if (r) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment