aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-09-27 01:24:57 -0400
committerKeith Packard <keithp@keithp.com>2011-09-28 17:08:38 -0400
commit9fb526db979581841227e1ed4f75a5fbe853db4a (patch)
treeb4171d88d0d535f178ca33787556246c502f7c90 /drivers/gpu/drm/i915/intel_display.c
parentafffb9dfb62a9eb2a6e467a3875907189e49a2d2 (diff)
drm/i915: Initialize PCH refclks at modeset init time
The reference clock configuration must be done before any mode setting can occur as all outputs must be disabled to change anything. Initialize the clocks after turning everything off during the initialization process. Also, re-initialize the refclk at resume time. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b072a35b6f52..91d7d5ed33ae 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5109,7 +5109,10 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
5109 return ret; 5109 return ret;
5110} 5110}
5111 5111
5112static void ironlake_update_pch_refclk(struct drm_device *dev) 5112/*
5113 * Initialize reference clocks when the driver loads
5114 */
5115void ironlake_init_pch_refclk(struct drm_device *dev)
5113{ 5116{
5114 struct drm_i915_private *dev_priv = dev->dev_private; 5117 struct drm_i915_private *dev_priv = dev->dev_private;
5115 struct drm_mode_config *mode_config = &dev->mode_config; 5118 struct drm_mode_config *mode_config = &dev->mode_config;
@@ -5411,8 +5414,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
5411 ironlake_compute_m_n(intel_crtc->bpp, lane, target_clock, link_bw, 5414 ironlake_compute_m_n(intel_crtc->bpp, lane, target_clock, link_bw,
5412 &m_n); 5415 &m_n);
5413 5416
5414 ironlake_update_pch_refclk(dev);
5415
5416 fp = clock.n << 16 | clock.m1 << 8 | clock.m2; 5417 fp = clock.n << 16 | clock.m1 << 8 | clock.m2;
5417 if (has_reduced_clock) 5418 if (has_reduced_clock)
5418 fp2 = reduced_clock.n << 16 | reduced_clock.m1 << 8 | 5419 fp2 = reduced_clock.n << 16 | reduced_clock.m1 << 8 |
@@ -7284,6 +7285,9 @@ static void intel_setup_outputs(struct drm_device *dev)
7284 7285
7285 /* disable all the possible outputs/crtcs before entering KMS mode */ 7286 /* disable all the possible outputs/crtcs before entering KMS mode */
7286 drm_helper_disable_unused_functions(dev); 7287 drm_helper_disable_unused_functions(dev);
7288
7289 if (HAS_PCH_SPLIT(dev))
7290 ironlake_init_pch_refclk(dev);
7287} 7291}
7288 7292
7289static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb) 7293static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb)