Skip to content

Commit

Permalink
drm/amdgpu: update VM PDs after the PTs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian König authored and Alex Deucher committed Jan 10, 2018
1 parent ec363e0 commit 0abc687
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,6 @@ static int amdgpu_bo_vm_update_pte(struct amdgpu_cs_parser *p)
struct amdgpu_bo *bo;
int i, r;

r = amdgpu_vm_update_directories(adev, vm);
if (r)
return r;

r = amdgpu_vm_clear_freed(adev, vm, NULL);
if (r)
return r;
Expand Down Expand Up @@ -839,6 +835,10 @@ static int amdgpu_bo_vm_update_pte(struct amdgpu_cs_parser *p)
if (r)
return r;

r = amdgpu_vm_update_directories(adev, vm);
if (r)
return r;

r = amdgpu_sync_fence(adev, &p->job->sync, vm->last_update, false);
if (r)
return r;
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 0abc687

Please sign in to comment.