aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-07 04:17:56 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-07 04:17:56 -0400
commitf1615bbe9be4def59c3b3eaddb60722efeed16c2 (patch)
treeca3020e65447576fc1826e819651e6ba072030b5 /drivers/gpu/drm/i915/intel_display.c
parentcfb3c0ab0903abb6ea5215b37eebd9c2a1f057eb (diff)
parentcd3de83f147601356395b57a8673e9c5ff1e59d1 (diff)
Merge tag 'v3.16-rc4' into drm-intel-next-queued
Due to Dave's vacation drm-next hasn't opened yet for 3.17 so I couldn't move my drm-intel-next queue forward yet like I usually do. Just pull in the latest upstream -rc to unblock patch merging - I don't want to needlessly rebase my current patch pile really and void all the testing we've done already. 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.c40
1 files changed, 33 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 48d37586832c..6d038c567462 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2134,6 +2134,7 @@ void intel_flush_primary_plane(struct drm_i915_private *dev_priv,
2134static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, 2134static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv,
2135 enum plane plane, enum pipe pipe) 2135 enum plane plane, enum pipe pipe)
2136{ 2136{
2137 struct drm_device *dev = dev_priv->dev;
2137 struct intel_crtc *intel_crtc = 2138 struct intel_crtc *intel_crtc =
2138 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); 2139 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
2139 int reg; 2140 int reg;
@@ -2153,6 +2154,14 @@ static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv,
2153 2154
2154 I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); 2155 I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE);
2155 intel_flush_primary_plane(dev_priv, plane); 2156 intel_flush_primary_plane(dev_priv, plane);
2157
2158 /*
2159 * BDW signals flip done immediately if the plane
2160 * is disabled, even if the plane enable is already
2161 * armed to occur at the next vblank :(
2162 */
2163 if (IS_BROADWELL(dev))
2164 intel_wait_for_vblank(dev, intel_crtc->pipe);
2156} 2165}
2157 2166
2158/** 2167/**
@@ -4631,7 +4640,10 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
4631 if (intel_crtc->active) 4640 if (intel_crtc->active)
4632 return; 4641 return;
4633 4642
4634 vlv_prepare_pll(intel_crtc); 4643 is_dsi = intel_pipe_has_type(crtc, INTEL_OUTPUT_DSI);
4644
4645 if (!is_dsi && !IS_CHERRYVIEW(dev))
4646 vlv_prepare_pll(intel_crtc);
4635 4647
4636 /* Set up the display plane register */ 4648 /* Set up the display plane register */
4637 dspcntr = DISPPLANE_GAMMA_ENABLE; 4649 dspcntr = DISPPLANE_GAMMA_ENABLE;
@@ -4665,8 +4677,6 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
4665 if (encoder->pre_pll_enable) 4677 if (encoder->pre_pll_enable)
4666 encoder->pre_pll_enable(encoder); 4678 encoder->pre_pll_enable(encoder);
4667 4679
4668 is_dsi = intel_pipe_has_type(crtc, INTEL_OUTPUT_DSI);
4669
4670 if (!is_dsi) { 4680 if (!is_dsi) {
4671 if (IS_CHERRYVIEW(dev)) 4681 if (IS_CHERRYVIEW(dev))
4672 chv_enable_pll(intel_crtc); 4682 chv_enable_pll(intel_crtc);
@@ -11806,6 +11816,22 @@ const char *intel_output_name(int output)
11806 return names[output]; 11816 return names[output];
11807} 11817}
11808 11818
11819static bool intel_crt_present(struct drm_device *dev)
11820{
11821 struct drm_i915_private *dev_priv = dev->dev_private;
11822
11823 if (IS_ULT(dev))
11824 return false;
11825
11826 if (IS_CHERRYVIEW(dev))
11827 return false;
11828
11829 if (IS_VALLEYVIEW(dev) && !dev_priv->vbt.int_crt_support)
11830 return false;
11831
11832 return true;
11833}
11834
11809static void intel_setup_outputs(struct drm_device *dev) 11835static void intel_setup_outputs(struct drm_device *dev)
11810{ 11836{
11811 struct drm_i915_private *dev_priv = dev->dev_private; 11837 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -11814,7 +11840,7 @@ static void intel_setup_outputs(struct drm_device *dev)
11814 11840
11815 intel_lvds_init(dev); 11841 intel_lvds_init(dev);
11816 11842
11817 if (!IS_ULT(dev) && !IS_CHERRYVIEW(dev) && dev_priv->vbt.int_crt_support) 11843 if (intel_crt_present(dev))
11818 intel_crt_init(dev); 11844 intel_crt_init(dev);
11819 11845
11820 if (HAS_DDI(dev)) { 11846 if (HAS_DDI(dev)) {
@@ -13126,8 +13152,8 @@ intel_display_capture_error_state(struct drm_device *dev)
13126 13152
13127 for_each_pipe(i) { 13153 for_each_pipe(i) {
13128 error->pipe[i].power_domain_on = 13154 error->pipe[i].power_domain_on =
13129 intel_display_power_enabled_sw(dev_priv, 13155 intel_display_power_enabled_unlocked(dev_priv,
13130 POWER_DOMAIN_PIPE(i)); 13156 POWER_DOMAIN_PIPE(i));
13131 if (!error->pipe[i].power_domain_on) 13157 if (!error->pipe[i].power_domain_on)
13132 continue; 13158 continue;
13133 13159
@@ -13162,7 +13188,7 @@ intel_display_capture_error_state(struct drm_device *dev)
13162 enum transcoder cpu_transcoder = transcoders[i]; 13188 enum transcoder cpu_transcoder = transcoders[i];
13163 13189
13164 error->transcoder[i].power_domain_on = 13190 error->transcoder[i].power_domain_on =
13165 intel_display_power_enabled_sw(dev_priv, 13191 intel_display_power_enabled_unlocked(dev_priv,
13166 POWER_DOMAIN_TRANSCODER(cpu_transcoder)); 13192 POWER_DOMAIN_TRANSCODER(cpu_transcoder));
13167 if (!error->transcoder[i].power_domain_on) 13193 if (!error->transcoder[i].power_domain_on)
13168 continue; 13194 continue;