From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 7/8] drm/amdgpu/gfx8: clean up polaris11 PG enable
Date: Fri, 20 May 2016 08:24:27 -0400 [thread overview]
Message-ID: <1463747068-12039-8-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1463747068-12039-1-git-send-email-alexander.deucher@amd.com>
Fix the logic for enabling/disabling.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 0508cef..494104e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -5365,12 +5365,20 @@ static int gfx_v8_0_set_powergating_state(void *handle,
gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false);
break;
case CHIP_POLARIS11:
- if (adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG)
- gfx_v8_0_enable_gfx_static_mg_power_gating(adev, enable);
- else if (adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG)
- gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, enable);
+ if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable)
+ gfx_v8_0_enable_gfx_static_mg_power_gating(adev, true);
+ else
+ gfx_v8_0_enable_gfx_static_mg_power_gating(adev, false);
+
+ if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG) && enable)
+ gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, true);
+ else
+ gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev, false);
+
+ if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_QUICK_MG) && enable)
+ polaris11_enable_gfx_quick_mg_power_gating(adev, true);
else
- polaris11_enable_gfx_quick_mg_power_gating(adev, enable);
+ polaris11_enable_gfx_quick_mg_power_gating(adev, false);
break;
default:
break;
--
2.5.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-05-20 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 12:24 [PATCH 0/8] Add GFX powergating support for CZ Alex Deucher
2016-05-20 12:24 ` [PATCH 1/8] drm/amdgpu/gfx7: expand cp jt size to handle GDS as well Alex Deucher
2016-05-20 12:24 ` [PATCH 2/8] drm/radeon/gfx7: " Alex Deucher
2016-05-20 12:24 ` [PATCH 3/8] drm/amdgpu/gfx8: add state setup for CZ/ST GFX power gating Alex Deucher
2016-05-20 12:24 ` [PATCH 4/8] drm/amdgpu/gfx8: rename some pg functions Alex Deucher
2016-05-20 12:24 ` [PATCH 5/8] drm/amdgpu: add new GFX powergating types Alex Deucher
2016-05-20 12:24 ` [PATCH 6/8] drm/amdgpu/gfx8: add powergating support for CZ/ST Alex Deucher
2016-05-20 12:24 ` Alex Deucher [this message]
2016-05-20 12:24 ` [PATCH 8/8] drm/amdgpu/gfx8: Enable GFX PG on CZ 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=1463747068-12039-8-git-send-email-alexander.deucher@amd.com \
--to=alexdeucher@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@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;
as well as URLs for NNTP newsgroup(s).