aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-25 15:02:02 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-10 16:13:24 -0400
commit716c2e55100ff5588bd2bbca14951ef11624cba2 (patch)
treebf84cf57752a42f3a1e09651ba8ffc22b125ea16 /drivers/gpu/drm/i915/intel_display.c
parente0b01be41dcdfd28c6855f605983a61b29f65692 (diff)
drm/i915: Switch to common shared dpll framework for WRPLLs
Mostly this patch is one big excersize in deleting code and asserts which are no longer needed. Note that we still abuse the shared dpll framework a bit since we call the enable/disable functions from the crtc mode_set and off hooks. But changing the actual hardware sequence will be done in the next step. Note that besides the massive amount of changes in this patch the places and order in which the low-level WRPLL code is called is absolutely unchanged. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> [imre: rebased on patchset version w/o pch/crt/fdi refactoring] Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 851221d6e7af..a3305a074650 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1821,7 +1821,7 @@ static void intel_enable_shared_dpll(struct intel_crtc *crtc)
1821 pll->on = true; 1821 pll->on = true;
1822} 1822}
1823 1823
1824static void intel_disable_shared_dpll(struct intel_crtc *crtc) 1824void intel_disable_shared_dpll(struct intel_crtc *crtc)
1825{ 1825{
1826 struct drm_device *dev = crtc->base.dev; 1826 struct drm_device *dev = crtc->base.dev;
1827 struct drm_i915_private *dev_priv = dev->dev_private; 1827 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -3621,7 +3621,7 @@ static void lpt_pch_enable(struct drm_crtc *crtc)
3621 lpt_enable_pch_transcoder(dev_priv, cpu_transcoder); 3621 lpt_enable_pch_transcoder(dev_priv, cpu_transcoder);
3622} 3622}
3623 3623
3624static void intel_put_shared_dpll(struct intel_crtc *crtc) 3624void intel_put_shared_dpll(struct intel_crtc *crtc)
3625{ 3625{
3626 struct intel_shared_dpll *pll = intel_crtc_to_shared_dpll(crtc); 3626 struct intel_shared_dpll *pll = intel_crtc_to_shared_dpll(crtc);
3627 3627
@@ -3641,7 +3641,7 @@ static void intel_put_shared_dpll(struct intel_crtc *crtc)
3641 crtc->config.shared_dpll = DPLL_ID_PRIVATE; 3641 crtc->config.shared_dpll = DPLL_ID_PRIVATE;
3642} 3642}
3643 3643
3644static struct intel_shared_dpll *intel_get_shared_dpll(struct intel_crtc *crtc) 3644struct intel_shared_dpll *intel_get_shared_dpll(struct intel_crtc *crtc)
3645{ 3645{
3646 struct drm_i915_private *dev_priv = crtc->base.dev->dev_private; 3646 struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
3647 struct intel_shared_dpll *pll = intel_crtc_to_shared_dpll(crtc); 3647 struct intel_shared_dpll *pll = intel_crtc_to_shared_dpll(crtc);
@@ -7569,7 +7569,9 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc,
7569 7569
7570 if (!intel_ddi_pll_select(intel_crtc)) 7570 if (!intel_ddi_pll_select(intel_crtc))
7571 return -EINVAL; 7571 return -EINVAL;
7572 intel_ddi_pll_enable(intel_crtc); 7572
7573 if (intel_crtc_to_shared_dpll(intel_crtc))
7574 intel_enable_shared_dpll(intel_crtc);
7573 7575
7574 intel_crtc->lowfreq_avail = false; 7576 intel_crtc->lowfreq_avail = false;
7575 7577
@@ -12868,10 +12870,6 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
12868 crtc->active ? "enabled" : "disabled"); 12870 crtc->active ? "enabled" : "disabled");
12869 } 12871 }
12870 12872
12871 /* FIXME: Smash this into the new shared dpll infrastructure. */
12872 if (HAS_DDI(dev))
12873 intel_ddi_setup_hw_pll_state(dev);
12874
12875 for (i = 0; i < dev_priv->num_shared_dpll; i++) { 12873 for (i = 0; i < dev_priv->num_shared_dpll; i++) {
12876 struct intel_shared_dpll *pll = &dev_priv->shared_dplls[i]; 12874 struct intel_shared_dpll *pll = &dev_priv->shared_dplls[i];
12877 12875