]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "drm/amdgpu: Avoid extra evict-restore process."
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Aug 2025 19:36:52 +0000 (15:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:58:23 +0000 (18:58 +0200)
This reverts commit 71598a5a7797f0052aaa7bcff0b8d4b8f20f1441 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>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 0adb106e2c42560a9de8eac76ba5603b4a3e2e68..37d53578825b33c795196fd592553cd6146d5222 100644 (file)
@@ -2292,11 +2292,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);
 }
 
 static void amdgpu_vm_destroy_task_info(struct kref *kref)