]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:40 +0000 (13:49 +0200)
commit91e69e67d401eb67178ce5992ddc9b1046b39ee7
treec167d94610c0aba140a105a825f517c9a38b4248
parent3546f76c7ad87d0ade575a5c4acad5e4704d927c
drm/amdgpu: fix clearing mappings for BOs that are always valid in VM

commit ea2c3c08554601b051d91403a241266e1cf490a5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c