drm/amdgpu: fix the hw hang during perform system reboot and reset
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix the hw hang during perform system reboot and reset
Unify set device CGPG to ungate state before enter poweroff or reset.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -2413,6 +2413,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r; +amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE ); +amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid)
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines · Prike Liang
Unify set device CGPG to ungate state before enter poweroff or reset.
Signed-off-by Prike Liang <[email protected]>Tested-by Mengbing Wang <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1@@ -2413,6 +2413,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r; +amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE ); +amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid) --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Paul Menzel
Tested-byDear Alex, dear Prike,
Am 13.04.20 um 17:14 schrieb Alex Deucher:
Quoted 8 lines · Prike Liang
Quoted 5 lines
Unify set device CGPG to ungate state before enter poweroff or reset.
Signed-off-by Prike Liang <[email protected]>Tested-by Mengbing Wang <[email protected]>Acked-by Alex Deucher <[email protected]>
First:
Second, I am having trouble to understand, how you can add your Acked-by tag to a commit with such a commit message?
The problem is not described (apparently it only affected certain devices), it is not mentioned that it’s a regression (Fixes: tag/line is missing), and I am having a hard time to understand the commit message at all (and the one from the commit introducing the regression). Why is it more or less reverting part of the other commit, while the issue was not reproducible on Prike’s system?
Quoted 12 lines
Quoted 12 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -2413,6 +2413,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r;
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1+amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE ); +amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid) --2.7.4
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 22 lines · Paul Menzel
Dear Alex, dear Prike,
Am 13.04.20 um 17:14 schrieb Alex Deucher:
Quoted 8 lines · Prike Liang
Quoted 5 lines
Unify set device CGPG to ungate state before enter poweroff or reset.
Signed-off-by Prike Liang <[email protected]>Tested-by Mengbing Wang <[email protected]>Acked-by Alex Deucher <[email protected]>First:
(MS-7A37) with an AMD Ryzen 3 2200G)
Second, I am having trouble to understand, how you can add your Acked-by tag to a commit with such a commit message?
Quoted 6 lines
The problem is not described (apparently it only affected certain devices), it is not mentioned that it’s a regression (Fixes: tag/line is missing), and I am having a hard time to understand the commit message at all (and the one from the commit introducing the regression). Why is it more or less reverting part of the other commit, while the issue was not reproducible on Prike’s system?
The original issue was that we were not properly ungating some of the hw blocks in the right order for S3 suspend on renoir. So the fix was to add ungate calls to amdgpu_device_suspend() to handle that case. However, the original fix should not have removed the calls from amdgpu_device_ip_suspend_phase1() since that is called separately for some other use cases (e.g., pci shutdown). It didn't matter for some asics as they don't have different levels of powergating functionality. I'll add the fixes tag before the patch goes upstream.
Alex
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0@@ -2413,6 +2413,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r; +amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE ); +amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-1for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid) --2.7.4
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 42 lines
Quoted 6 lines · Paul Menzel
Dear Alex, dear Prike,
Am 13.04.20 um 17:14 schrieb Alex Deucher:
Quoted 1 line
On Mon, Apr 13, 2020 at 11:09 AM Prike Liang <[email protected]>
Quoted 16 lines · wrote:
Quoted 7 lines
Quoted 5 lines
Unify set device CGPG to ungate state before enter poweroff or reset.
Signed-off-by Prike Liang <[email protected]>Tested-by Mengbing Wang <[email protected]>Acked-by Alex Deucher <[email protected]>First:
(MS-7A37) with an AMD Ryzen 3 2200G)
Second, I am having trouble to understand, how you can add your Acked-by tag to a commit with such a commit message?
Quoted 6 lines
The problem is not described (apparently it only affected certain devices), it is not mentioned that it’s a regression (Fixes: tag/line is missing), and I am having a hard time to understand the commit message at all (and the one from the commit introducing the regression). Why is it more or less reverting part of the other commit, while the issue was not reproducible on Prike’s system?
The original issue was that we were not properly ungating some of the hw blocks in the right order for S3 suspend on renoir. So the fix was to add ungate calls to
amdgpu_device_suspend()to handle that case.
However, the original fix should not have removed the calls fromamdgpu_device_ip_suspend_phase1()since that is called separately for some other use cases (e.g., pci shutdown). It didn't matter for some asics as they don't have different levels of powergating functionality. I'll add the fixes tag before the patch goes upstream.
Quoted 2 lines
Alex
[Prike] Thanks Alex help clarify and I will give more detail in the message.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 21 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -2413,6 +2413,8 @@ static int
amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)Quoted 14 lines
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1{int i, r; +amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE ); +amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid) --2.7.4
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 24 lines · Prike Liang
Unify set device CGPG to ungate state before enter poweroff or reset.
Signed-off-by Prike Liang <[email protected]>Tested-by Mengbing Wang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0@@ -2413,6 +2413,8 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev) {int i, r; +amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE ); +amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE );for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid)Signature · 1 line
2.7.4
I can confirm that this fixes the shutdown/reboot hang on my raven.
Signature · 7 lines
Regards, Johannes Hirte _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx