All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Cc: mjg59@srcf.ucam.org
Subject: [PATCH 1/9] drm/radeon/kms: enable misc pm power state features on r5xx, rs6xx
Date: Fri,  7 May 2010 17:16:12 -0400	[thread overview]
Message-ID: <1273266980-20982-2-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <1273266980-20982-1-git-send-email-alexdeucher@gmail.com>

voltage drop, dynamic voltage, dynamic sclk, pcie lane adjust, etc,

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
---
 drivers/gpu/drm/radeon/rs600.c  |   14 ++++++++++----
 drivers/gpu/drm/radeon/rs600d.h |    2 ++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index c3890b7..8e0c460 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -48,12 +48,11 @@ int rs600_mc_wait_for_idle(struct radeon_device *rdev);
 
 void rs600_pm_misc(struct radeon_device *rdev)
 {
-#if 0
 	int requested_index = rdev->pm.requested_power_state_index;
 	struct radeon_power_state *ps = &rdev->pm.power_state[requested_index];
 	struct radeon_voltage *voltage = &ps->clock_info[0].voltage;
 	u32 tmp, dyn_pwrmgt_sclk_length, dyn_sclk_vol_cntl;
-	u32 hdp_dyn_cntl, mc_host_dyn_cntl;
+	u32 hdp_dyn_cntl, /*mc_host_dyn_cntl,*/ dyn_backbias_cntl;
 
 	if ((voltage->type == VOLTAGE_GPIO) && (voltage->gpio.valid)) {
 		if (ps->misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) {
@@ -112,13 +111,21 @@ void rs600_pm_misc(struct radeon_device *rdev)
 	else
 		hdp_dyn_cntl |= HDP_FORCEON;
 	WREG32_PLL(HDP_DYN_CNTL, hdp_dyn_cntl);
-
+#if 0
+	/* mc_host_dyn seems to cause hangs from time to time */
 	mc_host_dyn_cntl = RREG32_PLL(MC_HOST_DYN_CNTL);
 	if (ps->misc & ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN)
 		mc_host_dyn_cntl &= ~MC_HOST_FORCEON;
 	else
 		mc_host_dyn_cntl |= MC_HOST_FORCEON;
 	WREG32_PLL(MC_HOST_DYN_CNTL, mc_host_dyn_cntl);
+#endif
+	dyn_backbias_cntl = RREG32_PLL(DYN_BACKBIAS_CNTL);
+	if (ps->misc & ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN)
+		dyn_backbias_cntl |= IO_CG_BACKBIAS_EN;
+	else
+		dyn_backbias_cntl &= ~IO_CG_BACKBIAS_EN;
+	WREG32_PLL(DYN_BACKBIAS_CNTL, dyn_backbias_cntl);
 
 	/* set pcie lanes */
 	if ((rdev->flags & RADEON_IS_PCIE) &&
@@ -130,7 +137,6 @@ void rs600_pm_misc(struct radeon_device *rdev)
 				      ps->pcie_lanes);
 		DRM_INFO("Setting: p: %d\n", ps->pcie_lanes);
 	}
-#endif
 }
 
 void rs600_pm_prepare(struct radeon_device *rdev)
diff --git a/drivers/gpu/drm/radeon/rs600d.h b/drivers/gpu/drm/radeon/rs600d.h
index 8f62434..a27c13a 100644
--- a/drivers/gpu/drm/radeon/rs600d.h
+++ b/drivers/gpu/drm/radeon/rs600d.h
@@ -655,6 +655,8 @@
 #define   HDP_FORCEON                                  (1 << 0)
 #define MC_HOST_DYN_CNTL                               0x1e
 #define   MC_HOST_FORCEON                              (1 << 0)
+#define DYN_BACKBIAS_CNTL                              0x29
+#define   IO_CG_BACKBIAS_EN                            (1 << 0)
 
 /* mmreg */
 #define DOUT_POWER_MANAGEMENT_CNTL                     0x7ee0
-- 
1.5.6.3

  reply	other threads:[~2010-05-07 21:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 21:16 [PATCH 0/9] drm/radeon/kms: update pm code Alex Deucher
2010-05-07 21:16 ` Alex Deucher [this message]
2010-05-07 21:16   ` [PATCH 2/9] drm/radeon/kms: enable misc pm power state features on r1xx-r4xx Alex Deucher
2010-05-07 21:16     ` [PATCH 3/9] drm/radeon/kms: re-enable gui idle interrupts on r6xx+ Alex Deucher
2010-05-07 21:16       ` [PATCH 4/9] radeon: Split out ring locking and allocation Alex Deucher
2010-05-07 21:16         ` [PATCH 5/9] radeon: Use fences to gate entry to reclocking on <r600 Alex Deucher
2010-05-07 21:16           ` [PATCH 6/9] drm/radeon/kms: fix lock ordering in ring, ib handling Alex Deucher
2010-05-07 21:16             ` [PATCH 7/9] drm/radeon/kms/pm: add support for no display power states Alex Deucher
2010-05-07 21:16               ` [PATCH 8/9] drm/radeon/kms/pm: rework power management Alex Deucher
2010-05-07 21:16                 ` [PATCH 9/9] drm/radeon/kms/pm: make pm spam debug only Alex Deucher
2010-05-07 21:23 ` [PATCH 0/9] drm/radeon/kms: update pm code Matthew Garrett
2010-05-07 22:24   ` Alex Deucher
2010-05-08 11:14 ` Klaus Doblmann B.A.
2010-05-08 15:29   ` Alex Deucher
2010-05-08 18:46     ` Klaus Doblmann B.A.
2010-05-10 16:04 ` Andy Furniss
2010-05-10 16:47   ` Alex Deucher
2010-05-10 17:25     ` Andy Furniss
2010-05-10 17:28       ` Rafał Miłecki

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=1273266980-20982-2-git-send-email-alexdeucher@gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mjg59@srcf.ucam.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.