diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 9591c13781bd..3fb21ecd29e0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -387,8 +387,7 @@ static int amdgpu_cs_parser_relocs(struct amdgpu_cs_parser *p) | |||
387 | } | 387 | } |
388 | 388 | ||
389 | INIT_LIST_HEAD(&duplicates); | 389 | INIT_LIST_HEAD(&duplicates); |
390 | p->vm_bos = amdgpu_vm_get_bos(p->adev, &fpriv->vm, | 390 | amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd); |
391 | &p->validated, &duplicates); | ||
392 | 391 | ||
393 | if (need_mmap_lock) | 392 | if (need_mmap_lock) |
394 | down_read(¤t->mm->mmap_sem); | 393 | down_read(¤t->mm->mmap_sem); |
@@ -397,6 +396,12 @@ static int amdgpu_cs_parser_relocs(struct amdgpu_cs_parser *p) | |||
397 | if (unlikely(r != 0)) | 396 | if (unlikely(r != 0)) |
398 | goto error_reserve; | 397 | goto error_reserve; |
399 | 398 | ||
399 | p->vm_bos = amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates); | ||
400 | if (!p->vm_bos) { | ||
401 | r = -ENOMEM; | ||
402 | goto error_validate; | ||
403 | } | ||
404 | |||
400 | r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated); | 405 | r = amdgpu_cs_list_validate(p->adev, &fpriv->vm, &p->validated); |
401 | if (r) | 406 | if (r) |
402 | goto error_validate; | 407 | goto error_validate; |