diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index b75c3b235832..2f39fea10bd1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -455,11 +455,12 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
455 | struct ttm_validate_buffer tv, *entry; | 455 | struct ttm_validate_buffer tv, *entry; |
456 | struct amdgpu_bo_list_entry *vm_bos; | 456 | struct amdgpu_bo_list_entry *vm_bos; |
457 | struct ww_acquire_ctx ticket; | 457 | struct ww_acquire_ctx ticket; |
458 | struct list_head list; | 458 | struct list_head list, duplicates; |
459 | unsigned domain; | 459 | unsigned domain; |
460 | int r; | 460 | int r; |
461 | 461 | ||
462 | INIT_LIST_HEAD(&list); | 462 | INIT_LIST_HEAD(&list); |
463 | INIT_LIST_HEAD(&duplicates); | ||
463 | 464 | ||
464 | tv.bo = &bo_va->bo->tbo; | 465 | tv.bo = &bo_va->bo->tbo; |
465 | tv.shared = true; | 466 | tv.shared = true; |
@@ -469,7 +470,8 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
469 | if (!vm_bos) | 470 | if (!vm_bos) |
470 | return; | 471 | return; |
471 | 472 | ||
472 | r = ttm_eu_reserve_buffers(&ticket, &list, true, NULL); | 473 | /* Provide duplicates to avoid -EALREADY */ |
474 | r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates); | ||
473 | if (r) | 475 | if (r) |
474 | goto error_free; | 476 | goto error_free; |
475 | 477 | ||