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 <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
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)