aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-09-01 20:37:57 +0200
committerAlex Deucher <alexander.deucher@amd.com>2018-01-10 15:44:53 -0500
commit0abc6878fc2d6990d8b0851b55d3c77ecfdd74e6 (patch)
treeae95452bc13c9793872f9eeab300368bb9d5e362 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentdrm/amdgpu: minor optimize VM moved handling v2 (diff)
downloadlinux-dev-0abc6878fc2d6990d8b0851b55d3c77ecfdd74e6.tar.xz
linux-dev-0abc6878fc2d6990d8b0851b55d3c77ecfdd74e6.zip
drm/amdgpu: update VM PDs after the PTs
Necessary for the next patch. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 10805edcf964..e48b4ec88c8c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -518,10 +518,6 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
if (!amdgpu_vm_ready(vm))
return;
- r = amdgpu_vm_update_directories(adev, vm);
- if (r)
- goto error;
-
r = amdgpu_vm_clear_freed(adev, vm, NULL);
if (r)
goto error;
@@ -530,6 +526,10 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
operation == AMDGPU_VA_OP_REPLACE)
r = amdgpu_vm_bo_update(adev, bo_va, false);
+ r = amdgpu_vm_update_directories(adev, vm);
+ if (r)
+ goto error;
+
error:
if (r && r != -ERESTARTSYS)
DRM_ERROR("Couldn't update BO_VA (%d)\n", r);