From: Huang Rui <ray.huang@amd.com>
To: "Hou, Xiaomeng (Matthew)" <Xiaomeng.Hou@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Quan, Evan" <Evan.Quan@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/amdgpu/pm: inform PMFW rlc status before start/stop rlc for vangogh
Date: Tue, 8 Dec 2020 21:08:47 +0800 [thread overview]
Message-ID: <20201208130847.GD661395@hr-amd> (raw)
In-Reply-To: <20201208111942.6292-3-Xiaomeng.Hou@amd.com>
On Tue, Dec 08, 2020 at 07:19:42PM +0800, Hou, Xiaomeng (Matthew) wrote:
> RLC is halted when system suspend/shutdown. However, due to DPM enabled, PMFM is
> unaware of RLC being halted and will continue sending messages, which would
> eventually caused ACPI related hang. So send message to inform PMFM the rlc
> status before start/stop rlc.
>
> Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com>
> Change-Id: I7b1a04f6e249ac6753109079ecb3019c99161d9f
> ---
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index cf999b7a2164..42a32c0e5bab 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -920,6 +920,14 @@ static int smu_smc_hw_setup(struct smu_context *smu)
> uint32_t pcie_gen = 0, pcie_width = 0;
> int ret = 0;
>
> + if (adev->in_suspend && smu->is_apu) {
> + ret = smu_notify_rlc_status(smu, 1);
You can create two new callbacks in ppt_funcs->inform_rlc(smu, on), and set
on as bool type.
Then you can use below macros to implement this callback with RLC notify
SMC message.
/* RLC Power Status */
#define RLC_STATUS_OFF 0
#define RLC_STATUS_NORMAL 1
Others look good for me.
Thanks,
Ray
> + if (ret) {
> + dev_info(adev->dev, "Failed to notify rlc status!\n");
> + return ret;
> + }
> + }
> +
> if (adev->in_suspend && smu_is_dpm_running(smu)) {
> dev_info(adev->dev, "dpm has been enabled\n");
> /* this is needed specifically */
> @@ -1213,6 +1221,14 @@ static int smu_disable_dpms(struct smu_context *smu)
> dev_err(adev->dev, "Failed to disable smu features.\n");
> }
>
> + if (smu->is_apu) {
> + ret = smu_notify_rlc_status(smu, 0);
> + if (ret) {
> + dev_info(adev->dev, "Failed to notify rlc status!\n");
> + return ret;
> + }
> + }
> +
> if (adev->asic_type >= CHIP_NAVI10 &&
> adev->gfx.rlc.funcs->stop)
> adev->gfx.rlc.funcs->stop(adev);
> --
> 2.17.1
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-12-08 13:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 11:19 [PATCH 1/3] drm/amd/pm: update the smu v11.5 smc header for vangogh Xiaomeng Hou
2020-12-08 11:19 ` [PATCH 2/3] drm/amd/pm: add interface to notify RLC status " Xiaomeng Hou
2020-12-08 11:43 ` Wang, Kevin(Yang)
2020-12-08 11:19 ` [PATCH 3/3] drm/amdgpu/pm: inform PMFW rlc status before start/stop rlc " Xiaomeng Hou
2020-12-08 11:47 ` Wang, Kevin(Yang)
2020-12-08 13:08 ` Huang Rui [this message]
2020-12-08 13:39 ` Lazar, Lijo
2020-12-08 14:10 ` Huang Rui
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=20201208130847.GD661395@hr-amd \
--to=ray.huang@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Evan.Quan@amd.com \
--cc=Xiaomeng.Hou@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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