diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index ae43b58c9733..4afc507820c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -449,7 +449,7 @@ out: | |||
449 | * vital here, so they are not reported back to userspace. | 449 | * vital here, so they are not reported back to userspace. |
450 | */ | 450 | */ |
451 | static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | 451 | static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, |
452 | struct amdgpu_bo_va *bo_va) | 452 | struct amdgpu_bo_va *bo_va, uint32_t operation) |
453 | { | 453 | { |
454 | struct ttm_validate_buffer tv, *entry; | 454 | struct ttm_validate_buffer tv, *entry; |
455 | struct amdgpu_bo_list_entry *vm_bos; | 455 | struct amdgpu_bo_list_entry *vm_bos; |
@@ -485,7 +485,9 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
485 | if (r) | 485 | if (r) |
486 | goto error_unlock; | 486 | goto error_unlock; |
487 | 487 | ||
488 | r = amdgpu_vm_bo_update(adev, bo_va, &bo_va->bo->tbo.mem); | 488 | |
489 | if (operation == AMDGPU_VA_OP_MAP) | ||
490 | r = amdgpu_vm_bo_update(adev, bo_va, &bo_va->bo->tbo.mem); | ||
489 | 491 | ||
490 | error_unlock: | 492 | error_unlock: |
491 | mutex_unlock(&bo_va->vm->mutex); | 493 | mutex_unlock(&bo_va->vm->mutex); |
@@ -580,7 +582,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, | |||
580 | } | 582 | } |
581 | 583 | ||
582 | if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE)) | 584 | if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE)) |
583 | amdgpu_gem_va_update_vm(adev, bo_va); | 585 | amdgpu_gem_va_update_vm(adev, bo_va, args->operation); |
584 | 586 | ||
585 | drm_gem_object_unreference_unlocked(gobj); | 587 | drm_gem_object_unreference_unlocked(gobj); |
586 | return r; | 588 | return r; |