From: Evan Quan <evan.quan-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: yanik-4pJZyYNR0dgOIzVOb1FTxg@public.gmane.org,
Alexander.Deucher-5C7GfCeVMHo@public.gmane.org,
Evan Quan <evan.quan-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 3/4] drm/amd/powerplay: avoid repeat AVFS enablement/disablement
Date: Tue, 7 May 2019 14:08:58 +0800 [thread overview]
Message-ID: <20190507060859.27650-3-evan.quan@amd.com> (raw)
In-Reply-To: <20190507060859.27650-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
No need to enable or disable AVFS if it's already in wanted
state.
Change-Id: I862c0c3d642e6a0dc7bb34e04c5a59f17b6b8deb
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index 103f7e3f0783..f4b81f50b185 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -2364,6 +2364,10 @@ static int vega10_avfs_enable(struct pp_hwmgr *hwmgr, bool enable)
struct vega10_hwmgr *data = hwmgr->backend;
if (data->smu_features[GNLD_AVFS].supported) {
+ /* Already enabled or disabled */
+ if (!(enable ^ data->smu_features[GNLD_AVFS].enabled))
+ return 0;
+
if (enable) {
PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr,
true,
--
2.21.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-05-07 6:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 6:08 [PATCH 1/4] drm/amd/powerplay: fix Vega10 mclk/socclk voltage link setup Evan Quan
[not found] ` <20190507060859.27650-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-05-07 6:08 ` [PATCH 2/4] drm/amd/powerplay: valid Vega10 DPMTABLE_OD_UPDATE_VDDC settings Evan Quan
[not found] ` <20190507060859.27650-2-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-05-08 6:46 ` Quan, Evan
2019-05-07 6:08 ` Evan Quan [this message]
2019-05-07 6:08 ` [PATCH 4/4] drm/amd/powerplay: update Vega10 power state on OD Evan Quan
[not found] ` <20190507060859.27650-4-evan.quan-5C7GfCeVMHo@public.gmane.org>
2019-05-07 15:15 ` Alex Deucher
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=20190507060859.27650-3-evan.quan@amd.com \
--to=evan.quan-5c7gfcevmho@public.gmane.org \
--cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=yanik-4pJZyYNR0dgOIzVOb1FTxg@public.gmane.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