drm/amdgpu: fix clearing mappings for BOs that are always valid in VM
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 16 Jun 2023 13:14:07 +0000 (15:14 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jun 2023 19:35:51 +0000 (15:35 -0400)
commitea2c3c08554601b051d91403a241266e1cf490a5
treef18d50788af62e5cf5cf44d14cbc8cb666fbf6a3
parent03d400e7605e3d36abd3f949b25ba806cccff0cb
drm/amdgpu: fix clearing mappings for BOs that are always valid in VM

Per VM BOs must be marked as moved or otherwise their ranges are not
updated on use which might be necessary when the replace operation
splits mappings.

This fixes random GPU hangs when replacing sparse mappings from the
userspace, while OP_MAP/OP_UNMAP works fine because always valid BOs
are correctly handled there.

Cc: stable@vger.kernel.org
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c