drm/amdgpu: keep mmhub clock gating being enabled during s2idle suspend
Subsystems (2)
PATCH 1/1 drm/amdgpu: keep mmhub clock gating being enabled during s2idle suspend
Without MMHUB clock gating being enabled then MMHUB will not disconnect from DF and will result in DF C-state entry can't be accessed during S2idle suspend, and eventually s0ix entry will be blocked.
--- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +9 -0
@@ -568,6 +568,15 @@ static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev, {if (amdgpu_sriov_vf (adev))return 0 ; +/* +* The issue mmhub can't disconnect from DF with clock gating being disabled +* seems only observed at DF 3.0.3, with the same suspend sequence not seen +* any issue on the DF 3.0.2 series platform. +*/ +if (adev->in_s0ix) { +dev_dbg (adev->dev,"keep mmhub clock gating being enabled for s0ix\n" ); +return 0 ; + }mmhub_v2_3_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE );
Signature · 1 line
2.25.1
Quoted 17 lines · Prike Liang
Without MMHUB clock gating being enabled then MMHUB will not disconnect from DF and will result in DF C-state entry can't be accessed during S2idle suspend, and eventually s0ix entry will be blocked.
Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +0
-0@@ -568,6 +568,15 @@ static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev, {if (amdgpu_sriov_vf (adev))return 0 ;
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev, · line 580
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +9
-0+/* +* The issue mmhub can't disconnect from DF with clock gating being disabled +* seems only observed at DF 3.0.3, with the same suspend sequence not seen +* any issue on the DF 3.0.2 series platform. +*/ +if (adev->in_s0ix) { +dev_dbg (adev->dev,"keep mmhub clock gating being enabled for s0ix\n" ); +return 0 ; + }
A better fix would be to explicitly enable mmhub clockgating during s0ix suspend of gmc for this IP version.
Thanks,
Lijo
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +0
-0mmhub_v2_3_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE );
[Public]
Quoted 45 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, April 20, 2022 11:39 AM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Huang, Ray <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: keep mmhub clock gating being enabled during s2idle suspenddrivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c static int mmhub_v2_3_set_clockgating(struct
Quoted 15 lines · Prike Liang
Without MMHUB clock gating being enabled then MMHUB will not disconnect from DF and will result in DF C-state entry can't be accessed during S2idle suspend, and eventually s0ix entry will be blocked.
Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +0
-0@@ -568,6 +568,15 @@ static int mmhub_v2_3_set_clockgating(struct
amdgpu_device*adev,drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev,
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +2
-0{if (amdgpu_sriov_vf (adev))return 0 ; +/* +* The issue mmhub can't disconnect from DF with clock gating being disabled
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c static int mmhub_v2_3_set_clockgating(struct · line 573
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +1
-0+* seems only observed at DF 3.0.3, with the same suspend sequence not seen
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +4
-0+* any issue on the DF 3.0.2 series platform. +*/ +if (adev->in_s0ix) { + dev_dbg(adev->dev, "keep mmhub clock gating beingenabled for s0ix\n");
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev, · line 580
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +2
-0+return 0 ; + }
Quoted 6 lines
A better fix would be to explicitly enable mmhub clockgating during s0ix suspend of gmc for this IP version.
Thanks,
Lijo
Yeah, it looks like more safe way to sort out the mmhub clock gating set for not influence old product. However, still not sure whether really need sort out the case which can disabled mmhub clock gating for s0ix, and it sounds like the clock gating enabled is a common requirement for each DF client can disconnect from DF.
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +0
-0mmhub_v2_3_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE );