drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode
From: Michel Dänzer <[email protected]>
We were testing the register offset, instead of the value stored in the register, therefore always timing out the loop.
This reduces suspend time of the system in the bug report below by ~600 ms.
Bugzilla: https://bugs.freedesktop.org/107277
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
@@ -3490,7 +3490,7 @@ static void gfx_v9_0_enter_rlc_safe_mode(struct amdgpu_device *adev)/* wait for RLC_SAFE_MODE */ for (i =0 ; i < adev->usec_timeout; i++) { -if (!REG_GET_FIELD (SOC15_REG_OFFSET (GC ,0 , mmRLC_SAFE_MODE),RLC_SAFE_MODE ,CMD )) +if (!REG_GET_FIELD (RREG32_SOC15 (GC ,0 , mmRLC_SAFE_MODE),RLC_SAFE_MODE ,CMD ))break ;udelay (1 ); }
Signature · 6 lines
2.18.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 13 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Friday, July 20, 2018 12:33 PM
To: [email protected]
Subject: [PATCH] drm/amdgpu: Fix RLC safe mode test ingfx_v9_0_enter_rlc_safe_modeFrom: Michel Dänzer <[email protected]>
We were testing the register offset, instead of the value stored in the register, therefore always timing out the loop.
Quoted 6 lines
This reduces suspend time of the system in the bug report below by ~600 ms.
Bugzilla: https://bugs.freedesktop.org/107277
Tested-by Paul Menzel <[email protected]>Signed-off-by Michel Dänzer <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2
-2@@ -3490,7 +3490,7 @@ static void gfx_v9_0_enter_rlc_safe_mode(struct amdgpu_device *adev)/* wait for RLC_SAFE_MODE */ for (i =0 ; i < adev->usec_timeout; i++) { -if (!REG_GET_FIELD (SOC15_REG_OFFSET (GC ,0 , mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD)) +if (!REG_GET_FIELD (RREG32_SOC15 (GC ,0 , mmRLC_SAFE_MODE), +RLC_SAFE_MODE ,CMD ))break ;udelay (1 ); } --2.18.0
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
Zhang, Jerry (Junwei)
Reviewed-by Junwei ZhangQuoted 11 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
We were testing the register offset, instead of the value stored in the register, therefore always timing out the loop.
This reduces suspend time of the system in the bug report below by ~600 ms.
Bugzilla: https://bugs.freedesktop.org/107277
Tested-by Paul Menzel <[email protected]>Signed-off-by Michel Dänzer <[email protected]>
Good catch.
Quoted 10 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_enter_rlc_safe_mode(struct amdgpu_device *adev) · line 3496
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-1@@ -3490,7 +3490,7 @@ static void gfx_v9_0_enter_rlc_safe_mode(struct amdgpu_device *adev)/* wait for RLC_SAFE_MODE */ for (i =0 ; i < adev->usec_timeout; i++) { -if (!REG_GET_FIELD (SOC15_REG_OFFSET (GC ,0 , mmRLC_SAFE_MODE),RLC_SAFE_MODE ,CMD )) +if (!REG_GET_FIELD (RREG32_SOC15 (GC ,0 , mmRLC_SAFE_MODE),RLC_SAFE_MODE ,CMD ))break ;udelay (1 ); }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Dear Michel,
Quoted 11 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
We were testing the register offset, instead of the value stored in the register, therefore always timing out the loop.
This reduces suspend time of the system in the bug report below by ~600 ms.
Bugzilla: https://bugs.freedesktop.org/107277
Signed-off-by Michel Dänzer <[email protected]>
[…]
As this line is present since v4.12-rc1, could you please tag this to be picked up for the stable series (4.14.x)?
Kind regards,
Paul
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 9 lines · Paul Menzel
Quoted 8 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
We were testing the register offset, instead of the value stored in the register, therefore always timing out the loop.
This reduces suspend time of the system in the bug report below by ~600 ms.
Quoted 8 lines
Quoted 3 lines
Bugzilla: https://bugs.freedesktop.org/107277
Tested-by Paul Menzel <[email protected]>Signed-off-by Michel Dänzer <[email protected]>[…]
As this line is present since v4.12-rc1, could you please tag this to be picked up for the stable series (4.14.x)?
I added the Cc: stable tag before pushing to the internal amd-staging-drm-next branch.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx