aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-03-18 16:21:14 -0400
committerEric Anholt <eric@anholt.net>2010-03-18 19:48:01 -0400
commit8956c8bba5b11b3d3aec000e6c6184943011a8d4 (patch)
treee3e712d6c58108b8937827f5c3cdecc3ae8f5afc /drivers/gpu
parent66f6ff09ff67c45919b336395c4d7d0ed3a97edc (diff)
drm/i915: Set up the documented clock gating on Sandybridge and Ironlake.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h8
-rw-r--r--drivers/gpu/drm/i915/intel_display.c14
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 2720bc2cd678..cbbf59f56dfa 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2176,6 +2176,14 @@
2176#define DISPLAY_PORT_PLL_BIOS_1 0x46010 2176#define DISPLAY_PORT_PLL_BIOS_1 0x46010
2177#define DISPLAY_PORT_PLL_BIOS_2 0x46014 2177#define DISPLAY_PORT_PLL_BIOS_2 0x46014
2178 2178
2179#define PCH_DSPCLK_GATE_D 0x42020
2180# define DPFDUNIT_CLOCK_GATE_DISABLE (1 << 7)
2181# define DPARBUNIT_CLOCK_GATE_DISABLE (1 << 5)
2182
2183#define PCH_3DCGDIS0 0x46020
2184# define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18)
2185# define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1)
2186
2179#define FDI_PLL_FREQ_CTL 0x46030 2187#define FDI_PLL_FREQ_CTL 0x46030
2180#define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) 2188#define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24)
2181#define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 2189#define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0e2c5dafd9d3..58fc7fa0eb1d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4717,6 +4717,20 @@ void intel_init_clock_gating(struct drm_device *dev)
4717 * specs, but enable as much else as we can. 4717 * specs, but enable as much else as we can.
4718 */ 4718 */
4719 if (HAS_PCH_SPLIT(dev)) { 4719 if (HAS_PCH_SPLIT(dev)) {
4720 uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
4721
4722 if (IS_IRONLAKE(dev)) {
4723 /* Required for FBC */
4724 dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE;
4725 /* Required for CxSR */
4726 dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE;
4727
4728 I915_WRITE(PCH_3DCGDIS0,
4729 MARIUNIT_CLOCK_GATE_DISABLE |
4730 SVSMUNIT_CLOCK_GATE_DISABLE);
4731 }
4732
4733 I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
4720 return; 4734 return;
4721 } else if (IS_G4X(dev)) { 4735 } else if (IS_G4X(dev)) {
4722 uint32_t dspclk_gate; 4736 uint32_t dspclk_gate;