From: Huang Rui <ray.huang@amd.com>
To: "Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amd/pm: Disable GFXOFF when GFX DPM or PG disabled
Date: Tue, 2 Feb 2021 20:15:14 +0800 [thread overview]
Message-ID: <20210202121514.GA3225682@hr-amd> (raw)
In-Reply-To: <20210202120443.2685-1-Jinzhou.Su@amd.com>
On Tue, Feb 02, 2021 at 08:04:43PM +0800, Su, Jinzhou (Joe) wrote:
> Check GFX DPM and PG bit before enable GFXOFF on Vangogh
> smu post init.
>
> Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> 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 4726cac8d824..f0f06ef47b9e 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -1712,10 +1712,16 @@ static int vangogh_post_smu_init(struct smu_context *smu)
> adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;
>
> /* allow message will be sent after enable message on Vangogh*/
> - ret = smu_cmn_send_smc_msg(smu, SMU_MSG_EnableGfxOff, NULL);
> - if (ret) {
> - dev_err(adev->dev, "Failed to Enable GfxOff!\n");
> - return ret;
> + if (smu_cmn_feature_is_supported(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
> + (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
> + ret = smu_cmn_send_smc_msg(smu, SMU_MSG_EnableGfxOff, NULL);
> + if (ret) {
> + dev_err(adev->dev, "Failed to Enable GfxOff!\n");
> + return ret;
> + }
> + } else {
> + adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
> + dev_info(adev->dev, "If GFX DPM or power gate disabled, disable GFXOFF\n");
> }
>
> /* if all CUs are active, no need to power off any WGPs */
> --
> 2.17.1
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2021-02-02 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 12:04 [PATCH] drm/amd/pm: Disable GFXOFF when GFX DPM or PG disabled Jinzhou Su
2021-02-02 12:15 ` Huang Rui [this message]
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=20210202121514.GA3225682@hr-amd \
--to=ray.huang@amd.com \
--cc=Jinzhou.Su@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