From: Mario Limonciello <mario.limonciello@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Cc: lkml@antheas.dev, bob.beckett@collabora.com
Subject: Re: [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required
Date: Fri, 24 Oct 2025 12:11:52 -0500 [thread overview]
Message-ID: <c10ff333-d120-4ecf-94bf-7099feb48fed@amd.com> (raw)
In-Reply-To: <20251024170811.57760-1-alexander.deucher@amd.com>
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)
next prev parent reply other threads:[~2025-10-24 17:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Mario Limonciello [this message]
2025-10-26 4:24 ` [PATCH 1/2] drm/amdgpu: move PMFW rlc notifier to where it's required Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c10ff333-d120-4ecf-94bf-7099feb48fed@amd.com \
--to=mario.limonciello@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bob.beckett@collabora.com \
--cc=lkml@antheas.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox