diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-16 06:01:03 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-22 17:04:14 -0400 |
commit | 8604ffcbf04f8f4f3f55a9e46e5ff948b2ed4290 (patch) | |
tree | d7cadb99b518661cd74318ff08b691070a3e4a5d /drivers/gpu/drm/amd | |
parent | 9d1d02ff36783f954a206dfbf7943b7f2057f58b (diff) |
drm/amdgpu: fix VM clearing for the root PD
We need to figure out the address after validating the BO, not before.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index ece0ac703e27..e40ca8676418 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, | |||
369 | uint64_t addr; | 369 | uint64_t addr; |
370 | int r; | 370 | int r; |
371 | 371 | ||
372 | addr = amdgpu_bo_gpu_offset(bo); | ||
373 | entries = amdgpu_bo_size(bo) / 8; | 372 | entries = amdgpu_bo_size(bo) / 8; |
374 | 373 | ||
375 | if (pte_support_ats) { | 374 | if (pte_support_ats) { |
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, | |||
401 | if (r) | 400 | if (r) |
402 | goto error; | 401 | goto error; |
403 | 402 | ||
403 | addr = amdgpu_bo_gpu_offset(bo); | ||
404 | if (ats_entries) { | 404 | if (ats_entries) { |
405 | uint64_t ats_value; | 405 | uint64_t ats_value; |
406 | 406 | ||