Ok, here's a version wrapping at 80 cols and that applies again Linus
current git. Feel free to forward...

Index: linux-work/drivers/char/drm/radeon_irq.c
===================================================================
--- linux-work.orig/drivers/char/drm/radeon_irq.c       2005-06-02 
11:36:58.000000000 +1000
+++ linux-work/drivers/char/drm/radeon_irq.c    2005-06-02 11:41:18.000000000 
+1000
@@ -35,7 +35,8 @@
 #include "radeon_drm.h"
 #include "radeon_drv.h"
 
-static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv, 
u32 mask)
+static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv,
+                                             u32 mask)
 {
        u32 irqs = RADEON_READ(RADEON_GEN_INT_STATUS) & mask;
        if (irqs)
@@ -71,8 +72,8 @@
        /* Only consider the bits we're interested in - others could be used
         * outside the DRM
         */
-       stat = RADEON_READ(RADEON_GEN_INT_STATUS)
-            & (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT);
+       stat = radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK |
+                                                 RADEON_CRTC_VBLANK_STAT));
        if (!stat)
                return IRQ_NONE;
 
@@ -88,19 +89,9 @@
                drm_vbl_send_signals( dev );
        }
 
-       /* Acknowledge interrupts we handle */
-       RADEON_WRITE(RADEON_GEN_INT_STATUS, stat);
        return IRQ_HANDLED;
 }
 
-static __inline__ void radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv)
-{
-       u32 tmp = RADEON_READ( RADEON_GEN_INT_STATUS )
-               & (RADEON_SW_INT_TEST_ACK | RADEON_CRTC_VBLANK_STAT);
-       if (tmp)
-               RADEON_WRITE( RADEON_GEN_INT_STATUS, tmp );
-}
-
 static int radeon_emit_irq(drm_device_t *dev)
 {
        drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -131,11 +122,6 @@
 
        dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;
 
-       /* This is a hack to work around mysterious freezes on certain
-        * systems:
-        */ 
-       radeon_acknowledge_irqs( dev_priv );
-
        DRM_WAIT_ON( ret, dev_priv->swi_queue, 3 * DRM_HZ, 
                     RADEON_READ( RADEON_LAST_SWI_REG ) >= swi_nr );
 
@@ -154,7 +140,7 @@
                return DRM_ERR(EINVAL);
        }
 
-       radeon_acknowledge_irqs( dev_priv );
+       radeon_acknowledge_irqs(dev_priv, RADEON_CRTC_VBLANK_STAT);
 
        dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;
 
@@ -232,7 +218,8 @@
        RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );
 
        /* Clear bits if they're already high */
-       radeon_acknowledge_irqs( dev_priv );
+       radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK |
+                                          RADEON_CRTC_VBLANK_STAT) );
 }
 
 void radeon_driver_irq_postinstall( drm_device_t *dev ) {




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to