AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 3/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd()
Date: Mon, 16 Oct 2017 13:54:59 -0400	[thread overview]
Message-ID: <20171016175503.18367-4-tom.stdenis@amd.com> (raw)
In-Reply-To: <20171016175503.18367-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
index 6ba41d7401b6..e7ce123db942 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
@@ -1282,18 +1282,11 @@ int cz_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)
 
 int cz_dpm_powerup_uvd(struct pp_hwmgr *hwmgr)
 {
-	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-					 PHM_PlatformCaps_UVDPowerGating)) {
-		if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-				  PHM_PlatformCaps_UVDDynamicPowerGating)) {
-			return smum_send_msg_to_smc_with_parameter(
-								hwmgr,
-						   PPSMC_MSG_UVDPowerON, 1);
-		} else {
-			return smum_send_msg_to_smc_with_parameter(
-								hwmgr,
-						   PPSMC_MSG_UVDPowerON, 0);
-		}
+	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
+		return smum_send_msg_to_smc_with_parameter(
+			hwmgr,
+			PPSMC_MSG_UVDPowerON,
+			PP_CAP(PHM_PlatformCaps_UVDDynamicPowerGating) ? 1 : 0);
 	}
 
 	return 0;
-- 
2.12.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-10-16 17:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 17:54 Simple cleanups for cz_hwmgr.c Tom St Denis
     [not found] ` <20171016175503.18367-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-10-16 17:54   ` [PATCH 1/7] drm/amd/powerplay: Tidy up cz_start_dpm() Tom St Denis
2017-10-16 17:54   ` [PATCH 2/7] drm/amd/powerplay: Tidy up cz_dpm_powerdown_uvd() Tom St Denis
2017-10-16 17:54   ` Tom St Denis [this message]
2017-10-16 17:55   ` [PATCH 4/7] drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm() Tom St Denis
2017-10-16 17:55   ` [PATCH 5/7] drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm() Tom St Denis
2017-10-16 17:55   ` [PATCH 6/7] drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce() Tom St Denis
     [not found]     ` <20171016175503.18367-7-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-10-16 18:22       ` Deucher, Alexander
2017-10-16 17:55   ` [PATCH 7/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_vce() Tom St Denis
     [not found]     ` <20171016175503.18367-8-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-10-16 18:23       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1652818229E93890BA988F6BF74F0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-16 18:24           ` Tom St Denis
     [not found]             ` <e18b6bdf-a2da-73d9-2c72-acce94d7671f-5C7GfCeVMHo@public.gmane.org>
2017-10-16 18:30               ` Deucher, Alexander
2017-10-16 18:25   ` Simple cleanups for cz_hwmgr.c Deucher, Alexander

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=20171016175503.18367-4-tom.stdenis@amd.com \
    --to=tom.stdenis-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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