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>
This commit is contained in:
parent
9d1d02ff36
commit
8604ffcbf0
@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
|
|||||||
uint64_t addr;
|
uint64_t addr;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
addr = amdgpu_bo_gpu_offset(bo);
|
|
||||||
entries = amdgpu_bo_size(bo) / 8;
|
entries = amdgpu_bo_size(bo) / 8;
|
||||||
|
|
||||||
if (pte_support_ats) {
|
if (pte_support_ats) {
|
||||||
@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
|
|||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
if (ats_entries) {
|
if (ats_entries) {
|
||||||
uint64_t ats_value;
|
uint64_t ats_value;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user