* [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required
@ 2025-10-24 17:08 Alex Deucher
2025-10-24 17:08 ` [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh Alex Deucher
2025-10-24 17:11 ` [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Mario Limonciello
0 siblings, 2 replies; 10+ messages in thread
From: Alex Deucher @ 2025-10-24 17:08 UTC (permalink / raw)
To: amd-gfx; +Cc: lkml, bob.beckett, mario.limonciello, Alex Deucher
For S3 on vangogh, PMFW needs to be notified before the
driver powers down RLC. Move this notification to
the rlc stop function so it will always get called bfore
stopping the RLC. The call in amdgpu_device_suspend()
seems to be superfluous so remove that as well.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +++++++++++-
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ----------
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 5053c5f475ba9..78c0fc3a50ae8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5283,10 +5283,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
if (amdgpu_sriov_vf(adev))
amdgpu_virt_release_full_gpu(adev, false);
- r = amdgpu_dpm_notify_rlc_state(adev, false);
- if (r)
- return r;
-
return 0;
}
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 39b8adf23a9fa..d64579f5fb1f8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -5470,8 +5470,18 @@ static int gfx_v10_0_init_csb(struct amdgpu_device *adev)
static void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
{
- u32 tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
+ u32 tmp;
+ int r;
+
+ /* Notify SMU RLC is going to be off, stop RLC and SMU interaction.
+ * otherwise SMU will hang while interacting with RLC if RLC is halted
+ * this is a WA for Vangogh asic which fix the SMU hang issue.
+ */
+ r = amdgpu_dpm_notify_rlc_state(adev, false);
+ if (r)
+ dev_info(adev->dev, "failed to notify PMFW of RLC powerdown\n");
+ tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
tmp = REG_SET_FIELD(tmp, RLC_CNTL, RLC_ENABLE_F32, 0);
WREG32_SOC15(GC, 0, mmRLC_CNTL, tmp);
}
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 4317da6f7c389..10d42267085b0 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2072,16 +2072,6 @@ static int smu_disable_dpms(struct smu_context *smu)
}
}
- /* Notify SMU RLC is going to be off, stop RLC and SMU interaction.
- * otherwise SMU will hang while interacting with RLC if RLC is halted
- * this is a WA for Vangogh asic which fix the SMU hang issue.
- */
- ret = smu_notify_rlc_state(smu, false);
- if (ret) {
- dev_err(adev->dev, "Fail to notify rlc status!\n");
- return ret;
- }
-
if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(9, 4, 2) &&
!((adev->flags & AMD_IS_APU) && adev->gfx.imu.funcs) &&
!amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-24 17:08 [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Alex Deucher
@ 2025-10-24 17:08 ` Alex Deucher
2025-10-24 17:12 ` Mario Limonciello
` (2 more replies)
2025-10-24 17:11 ` [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Mario Limonciello
1 sibling, 3 replies; 10+ messages in thread
From: Alex Deucher @ 2025-10-24 17:08 UTC (permalink / raw)
To: amd-gfx; +Cc: lkml, bob.beckett, mario.limonciello, Alex Deucher
Fix the flows for S0ix. There is no need to stop
rlc or reintialize PMFW in S0ix.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 10d42267085b0..5bee02f0ba867 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
return 0;
+ /* vangogh s0ix */
+ if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
+ amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
+ adev->in_s0ix)
+ return 0;
+
/*
* For gpu reset, runpm and hibernation through BACO,
* BACO feature has to be kept enabled.
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 53579208cffb4..9626da2dba584 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
+ if (adev->in_s0ix)
+ return 0;
+
/* allow message will be sent after enable message on Vangogh*/
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
(adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-24 17:08 ` [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh Alex Deucher
@ 2025-10-24 17:12 ` Mario Limonciello
2025-10-24 17:14 ` Antheas Kapenekakis
2025-10-31 11:58 ` Antheas Kapenekakis
2 siblings, 0 replies; 10+ messages in thread
From: Mario Limonciello @ 2025-10-24 17:12 UTC (permalink / raw)
To: Alex Deucher, amd-gfx; +Cc: lkml, bob.beckett
On 10/24/2025 12:08 PM, Alex Deucher wrote:
> Fix the flows for S0ix. There is no need to stop
> rlc or reintialize PMFW in S0ix.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>> ---
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index 10d42267085b0..5bee02f0ba867 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
> smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
> return 0;
>
> + /* vangogh s0ix */
> + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
> + amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
> + adev->in_s0ix)
> + return 0;
> +
> /*
> * For gpu reset, runpm and hibernation through BACO,
> * BACO feature has to be kept enabled.
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 53579208cffb4..9626da2dba584 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
> uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
>
> + if (adev->in_s0ix)
> + return 0;
> +
> /* allow message will be sent after enable message on Vangogh*/
> if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
> (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-24 17:08 ` [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh Alex Deucher
2025-10-24 17:12 ` Mario Limonciello
@ 2025-10-24 17:14 ` Antheas Kapenekakis
2025-10-30 15:37 ` Mario Limonciello
2025-10-31 11:58 ` Antheas Kapenekakis
2 siblings, 1 reply; 10+ messages in thread
From: Antheas Kapenekakis @ 2025-10-24 17:14 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx, bob.beckett, mario.limonciello
On Fri, 24 Oct 2025 at 19:08, Alex Deucher <alexander.deucher@amd.com> wrote:
>
> Fix the flows for S0ix. There is no need to stop
> rlc or reintialize PMFW in S0ix.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
> 2 files changed, 9 insertions(+)
Sleep failed on the Deck the same way as Mario's attempt
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index 10d42267085b0..5bee02f0ba867 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
> smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
> return 0;
>
> + /* vangogh s0ix */
> + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
> + amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
> + adev->in_s0ix)
> + return 0;
> +
> /*
> * For gpu reset, runpm and hibernation through BACO,
> * BACO feature has to be kept enabled.
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 53579208cffb4..9626da2dba584 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
> uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
>
> + if (adev->in_s0ix)
> + return 0;
> +
> /* allow message will be sent after enable message on Vangogh*/
> if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
> (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
> --
> 2.51.0
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-24 17:14 ` Antheas Kapenekakis
@ 2025-10-30 15:37 ` Mario Limonciello
2025-10-30 16:20 ` Antheas Kapenekakis
0 siblings, 1 reply; 10+ messages in thread
From: Mario Limonciello @ 2025-10-30 15:37 UTC (permalink / raw)
To: Antheas Kapenekakis, Alex Deucher; +Cc: amd-gfx, bob.beckett
On 10/24/2025 12:14 PM, Antheas Kapenekakis wrote:
> On Fri, 24 Oct 2025 at 19:08, Alex Deucher <alexander.deucher@amd.com> wrote:
>>
>> Fix the flows for S0ix. There is no need to stop
>> rlc or reintialize PMFW in S0ix.
>>
>> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
>> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
>> 2 files changed, 9 insertions(+)
>
> Sleep failed on the Deck the same way as Mario's attempt
Can you please test patch 2/2 from this series and patch 1/5 from this one:
https://lore.kernel.org/amd-gfx/20251026042942.549389-2-superm1@kernel.org/
I expect that everything GPU wise works with those 2 combined, can you
confirm?
>
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> index 10d42267085b0..5bee02f0ba867 100644
>> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> @@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
>> smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
>> return 0;
>>
>> + /* vangogh s0ix */
>> + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
>> + amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
>> + adev->in_s0ix)
>> + return 0;
>> +
>> /*
>> * For gpu reset, runpm and hibernation through BACO,
>> * BACO feature has to be kept enabled.
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
>> index 53579208cffb4..9626da2dba584 100644
>> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
>> @@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
>> uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
>> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
>>
>> + if (adev->in_s0ix)
>> + return 0;
>> +
>> /* allow message will be sent after enable message on Vangogh*/
>> if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
>> (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
>> --
>> 2.51.0
>>
>>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-30 15:37 ` Mario Limonciello
@ 2025-10-30 16:20 ` Antheas Kapenekakis
0 siblings, 0 replies; 10+ messages in thread
From: Antheas Kapenekakis @ 2025-10-30 16:20 UTC (permalink / raw)
To: Mario Limonciello; +Cc: Alex Deucher, amd-gfx, bob.beckett
On Thu, 30 Oct 2025 at 16:37, Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
>
>
> On 10/24/2025 12:14 PM, Antheas Kapenekakis wrote:
> > On Fri, 24 Oct 2025 at 19:08, Alex Deucher <alexander.deucher@amd.com> wrote:
> >>
> >> Fix the flows for S0ix. There is no need to stop
> >> rlc or reintialize PMFW in S0ix.
> >>
> >> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
> >> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> >> ---
> >> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
> >> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
> >> 2 files changed, 9 insertions(+)
> >
> > Sleep failed on the Deck the same way as Mario's attempt
>
> Can you please test patch 2/2 from this series and patch 1/5 from this one:
>
> https://lore.kernel.org/amd-gfx/20251026042942.549389-2-superm1@kernel.org/
>
> I expect that everything GPU wise works with those 2 combined, can you
> confirm?
I will update you tomorrow. Currently traveling.
Antheas
> >
> >> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >> index 10d42267085b0..5bee02f0ba867 100644
> >> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >> @@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
> >> smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
> >> return 0;
> >>
> >> + /* vangogh s0ix */
> >> + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
> >> + amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
> >> + adev->in_s0ix)
> >> + return 0;
> >> +
> >> /*
> >> * For gpu reset, runpm and hibernation through BACO,
> >> * BACO feature has to be kept enabled.
> >> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> >> index 53579208cffb4..9626da2dba584 100644
> >> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> >> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> >> @@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
> >> uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
> >> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
> >>
> >> + if (adev->in_s0ix)
> >> + return 0;
> >> +
> >> /* allow message will be sent after enable message on Vangogh*/
> >> if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
> >> (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
> >> --
> >> 2.51.0
> >>
> >>
> >
> >
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-24 17:08 ` [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh Alex Deucher
2025-10-24 17:12 ` Mario Limonciello
2025-10-24 17:14 ` Antheas Kapenekakis
@ 2025-10-31 11:58 ` Antheas Kapenekakis
2025-10-31 12:58 ` Mario Limonciello
2 siblings, 1 reply; 10+ messages in thread
From: Antheas Kapenekakis @ 2025-10-31 11:58 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx, bob.beckett, mario.limonciello
Just for this patch:
Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
Tested-by: Antheas Kapenekakis <lkml@antheas.dev>
Tested on a Steam Deck OLED and Xbox Ally.
On Fri, 24 Oct 2025 at 19:08, Alex Deucher <alexander.deucher@amd.com> wrote:
>
> Fix the flows for S0ix. There is no need to stop
> rlc or reintialize PMFW in S0ix.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index 10d42267085b0..5bee02f0ba867 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
> smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
> return 0;
>
> + /* vangogh s0ix */
> + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
> + amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
> + adev->in_s0ix)
> + return 0;
> +
> /*
> * For gpu reset, runpm and hibernation through BACO,
> * BACO feature has to be kept enabled.
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 53579208cffb4..9626da2dba584 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
> uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
>
> + if (adev->in_s0ix)
> + return 0;
> +
> /* allow message will be sent after enable message on Vangogh*/
> if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
> (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
> --
> 2.51.0
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh
2025-10-31 11:58 ` Antheas Kapenekakis
@ 2025-10-31 12:58 ` Mario Limonciello
0 siblings, 0 replies; 10+ messages in thread
From: Mario Limonciello @ 2025-10-31 12:58 UTC (permalink / raw)
To: Antheas Kapenekakis, Alex Deucher; +Cc: amd-gfx, bob.beckett
On 10/31/2025 6:58 AM, Antheas Kapenekakis wrote:
> Just for this patch:
>
> Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
> Tested-by: Antheas Kapenekakis <lkml@antheas.dev>
>
> Tested on a Steam Deck OLED and Xbox Ally.
Thanks. I'll get this applied to amd-staging-drm-next.
>
> On Fri, 24 Oct 2025 at 19:08, Alex Deucher <alexander.deucher@amd.com> wrote:
>>
>> Fix the flows for S0ix. There is no need to stop
>> rlc or reintialize PMFW in S0ix.
>>
>> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
>> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 +++
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> index 10d42267085b0..5bee02f0ba867 100644
>> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> @@ -2054,6 +2054,12 @@ static int smu_disable_dpms(struct smu_context *smu)
>> smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
>> return 0;
>>
>> + /* vangogh s0ix */
>> + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
>> + amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
>> + adev->in_s0ix)
>> + return 0;
>> +
>> /*
>> * For gpu reset, runpm and hibernation through BACO,
>> * BACO feature has to be kept enabled.
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
>> index 53579208cffb4..9626da2dba584 100644
>> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
>> @@ -2219,6 +2219,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
>> uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
>> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
>>
>> + if (adev->in_s0ix)
>> + return 0;
>> +
>> /* allow message will be sent after enable message on Vangogh*/
>> if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
>> (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
>> --
>> 2.51.0
>>
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required
2025-10-24 17:08 [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Alex Deucher
2025-10-24 17:08 ` [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh Alex Deucher
@ 2025-10-24 17:11 ` Mario Limonciello
2025-10-26 4:24 ` Mario Limonciello
1 sibling, 1 reply; 10+ messages in thread
From: Mario Limonciello @ 2025-10-24 17:11 UTC (permalink / raw)
To: Alex Deucher, amd-gfx; +Cc: lkml, bob.beckett
On 10/24/2025 12:08 PM, Alex Deucher wrote:
> For S3 on vangogh, PMFW needs to be notified before the
> driver powers down RLC. Move this notification to
> the rlc stop function so it will always get called bfore
> stopping the RLC. The call in amdgpu_device_suspend()
> seems to be superfluous so remove that as well.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
One nit below.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +++++++++++-
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ----------
> 3 files changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 5053c5f475ba9..78c0fc3a50ae8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -5283,10 +5283,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
> if (amdgpu_sriov_vf(adev))
> amdgpu_virt_release_full_gpu(adev, false);
>
> - r = amdgpu_dpm_notify_rlc_state(adev, false);
> - if (r)
> - return r;
> -
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 39b8adf23a9fa..d64579f5fb1f8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -5470,8 +5470,18 @@ static int gfx_v10_0_init_csb(struct amdgpu_device *adev)
>
> static void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
> {
> - u32 tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
> + u32 tmp;
> + int r;
> +
> + /* Notify SMU RLC is going to be off, stop RLC and SMU interaction.
> + * otherwise SMU will hang while interacting with RLC if RLC is halted
> + * this is a WA for Vangogh asic which fix the SMU hang issue.
> + */
> + r = amdgpu_dpm_notify_rlc_state(adev, false);
> + if (r)
> + dev_info(adev->dev, "failed to notify PMFW of RLC powerdown\n");
This should probably be dev_err().
>
> + tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
> tmp = REG_SET_FIELD(tmp, RLC_CNTL, RLC_ENABLE_F32, 0);
> WREG32_SOC15(GC, 0, mmRLC_CNTL, tmp);
> }
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index 4317da6f7c389..10d42267085b0 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -2072,16 +2072,6 @@ static int smu_disable_dpms(struct smu_context *smu)
> }
> }
>
> - /* Notify SMU RLC is going to be off, stop RLC and SMU interaction.
> - * otherwise SMU will hang while interacting with RLC if RLC is halted
> - * this is a WA for Vangogh asic which fix the SMU hang issue.
> - */
> - ret = smu_notify_rlc_state(smu, false);
> - if (ret) {
> - dev_err(adev->dev, "Fail to notify rlc status!\n");
> - return ret;
> - }
> -
> if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(9, 4, 2) &&
> !((adev->flags & AMD_IS_APU) && adev->gfx.imu.funcs) &&
> !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required
2025-10-24 17:11 ` [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Mario Limonciello
@ 2025-10-26 4:24 ` Mario Limonciello
0 siblings, 0 replies; 10+ messages in thread
From: Mario Limonciello @ 2025-10-26 4:24 UTC (permalink / raw)
To: Mario Limonciello, Alex Deucher, amd-gfx; +Cc: lkml, bob.beckett
On 10/24/25 12:11 PM, Mario Limonciello wrote:
>
>
> On 10/24/2025 12:08 PM, Alex Deucher wrote:
>> For S3 on vangogh, PMFW needs to be notified before the
>> driver powers down RLC. Move this notification to
>> the rlc stop function so it will always get called bfore
>> stopping the RLC. The call in amdgpu_device_suspend()
>> seems to be superfluous so remove that as well.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
>
> One nit below.
>
Antheas had feedback that this version didn't work on another thread.
Also I noticed that amdgpu_dpm_notify_rlc_state() no longer was needed
after this change.
As my unwind series is on top of this I'm going to send an updated
unwind series that just takes the relevant chunk that we know works for now.
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +++++++++++-
>> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ----------
>> 3 files changed, 11 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/
>> drm/amd/amdgpu/amdgpu_device.c
>> index 5053c5f475ba9..78c0fc3a50ae8 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -5283,10 +5283,6 @@ int amdgpu_device_suspend(struct drm_device
>> *dev, bool notify_clients)
>> if (amdgpu_sriov_vf(adev))
>> amdgpu_virt_release_full_gpu(adev, false);
>> - r = amdgpu_dpm_notify_rlc_state(adev, false);
>> - if (r)
>> - return r;
>> -
>> return 0;
>> }
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/
>> amd/amdgpu/gfx_v10_0.c
>> index 39b8adf23a9fa..d64579f5fb1f8 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> @@ -5470,8 +5470,18 @@ static int gfx_v10_0_init_csb(struct
>> amdgpu_device *adev)
>> static void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
>> {
>> - u32 tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
>> + u32 tmp;
>> + int r;
>> +
>> + /* Notify SMU RLC is going to be off, stop RLC and SMU interaction.
>> + * otherwise SMU will hang while interacting with RLC if RLC is
>> halted
>> + * this is a WA for Vangogh asic which fix the SMU hang issue.
>> + */
>> + r = amdgpu_dpm_notify_rlc_state(adev, false);
>> + if (r)
>> + dev_info(adev->dev, "failed to notify PMFW of RLC powerdown\n");
>
> This should probably be dev_err().
>
>> + tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
>> tmp = REG_SET_FIELD(tmp, RLC_CNTL, RLC_ENABLE_F32, 0);
>> WREG32_SOC15(GC, 0, mmRLC_CNTL, tmp);
>> }
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/
>> drm/amd/pm/swsmu/amdgpu_smu.c
>> index 4317da6f7c389..10d42267085b0 100644
>> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
>> @@ -2072,16 +2072,6 @@ static int smu_disable_dpms(struct smu_context
>> *smu)
>> }
>> }
>> - /* Notify SMU RLC is going to be off, stop RLC and SMU interaction.
>> - * otherwise SMU will hang while interacting with RLC if RLC is
>> halted
>> - * this is a WA for Vangogh asic which fix the SMU hang issue.
>> - */
>> - ret = smu_notify_rlc_state(smu, false);
>> - if (ret) {
>> - dev_err(adev->dev, "Fail to notify rlc status!\n");
>> - return ret;
>> - }
>> -
>> if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(9, 4, 2) &&
>> !((adev->flags & AMD_IS_APU) && adev->gfx.imu.funcs) &&
>> !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-10-31 14:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 17:08 [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Alex Deucher
2025-10-24 17:08 ` [PATCH 2/2] drm/amdgpu/smu: Handle S0ix for vangogh Alex Deucher
2025-10-24 17:12 ` Mario Limonciello
2025-10-24 17:14 ` Antheas Kapenekakis
2025-10-30 15:37 ` Mario Limonciello
2025-10-30 16:20 ` Antheas Kapenekakis
2025-10-31 11:58 ` Antheas Kapenekakis
2025-10-31 12:58 ` Mario Limonciello
2025-10-24 17:11 ` [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Mario Limonciello
2025-10-26 4:24 ` Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox