aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-12-19 16:12:29 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-12 12:53:06 -0500
commit851855d8573fc0b9f30901980001d6374d92653e (patch)
tree7f2aaa7f4105c162e52381ac3760efd436fd0e5e /drivers/gpu/drm/i915/intel_display.c
parent4b6ed685e4cfe850250d2681025df44e5e05ad6c (diff)
drm/i915: add wait_for_vblank argument to intel_enable_pipe
Depending on the HW gen and the connector type, the pipe won't start running right after we call intel_enable_pipe, so that intel_wait_for_vblank call we currently have will just sit there for the full 50ms timeout. So this patch adds an argument that will allow us to avoid the vblank wait in case we want. Currently all the callers still request for the vblank wait, so the behavior should still be the same. We also added a POSTING_READ on the register: previously intel_wait_for_vblank was acting as a POSTING_READ, but now if wait_for_vblank is false we'll stkip it, so we need an explicit POSTING_READ. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> 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, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index af98ddb2cde7..c456768282da 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1759,7 +1759,7 @@ static void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
1759 * returning. 1759 * returning.
1760 */ 1760 */
1761static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe, 1761static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
1762 bool pch_port, bool dsi) 1762 bool pch_port, bool dsi, bool wait_for_vblank)
1763{ 1763{
1764 enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv, 1764 enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv,
1765 pipe); 1765 pipe);
@@ -1802,7 +1802,9 @@ static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
1802 return; 1802 return;
1803 1803
1804 I915_WRITE(reg, val | PIPECONF_ENABLE); 1804 I915_WRITE(reg, val | PIPECONF_ENABLE);
1805 intel_wait_for_vblank(dev_priv->dev, pipe); 1805 POSTING_READ(reg);
1806 if (wait_for_vblank)
1807 intel_wait_for_vblank(dev_priv->dev, pipe);
1806} 1808}
1807 1809
1808/** 1810/**
@@ -3599,7 +3601,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
3599 3601
3600 intel_update_watermarks(crtc); 3602 intel_update_watermarks(crtc);
3601 intel_enable_pipe(dev_priv, pipe, 3603 intel_enable_pipe(dev_priv, pipe,
3602 intel_crtc->config.has_pch_encoder, false); 3604 intel_crtc->config.has_pch_encoder, false, true);
3603 intel_enable_primary_plane(dev_priv, plane, pipe); 3605 intel_enable_primary_plane(dev_priv, plane, pipe);
3604 intel_enable_planes(crtc); 3606 intel_enable_planes(crtc);
3605 intel_crtc_update_cursor(crtc, true); 3607 intel_crtc_update_cursor(crtc, true);
@@ -3745,7 +3747,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
3745 3747
3746 intel_update_watermarks(crtc); 3748 intel_update_watermarks(crtc);
3747 intel_enable_pipe(dev_priv, pipe, 3749 intel_enable_pipe(dev_priv, pipe,
3748 intel_crtc->config.has_pch_encoder, false); 3750 intel_crtc->config.has_pch_encoder, false, true);
3749 3751
3750 if (intel_crtc->config.has_pch_encoder) 3752 if (intel_crtc->config.has_pch_encoder)
3751 lpt_pch_enable(crtc); 3753 lpt_pch_enable(crtc);
@@ -4180,7 +4182,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
4180 intel_crtc_load_lut(crtc); 4182 intel_crtc_load_lut(crtc);
4181 4183
4182 intel_update_watermarks(crtc); 4184 intel_update_watermarks(crtc);
4183 intel_enable_pipe(dev_priv, pipe, false, is_dsi); 4185 intel_enable_pipe(dev_priv, pipe, false, is_dsi, true);
4184 intel_set_cpu_fifo_underrun_reporting(dev, pipe, true); 4186 intel_set_cpu_fifo_underrun_reporting(dev, pipe, true);
4185 intel_enable_primary_plane(dev_priv, plane, pipe); 4187 intel_enable_primary_plane(dev_priv, plane, pipe);
4186 intel_enable_planes(crtc); 4188 intel_enable_planes(crtc);
@@ -4219,7 +4221,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
4219 intel_crtc_load_lut(crtc); 4221 intel_crtc_load_lut(crtc);
4220 4222
4221 intel_update_watermarks(crtc); 4223 intel_update_watermarks(crtc);
4222 intel_enable_pipe(dev_priv, pipe, false, false); 4224 intel_enable_pipe(dev_priv, pipe, false, false, true);
4223 intel_set_cpu_fifo_underrun_reporting(dev, pipe, true); 4225 intel_set_cpu_fifo_underrun_reporting(dev, pipe, true);
4224 intel_enable_primary_plane(dev_priv, plane, pipe); 4226 intel_enable_primary_plane(dev_priv, plane, pipe);
4225 intel_enable_planes(crtc); 4227 intel_enable_planes(crtc);