]> www.infradead.org Git - nvme.git/commit
drm/amdgpu: reset vm state machine after gpu reset(vram lost)
authorZhenGuo Yin <zhenguo.yin@amd.com>
Fri, 19 Jul 2024 08:10:40 +0000 (16:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Jul 2024 21:30:49 +0000 (17:30 -0400)
commit5659b0c93a1ea02c662a030b322093203f299185
treeefa1b1990450d29406e64ef144f622cb07543fd7
parentfab1ead0ae3a4757afb92ff6909b37d63db17e55
drm/amdgpu: reset vm state machine after gpu reset(vram lost)

[Why]
Page table of compute VM in the VRAM will lost after gpu reset.
VRAM won't be restored since compute VM has no shadows.

[How]
Use higher 32-bit of vm->generation to record a vram_lost_counter.
Reset the VM state machine when vm->genertaion is not equal to
the new generation token.

v2: Check vm->generation instead of calling drm_sched_entity_error
in amdgpu_vm_validate.
v3: Use new generation token instead of vram_lost_counter for check.

Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 47c0388b0589cb481c294dcb857d25a214c46eb3)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c