AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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

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