Skip to contentSkip to conversation

drm/amd/pm: skip gfx cgpg in the s0ix suspend-resume

PATCH Superseded Prike Liang 3 participants 4 messages Dec 9, 2021 – Dec 13, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/pm: skip gfx cgpg in the s0ix suspend-resume

In the s0ix entry need retain gfx in the gfxoff state,we don't disable gfx cgpg in the suspend so there is also needn't enable gfx cgpg in the s0ix resume.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
index 5839918..185269f 100644
@@ -1607,7 +1607,8 @@ static int smu_resume(void *handle)
 		return ret;
 	}
 
-	if (smu->is_apu)
+	/* skip gfx cgpg in the s0ix suspend-resume case*/
+	if (smu->is_apu && !adev->in_s0ix)
 		smu_set_gfx_cgpg(&adev->smu, true);
 
 	smu->disable_uclk_switch = 0;
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: Liang, Prike <[email protected]>
Sent: Wednesday, December 8, 2021 8:51 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Huang, Ray <[email protected]>; Limonciello, Mario <[email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH] drm/amd/pm: skip gfx cgpg in the s0ix suspend-resume

In the s0ix entry need retain gfx in the gfxoff state,we don't disable gfx cgpg in the suspend so there is also needn't enable gfx cgpg in the s0ix resume.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
index 5839918..185269f 100644
@@ -1607,7 +1607,8 @@ static int smu_resume(void *handle)
                 return ret;
         }
 
-       if (smu->is_apu)
+       /* skip gfx cgpg in the s0ix suspend-resume case*/
+       if (smu->is_apu && !adev->in_s0ix)
                 smu_set_gfx_cgpg(&adev->smu, true);
 
         smu->disable_uclk_switch = 0;

--
2.7.4

#2 lore raw
In reply to Prike Liang

[AMD Official Use Only]

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Prike Liang
Sent: Thursday, December 9, 2021 9:51 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Liang, Prike <[email protected]>; Huang, Ray <[email protected]>; Limonciello, Mario <[email protected]>
Subject: [PATCH] drm/amd/pm: skip gfx cgpg in the s0ix suspend-resume

In the s0ix entry need retain gfx in the gfxoff state,we don't disable gfx cgpg in the suspend so there is also needn't enable gfx cgpg in the s0ix resume.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -0
index 5839918..185269f 100644

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_resume(void *handle) · line 1612

Quoted 7 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
@@ -1607,7 +1607,8 @@ static int smu_resume(void *handle)
 		return ret;
 	}
 
-	if (smu->is_apu)
+	/* skip gfx cgpg in the s0ix suspend-resume case*/
+	if (smu->is_apu && !adev->in_s0ix)
 		smu_set_gfx_cgpg(&adev->smu, true);

[Quan, Evan] I was wondering can we move the "!adev->in_s0ix" into the ->set_gfx_cgpg(for now, only smu_v12_0_set_gfx_cgpg() supported by Renoir) implementation? Also, considering this is only supported by Renoir, we may be able to drop the "smu->is_apu" check.

BR
Evan

Quoted 4 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
 	smu->disable_uclk_switch = 0;
--

2.7.4

#3 lore raw

[Public]

Quoted 46 lines

-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Friday, December 10, 2021 10:15 AM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Liang, Prike <[email protected]>; Huang, Ray <[email protected]>; Limonciello, Mario <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: skip gfx cgpg in the s0ix suspend-resume

[AMD Official Use Only]

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Prike Liang
Sent: Thursday, December 9, 2021 9:51 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Liang, Prike <[email protected]>; Huang, Ray <[email protected]>; Limonciello, Mario <[email protected]>
Subject: [PATCH] drm/amd/pm: skip gfx cgpg in the s0ix suspend-resume

In the s0ix entry need retain gfx in the gfxoff state,we don't disable gfx cgpg in the suspend so there is also needn't enable gfx cgpg in the s0ix resume.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -0
index 5839918..185269f 100644

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_resume(void *handle) · line 1612

Quoted 7 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
@@ -1607,7 +1607,8 @@ static int smu_resume(void *handle)
            return ret;
    }
 
-   if (smu->is_apu)
+   /* skip gfx cgpg in the s0ix suspend-resume case*/
+   if (smu->is_apu && !adev->in_s0ix)
            smu_set_gfx_cgpg(&adev->smu, true);

[Quan, Evan] I was wondering can we move the "!adev->in_s0ix" into the -

Quoted 4 lines

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_resume(void *handle) · line 1613

Quoted 1 line
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -0
 set_gfx_cgpg(for now, only smu_v12_0_set_gfx_cgpg() supported by Renoir)

implementation?
Also, considering this is only supported by Renoir, we may be able to drop the "smu->is_apu" check.

Yes, the set_gfx_cgpg only implemented in the SMU12 series and we can move the S0ix protected in the smu_v12_0_set_gfx_cgpg() and drop the S0ix flag check in the SMU suspend/resume process.

Thanks,
Prike

Quoted 7 lines

BR
Evan

Quoted 4 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
    smu->disable_uclk_switch = 0;
--

2.7.4