OSDN Git Service

intel: fix the mismerge of the vblank pipe enable sanity check
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 23 Jan 2009 21:18:13 +0000 (13:18 -0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 23 Jan 2009 21:18:13 +0000 (13:18 -0800)
Fix the last merge fix, had the blocks ordered incorrectly.

src/mesa/drivers/dri/intel/intel_buffers.c

index 3444e29..f1a08c5 100644 (file)
@@ -166,19 +166,19 @@ intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv)
       GLint areaB = driIntersectArea( drw_rect, planeB_rect );
       GLuint flags = dPriv->vblFlags;
 
-      /* Do the stupid test: Is one of them actually disabled?
+      /* Update vblank info
        */
-      if (sarea->planeA_w == 0 || sarea->planeA_h == 0) {
+      if (areaB > areaA || (areaA == areaB && areaB > 0)) {
         flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY;
-      } else if (sarea->planeB_w == 0 || sarea->planeB_h == 0) {
+      } else {
         flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
       }
 
-      /* Update vblank info
+      /* Do the stupid test: Is one of them actually disabled?
        */
-      if (areaB > areaA || (areaA == areaB && areaB > 0)) {
+      if (sarea->planeA_w == 0 || sarea->planeA_h == 0) {
         flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY;
-      } else {
+      } else if (sarea->planeB_w == 0 || sarea->planeB_h == 0) {
         flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
       }