All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: add wait_for_vblank argument to intel_enable_pipe
@ 2013-12-19 21:12 Paulo Zanoni
  2013-12-19 21:12 ` [PATCH 2/3] drm/i915: don't wait for vblank after enabling pipe on HSW Paulo Zanoni
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Paulo Zanoni @ 2013-12-19 21:12 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

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>
---
 drivers/gpu/drm/i915/intel_display.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 869be78..6865fa2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1753,7 +1753,7 @@ static void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
  * returning.
  */
 static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
-			      bool pch_port, bool dsi)
+			      bool pch_port, bool dsi, bool wait_for_vblank)
 {
 	enum transcoder cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv,
 								      pipe);
@@ -1796,7 +1796,9 @@ static void intel_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
 		return;
 
 	I915_WRITE(reg, val | PIPECONF_ENABLE);
-	intel_wait_for_vblank(dev_priv->dev, pipe);
+	POSTING_READ(reg);
+	if (wait_for_vblank)
+		intel_wait_for_vblank(dev_priv->dev, pipe);
 }
 
 /**
@@ -3558,7 +3560,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
 
 	intel_update_watermarks(crtc);
 	intel_enable_pipe(dev_priv, pipe,
-			  intel_crtc->config.has_pch_encoder, false);
+			  intel_crtc->config.has_pch_encoder, false, true);
 	intel_enable_primary_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
 	intel_crtc_update_cursor(crtc, true);
@@ -3704,7 +3706,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
 
 	intel_update_watermarks(crtc);
 	intel_enable_pipe(dev_priv, pipe,
-			  intel_crtc->config.has_pch_encoder, false);
+			  intel_crtc->config.has_pch_encoder, false, true);
 
 	if (intel_crtc->config.has_pch_encoder)
 		lpt_pch_enable(crtc);
@@ -4145,7 +4147,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)
 	intel_crtc_load_lut(crtc);
 
 	intel_update_watermarks(crtc);
-	intel_enable_pipe(dev_priv, pipe, false, is_dsi);
+	intel_enable_pipe(dev_priv, pipe, false, is_dsi, true);
 	intel_enable_primary_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
 	intel_crtc_update_cursor(crtc, true);
@@ -4183,7 +4185,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
 	intel_crtc_load_lut(crtc);
 
 	intel_update_watermarks(crtc);
-	intel_enable_pipe(dev_priv, pipe, false, false);
+	intel_enable_pipe(dev_priv, pipe, false, false, true);
 	intel_enable_primary_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
 	/* The fixup needs to happen before cursor is enabled */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2014-02-12 18:35 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-19 21:12 [PATCH 1/3] drm/i915: add wait_for_vblank argument to intel_enable_pipe Paulo Zanoni
2013-12-19 21:12 ` [PATCH 2/3] drm/i915: don't wait for vblank after enabling pipe on HSW Paulo Zanoni
2014-01-15 18:26   ` Jesse Barnes
2013-12-19 21:12 ` [PATCH 3/3] drm/i915: remove the vblank_wait hack from HSW+ Paulo Zanoni
2013-12-19 21:17   ` Daniel Vetter
2013-12-20 14:32     ` Paulo Zanoni
2013-12-20 22:32       ` Lee, Chon Ming
2014-01-02 16:08         ` Paulo Zanoni
2014-01-15 18:28   ` Jesse Barnes
2014-02-12 11:13   ` Ville Syrjälä
2014-02-12 11:26     ` Ville Syrjälä
2014-02-12 17:02       ` Paulo Zanoni
2014-02-12 18:06         ` Ville Syrjälä
2014-02-12 18:35           ` Paulo Zanoni
2013-12-20  6:41 ` [PATCH 1/3] drm/i915: add wait_for_vblank argument to intel_enable_pipe Jani Nikula
2014-01-15 18:25 ` Jesse Barnes
2014-01-15 23:40   ` Daniel Vetter
2014-01-17 15:46     ` Paulo Zanoni
2014-01-17 15:51       ` [PATCH 4/3] drm/i915: pass intel_crtc as argument for intel_enable_pipe Paulo Zanoni
2014-01-17 15:51         ` [PATCH 5/3] drm/i915: remove pch_port argument form intel_enable_pipe Paulo Zanoni
2014-02-10 14:17           ` Damien Lespiau
2014-01-17 15:51         ` [PATCH 6/3] drm/i915: remove "dsi" " Paulo Zanoni
2014-02-10 14:21           ` Damien Lespiau
2014-02-10 17:19           ` Daniel Vetter
2014-01-17 15:51         ` [PATCH 7/3] drm/i915: remove wait_for_vblank " Paulo Zanoni
2014-02-10 14:33           ` Damien Lespiau
2014-02-10 14:59             ` Ville Syrjälä
2014-01-17 15:51         ` [PATCH 8/3] drm/i915: WARN in case we're enabling the pipe and it's enabled Paulo Zanoni
2014-02-10 14:34           ` Damien Lespiau
2014-02-10 14:17         ` [PATCH 4/3] drm/i915: pass intel_crtc as argument for intel_enable_pipe Damien Lespiau
2014-02-10 17:23           ` Daniel Vetter
2014-02-11 15:23             ` Paulo Zanoni
2014-02-11 15:44               ` Daniel Vetter
2014-02-11 17:09                 ` Paulo Zanoni
2014-02-11 17:20                   ` Paulo Zanoni
2014-02-11 21:54                     ` Daniel Vetter
2014-02-12 15:56                       ` Paulo Zanoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.