diff options
author | Christian König <[email protected]> | 2021-06-05 16:46:10 +0200 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2021-06-07 14:57:44 -0400 |
commit | 0ac8f5876022f8873677bb9cd29332d6952f2a77 (patch) | |
tree | 0b822d952fba1261ccf3c05495ceff317a9c80f0 | |
parent | 9a3bf287c42593860f29f245d9f782b51930a3d7 (diff) |
drm/amdgpu: fix VM handling for GART allocations
For GTT allocations with a GART address the res contains the VMID0
addresses and can't be used for VM handling.
So ignore the res when the pages array is given or we fill the page
tables with nonsense.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Nirmoy Das <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 66a379ddb87c..7ed02b8463ee 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1712,8 +1712,8 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, if (r) goto error_unlock; - amdgpu_res_first(res, offset, (last - start + 1) * AMDGPU_GPU_PAGE_SIZE, - &cursor); + amdgpu_res_first(pages_addr ? NULL : res, offset, + (last - start + 1) * AMDGPU_GPU_PAGE_SIZE, &cursor); while (cursor.remaining) { uint64_t tmp, num_entries, addr; |