Mesa (master): intel: fix vblank crtc selection with DRI1 when only one pipe is enabled.

Jesse Barnes jbarnes at kemper.freedesktop.org
Fri Jan 23 20:59:04 UTC 2009


Module: Mesa
Branch: master
Commit: 0b5266ff648b03b3f2beda9838598abc00c4f7b2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b5266ff648b03b3f2beda9838598abc00c4f7b2

Author: Owain Ainsworth <zerooa at googlemail.com>
Date:   Wed Jan 21 21:57:24 2009 +0000

intel: fix vblank crtc selection with DRI1 when only one pipe is enabled.

On Mobile chipsets, we often enable PipeB instead of PipeA, but the test
in here was insufficient, falling back to pipe A if the area
intersection returned zero. Therefore, in the case where a window went
off to the top of the left of the screen, it would freeze, waiting on
the wrong vblank.

Fix this mess by checking the sarea for a crtc being zero sized, and in
that case always default to the other one.

---

 src/mesa/drivers/dri/intel/intel_buffers.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 08e10c9..81e718b 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -195,6 +195,14 @@ intelWindowMoved(struct intel_context *intel)
        intel->intelScreen->driScrnPriv->ddx_version.minor >= 7) {
       GLuint flags = intelFixupVblank(intel, dPriv);
 
+      /* Do the stupid test: Is one of them actually disabled?
+       */
+      if (sarea->planeA_w == 0 || sarea->planeA_h == 0) {
+	 flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY;
+      } else if (sarea->planeB_w == 0 || sarea->planeB_h == 0) {
+	 flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
+      }
+
       /* Check to see if we changed pipes */
       if (flags != dPriv->vblFlags && dPriv->vblFlags &&
 	  !(dPriv->vblFlags & VBLANK_FLAG_NO_IRQ)) {




More information about the mesa-commit mailing list