summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-08-29 15:36:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-09 18:56:32 +0200
commit8d7ee56bf5307a9c51ebed040462da143b73b45c (patch)
treea297cd9bd1fd4ca8a00d2d5211e536208b4d8409
parentb9cf42a8f0340d3556c12f9692cb34cf720311b3 (diff)
downloadlinux-8d7ee56bf5307a9c51ebed040462da143b73b45c.tar.gz
linux-8d7ee56bf5307a9c51ebed040462da143b73b45c.tar.bz2
linux-8d7ee56bf5307a9c51ebed040462da143b73b45c.zip
Revert "drm/amdgpu: Avoid extra evict-restore process."
This reverts commit a3201e3b7cf10bcd3d7eef4859d275eb6d98e12a which is commit 1f02f2044bda1db1fd995bc35961ab075fa7b5a2 upstream. This commit introduced a regression, however the fix for the regression: aa5fc4362fac ("drm/amdgpu: fix task hang from failed job submission during process kill") depends on things not yet present in 6.12.y and older kernels. Since this commit is more of an optimization, just revert it for 6.12.y and older stable kernels. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org # 6.1.x - 6.12.x Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index fded8902346f..2992ce494e00 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2125,11 +2125,13 @@ void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
*/
long amdgpu_vm_wait_idle(struct amdgpu_vm *vm, long timeout)
{
- timeout = drm_sched_entity_flush(&vm->immediate, timeout);
+ timeout = dma_resv_wait_timeout(vm->root.bo->tbo.base.resv,
+ DMA_RESV_USAGE_BOOKKEEP,
+ true, timeout);
if (timeout <= 0)
return timeout;
- return drm_sched_entity_flush(&vm->delayed, timeout);
+ return dma_fence_wait_timeout(vm->last_unlocked, true, timeout);
}
/**