* [PATCH] Remove calls to DAL suspend/resume from amdgpu_device_gpu_recover.
@ 2018-05-17 15:50 Andrey Grodzovsky
[not found] ` <1526572224-5392-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Grodzovsky @ 2018-05-17 15:50 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Andrey Grodzovsky, harry.wentland-5C7GfCeVMHo,
bas-dldO88ZXqoXqqjsSq9zF6IRWq/SkRNHw
First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks.
Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls since
it is called BEFORE we cancel and force completion of all jobs which were not yet processed.
So, as Bas pointed in the ticket we will try to wait for fence in amdgpu_pm_compute_clocks but the pipe
is hanged so we end up in deadlock.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106500
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index fcd4bb2..f5c0a2d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3200,10 +3200,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
/* block TTM */
resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
- /* store modesetting */
- if (amdgpu_device_has_dc_support(adev))
- state = drm_atomic_helper_suspend(adev->ddev);
-
/* block all schedulers and reset given job's ring */
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
struct amdgpu_ring *ring = adev->rings[i];
@@ -3243,10 +3239,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
kthread_unpark(ring->sched.thread);
}
- if (amdgpu_device_has_dc_support(adev)) {
- if (drm_atomic_helper_resume(adev->ddev, state))
- dev_info(adev->dev, "drm resume failed:%d\n", r);
- } else {
+ if (!amdgpu_device_has_dc_support(adev)) {
drm_helper_resume_force_mode(adev->ddev);
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove calls to DAL suspend/resume from amdgpu_device_gpu_recover.
[not found] ` <1526572224-5392-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-17 18:41 ` Harry Wentland
[not found] ` <6d346841-6618-08cf-ac22-e3b4e8bb92c0-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Harry Wentland @ 2018-05-17 18:41 UTC (permalink / raw)
To: Andrey Grodzovsky, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: bas-dldO88ZXqoXqqjsSq9zF6IRWq/SkRNHw
On 2018-05-17 11:50 AM, Andrey Grodzovsky wrote:
> First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks.
> Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls since
> it is called BEFORE we cancel and force completion of all jobs which were not yet processed.
> So, as Bas pointed in the ticket we will try to wait for fence in amdgpu_pm_compute_clocks but the pipe
> is hanged so we end up in deadlock.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106500
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index fcd4bb2..f5c0a2d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3200,10 +3200,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
> /* block TTM */
> resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
>
> - /* store modesetting */
> - if (amdgpu_device_has_dc_support(adev))
> - state = drm_atomic_helper_suspend(adev->ddev);
> -
> /* block all schedulers and reset given job's ring */
> for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
> struct amdgpu_ring *ring = adev->rings[i];
> @@ -3243,10 +3239,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
> kthread_unpark(ring->sched.thread);
> }
>
> - if (amdgpu_device_has_dc_support(adev)) {
> - if (drm_atomic_helper_resume(adev->ddev, state))
> - dev_info(adev->dev, "drm resume failed:%d\n", r);
> - } else {
> + if (!amdgpu_device_has_dc_support(adev)) {
> drm_helper_resume_force_mode(adev->ddev);
> }
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove calls to DAL suspend/resume from amdgpu_device_gpu_recover.
[not found] ` <6d346841-6618-08cf-ac22-e3b4e8bb92c0-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-18 9:54 ` Christian König
0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2018-05-18 9:54 UTC (permalink / raw)
To: Harry Wentland, Andrey Grodzovsky,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: bas-dldO88ZXqoXqqjsSq9zF6IRWq/SkRNHw
Am 17.05.2018 um 20:41 schrieb Harry Wentland:
> On 2018-05-17 11:50 AM, Andrey Grodzovsky wrote:
>> First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks.
>> Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls since
>> it is called BEFORE we cancel and force completion of all jobs which were not yet processed.
>> So, as Bas pointed in the ticket we will try to wait for fence in amdgpu_pm_compute_clocks but the pipe
>> is hanged so we end up in deadlock.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106500
>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
>
> Harry
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +--------
>> 1 file changed, 1 insertion(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index fcd4bb2..f5c0a2d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -3200,10 +3200,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
>> /* block TTM */
>> resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
>>
>> - /* store modesetting */
>> - if (amdgpu_device_has_dc_support(adev))
>> - state = drm_atomic_helper_suspend(adev->ddev);
>> -
>> /* block all schedulers and reset given job's ring */
>> for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
>> struct amdgpu_ring *ring = adev->rings[i];
>> @@ -3243,10 +3239,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
>> kthread_unpark(ring->sched.thread);
>> }
>>
>> - if (amdgpu_device_has_dc_support(adev)) {
>> - if (drm_atomic_helper_resume(adev->ddev, state))
>> - dev_info(adev->dev, "drm resume failed:%d\n", r);
>> - } else {
>> + if (!amdgpu_device_has_dc_support(adev)) {
>> drm_helper_resume_force_mode(adev->ddev);
>> }
>>
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-18 9:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 15:50 [PATCH] Remove calls to DAL suspend/resume from amdgpu_device_gpu_recover Andrey Grodzovsky
[not found] ` <1526572224-5392-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-05-17 18:41 ` Harry Wentland
[not found] ` <6d346841-6618-08cf-ac22-e3b4e8bb92c0-5C7GfCeVMHo@public.gmane.org>
2018-05-18 9:54 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.