i965 code and Linux coding style < 0
authorDave Airlie <airlied@linux.ie>
Thu, 10 Aug 2006 04:38:50 +0000 (14:38 +1000)
committerDave Airlie <airlied@linux.ie>
Thu, 10 Aug 2006 04:38:50 +0000 (14:38 +1000)
smack my whitespace up.

shared-core/i915_dma.c
shared-core/i915_drm.h
shared-core/i915_drv.h
shared-core/i915_irq.c

index 39f7b40..ba8c56e 100644 (file)
@@ -32,9 +32,9 @@
 #include "i915_drv.h"
 
 #define IS_I965G(dev)  (dev->pdev->device == 0x2972 || \
-                        dev->pdev->device == 0x2982 || \
-                        dev->pdev->device == 0x2992 || \
-                        dev->pdev->device == 0x29A2)
+                       dev->pdev->device == 0x2982 || \
+                       dev->pdev->device == 0x2992 || \
+                       dev->pdev->device == 0x29A2)
 
 
 /* Really want an OS-independent resettable timer.  Would like to have
@@ -402,23 +402,23 @@ static int i915_emit_box(drm_device_t * dev,
                return DRM_ERR(EINVAL);
        }
 
-       if (IS_I965G(dev)) {
-               BEGIN_LP_RING(4);
-               OUT_RING(GFX_OP_DRAWRECT_INFO_I965);
-               OUT_RING((box.x1 & 0xffff) | (box.y1 << 16));
-               OUT_RING(((box.x2 - 1) & 0xffff) | ((box.y2 - 1) << 16));
-               OUT_RING(DR4);
-               ADVANCE_LP_RING();
-       } else {
-               BEGIN_LP_RING(6);
-               OUT_RING(GFX_OP_DRAWRECT_INFO);
-               OUT_RING(DR1);
-               OUT_RING((box.x1 & 0xffff) | (box.y1 << 16));
-               OUT_RING(((box.x2 - 1) & 0xffff) | ((box.y2 - 1) << 16));
-               OUT_RING(DR4);
-               OUT_RING(0);
-               ADVANCE_LP_RING();
-       }
+       if (IS_I965G(dev)) {
+               BEGIN_LP_RING(4);
+               OUT_RING(GFX_OP_DRAWRECT_INFO_I965);
+               OUT_RING((box.x1 & 0xffff) | (box.y1 << 16));
+               OUT_RING(((box.x2 - 1) & 0xffff) | ((box.y2 - 1) << 16));
+               OUT_RING(DR4);
+               ADVANCE_LP_RING();
+       } else {
+               BEGIN_LP_RING(6);
+               OUT_RING(GFX_OP_DRAWRECT_INFO);
+               OUT_RING(DR1);
+               OUT_RING((box.x1 & 0xffff) | (box.y1 << 16));
+               OUT_RING(((box.x2 - 1) & 0xffff) | ((box.y2 - 1) << 16));
+               OUT_RING(DR4);
+               OUT_RING(0);
+               ADVANCE_LP_RING();
+       }
 
        return 0;
 }
@@ -432,10 +432,10 @@ static void i915_emit_breadcrumb(drm_device_t *dev)
        drm_i915_private_t *dev_priv = dev->dev_private;
        RING_LOCALS;
 
-       dev_priv->sarea_priv->last_enqueue = ++dev_priv->counter;
+       dev_priv->sarea_priv->last_enqueue = ++dev_priv->counter;
 
-       if (dev_priv->counter > 0x7FFFFFFFUL)
-               dev_priv->sarea_priv->last_enqueue = dev_priv->counter = 1;
+       if (dev_priv->counter > 0x7FFFFFFFUL)
+               dev_priv->sarea_priv->last_enqueue = dev_priv->counter = 1;
 
        BEGIN_LP_RING(4);
        OUT_RING(CMD_STORE_DWORD_IDX);
index 41acd4e..fcffb25 100644 (file)
@@ -97,13 +97,13 @@ typedef struct _drm_i915_sarea {
        int rotated_offset;
        int rotated_size;
        int rotated_pitch;
-        int virtualX, virtualY;
+       int virtualX, virtualY;
 
-        unsigned int front_tiled;
-        unsigned int back_tiled;
-        unsigned int depth_tiled;
-        unsigned int rotated_tiled;
-        unsigned int rotated2_tiled;
+       unsigned int front_tiled;
+       unsigned int back_tiled;
+       unsigned int depth_tiled;
+       unsigned int rotated_tiled;
+       unsigned int rotated2_tiled;
 } drm_i915_sarea_t;
 
 /* Flags for perf_boxes
index 550e386..a87075b 100644 (file)
@@ -141,14 +141,14 @@ extern void i915_mem_release(drm_device_t * dev,
 #define I915_VERBOSE 0
 
 #define RING_LOCALS    unsigned int outring, ringmask, outcount; \
-                        volatile char *virt;
+                       volatile char *virt;
 
 #define BEGIN_LP_RING(n) do {                          \
        if (I915_VERBOSE)                               \
                DRM_DEBUG("BEGIN_LP_RING(%d) in %s\n",  \
                                 (n), __FUNCTION__);           \
-       if (dev_priv->ring.space < (n)*4)                       \
-               i915_wait_ring(dev, (n)*4, __FUNCTION__);               \
+       if (dev_priv->ring.space < (n)*4)                      \
+               i915_wait_ring(dev, (n)*4, __FUNCTION__);      \
        outcount = 0;                                   \
        outring = dev_priv->ring.tail;                  \
        ringmask = dev_priv->ring.tail_mask;            \
@@ -158,7 +158,7 @@ extern void i915_mem_release(drm_device_t * dev,
 #define OUT_RING(n) do {                                       \
        if (I915_VERBOSE) DRM_DEBUG("   OUT_RING %x\n", (int)(n));      \
        *(volatile unsigned int *)(virt + outring) = (n);               \
-        outcount++;                                            \
+       outcount++;                                             \
        outring += 4;                                           \
        outring &= ringmask;                                    \
 } while (0)
index 64d89a7..14213b5 100644 (file)
@@ -71,29 +71,29 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 static int i915_emit_irq(drm_device_t * dev)
 {
        
-       drm_i915_private_t *dev_priv = dev->dev_private;
-       RING_LOCALS;
+       drm_i915_private_t *dev_priv = dev->dev_private;
+       RING_LOCALS;
 
-       i915_kernel_lost_context(dev);
+       i915_kernel_lost_context(dev);
 
-       DRM_DEBUG("%s\n", __FUNCTION__);
+       DRM_DEBUG("%s\n", __FUNCTION__);
 
-       dev_priv->sarea_priv->last_enqueue = ++dev_priv->counter;
+       dev_priv->sarea_priv->last_enqueue = ++dev_priv->counter;
 
-       if (dev_priv->counter > 0x7FFFFFFFUL)
-               dev_priv->sarea_priv->last_enqueue = dev_priv->counter = 1;
+       if (dev_priv->counter > 0x7FFFFFFFUL)
+                dev_priv->sarea_priv->last_enqueue = dev_priv->counter = 1;
 
-       BEGIN_LP_RING(6);
-       OUT_RING(CMD_STORE_DWORD_IDX);
-       OUT_RING(20);
-       OUT_RING(dev_priv->counter);
+       BEGIN_LP_RING(6);
+       OUT_RING(CMD_STORE_DWORD_IDX);
+       OUT_RING(20);
+       OUT_RING(dev_priv->counter);
 
-       OUT_RING(0);
-       OUT_RING(0);
-       OUT_RING(GFX_OP_USER_INTERRUPT);
-       ADVANCE_LP_RING();
+       OUT_RING(0);
+       OUT_RING(0);
+       OUT_RING(GFX_OP_USER_INTERRUPT);
+       ADVANCE_LP_RING();
 
-       return dev_priv->counter;
+       return dev_priv->counter;
 
 
 }