drm/amdgpu: fix VM handling for GART allocations
authorChristian König <christian.koenig@amd.com>
Sat, 5 Jun 2021 14:46:10 +0000 (16:46 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jun 2021 18:57:44 +0000 (14:57 -0400)
commit0ac8f5876022f8873677bb9cd29332d6952f2a77
tree0b822d952fba1261ccf3c05495ceff317a9c80f0
parent9a3bf287c42593860f29f245d9f782b51930a3d7
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 <christian.koenig@amd.com>
Reviewed-by: Nirmoy Das <nirmoy.das@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c