]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amdgpu: Do gpu recovery when no job is running
authorLiu ChengZhe <ChengZhe.Liu@amd.com>
Wed, 9 Sep 2020 08:00:12 +0000 (16:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:24:18 +0000 (17:24 -0400)
In function flr_work, we should do gpu recovery when no job
is running. Fix the logic by inverting it.

v2: modify the description

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c

index 9c07014d9bd6ce4ba1e03568e349b37b297f4e52..f5ce9a9f4cf578549bb5e2c22997f93725d02791 100644 (file)
@@ -262,7 +262,8 @@ flr_done:
 
        /* Trigger recovery for world switch failure if no TDR */
        if (amdgpu_device_should_recover_gpu(adev)
-               && (amdgpu_device_has_job_running(adev) || adev->sdma_timeout == MAX_SCHEDULE_TIMEOUT))
+               && (!amdgpu_device_has_job_running(adev) ||
+               adev->sdma_timeout == MAX_SCHEDULE_TIMEOUT))
                amdgpu_device_gpu_recover(adev, NULL);
 }
 
index 9c23abf9b140d8f177ee1c2e27371ab77ebbc09c..666ed99cc14b050bfb56da7ec13f59524855592b 100644 (file)
@@ -283,7 +283,7 @@ flr_done:
 
        /* Trigger recovery for world switch failure if no TDR */
        if (amdgpu_device_should_recover_gpu(adev)
-               && (amdgpu_device_has_job_running(adev) ||
+               && (!amdgpu_device_has_job_running(adev) ||
                adev->sdma_timeout == MAX_SCHEDULE_TIMEOUT ||
                adev->gfx_timeout == MAX_SCHEDULE_TIMEOUT ||
                adev->compute_timeout == MAX_SCHEDULE_TIMEOUT ||