drm/amdgpu: Do gpu recovery when no job is running
Subsystems (2)
PATCH 1/1 drm/amdgpu: Do gpu recovery when no job is running
In function flr_work, do gpu recovery when no job is running instead of when some job is running. Because if there is job in list, amdgpu_job_timedout will do the gpu recovery.
--- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +2 -1
@@ -262,7 +262,8 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)/* 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 ); }
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 -1
@@ -283,7 +283,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)/* 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 ||
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
maintainerAm 09.09.20 um 10:56 schrieb Liu ChengZhe:
Quoted 3 lines
In function
flr_work, do gpu recovery when no job is running instead of when some job is running. Because if there is job in list,amdgpu_job_timedoutwill do the gpu recovery.
Maybe write something like "Fix the logic by inverting it".
With that the patch is Acked-by: Christian König <[email protected]>
Quoted 26 lines
Signed-off-by Liu ChengZhe <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +2
-1@@ -262,7 +262,8 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)/* 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 ); }drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +0
-0
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c static void xgpu_nv_mailbox_flr_work(struct work_struct *work) · line 289
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1
-1@@ -283,7 +283,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)/* 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 ||
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · Christian König
Am 09.09.20 um 10:56 schrieb Liu ChengZhe:
Quoted 2 lines
In function
flr_work, do gpu recovery when no job is running instead of when some job is running. Because if there is job
^a
Quoted 1 line
Quoted 1 line
in list,
amdgpu_job_timedoutwill do the gpu recovery.
^the ^remove "the".
To become: "is a job in the list", and "will do GPU recovery."
Quoted 2 lines
Maybe write something like "Fix the logic by inverting it".
Your commit message is fine, but as Christian pointed out, _add_ a sentence to the commit message, possibly in a new paragraph, simply stating that you're inverting the logic, possibly just cutting and pasting what he wrote above.
Regards,
Luben
Quoted 30 lines
With that the patch is Acked-by: Christian König <[email protected]>
Quoted 27 lines
Signed-off-by Liu ChengZhe <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +2
-1@@ -262,7 +262,8 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)/* 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 ); }drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +0
-0@@ -283,7 +283,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c static void xgpu_nv_mailbox_flr_work(struct work_struct *work) · line 289
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1
-1/* 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 ||
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx