Fix bug 8010 - locking issues.
authorAlan Hourihane <alanh@tungstengraphics.com>
Sat, 26 Aug 2006 21:21:34 +0000 (21:21 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Sat, 26 Aug 2006 21:21:34 +0000 (21:21 +0000)
src/mesa/drivers/dri/i915/intel_batchbuffer.c

index 1dfaa2d59dc1b90dc7d03f06aa8bc05d20ea4081..dd754c67d448fe191a98b008df223cafa7baf5fb 100644 (file)
@@ -341,24 +341,22 @@ static void intelWaitForFrameCompletion( intelContextPtr intel )
               ;
         }
         else {
-           UNLOCK_HARDWARE( intel ); 
            intelWaitIrq( intel, intel->alloc.irq_emitted );    
-           LOCK_HARDWARE( intel ); 
         }
         intel->irqsEmitted = 10;
       }
 
       if (intel->irqsEmitted) {
+        LOCK_HARDWARE( intel ); 
         intelEmitIrqLocked( intel );
         intel->irqsEmitted--;
+        UNLOCK_HARDWARE( intel ); 
       }
    } 
    else {
       while (intelGetLastFrame (intel) < sarea->last_dispatch) {
-        UNLOCK_HARDWARE( intel ); 
         if (intel->do_usleeps) 
            DO_USLEEP( 1 );
-        LOCK_HARDWARE( intel ); 
       }
    }
 }