[PATCH xf86-video-trident v2 2/4] Fix indentation of xp4_accel.c

Kevin Brace kevinbrace at gmx.com
Tue Mar 5 22:41:46 UTC 2019


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/xp4_accel.c | 368 ++++++++++++++++++++++++++++--------------------
 1 file changed, 213 insertions(+), 155 deletions(-)

diff --git a/src/xp4_accel.c b/src/xp4_accel.c
index 8ea3697..949c415 100644
--- a/src/xp4_accel.c
+++ b/src/xp4_accel.c
@@ -1,26 +1,28 @@
 /*
  * Copyright 1992-2003 by Alan Hourihane, North Wales, UK.
  *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Alan Hourihane makes no representations
- * about the suitability of this software for any purpose.  It is provided
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without
+ * fee, provided that the above copyright notice appear in all copies
+ * and that both that copyright notice and this permission notice
+ * appear in supporting documentation, and that the name of Alan
+ * Hourihane not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.  Alan Hourihane makes no representations about the
+ * suitability of this software for any purpose.  It is provided
  * "as is" without express or implied warranty.
  *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
+ * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
  *
  * Authors:  Alan Hourihane, <alanh at fairlite.demon.co.uk>
- * 
+ *
  * CyberBladeXP4 accelerated options.
  */
 #ifdef HAVE_CONFIG_H
@@ -42,44 +44,66 @@
 
 static void XP4Sync(ScrnInfoPtr pScrn);
 #if 0
-static void XP4SetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
-        int rop, unsigned int planemask, int length,
-        unsigned char *pattern);
+static void XP4SetupForDashedLine(ScrnInfoPtr pScrn,
+                                    int fg, int bg,
+                                    int rop,
+                                    unsigned int planemask,
+                                    int length,
+                                    unsigned char *pattern);
 static void XP4SubsequentDashedBresenhamLine(ScrnInfoPtr pScrn,
-        int x, int y, int dmaj, int dmin, int e,
-        int len, int octant, int phase);
-static void XP4SetupForSolidLine(ScrnInfoPtr pScrn, int color,
-        int rop, unsigned int planemask);
+                                                int x, int y,
+                                                int dmaj, int dmin,
+                                                int e, int len,
+                                                int octant,
+                                                int phase);
+static void XP4SetupForSolidLine(ScrnInfoPtr pScrn,
+                                    int color,
+                                    int rop,
+                                    unsigned int planemask);
 static void XP4SubsequentSolidBresenhamLine(ScrnInfoPtr pScrn,
-        int x, int y, int dmaj, int dmin, int e,
-        int len, int octant);
+                                            int x, int y,
+                                            int dmaj, int dmin,
+                                            int e, int len,
+                                            int octant);
 #endif
-static void XP4SubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y,
-        int len, int dir);
-static void XP4SetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-        int rop, unsigned int planemask);
-static void XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-        int y, int w, int h);
+static void XP4SubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
+                                            int x, int y,
+                                            int len, int dir);
+static void XP4SetupForFillRectSolid(ScrnInfoPtr pScrn,
+                                        int color,
+                                        int rop,
+                                        unsigned int planemask);
+static void XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn,
+                                        int x, int y,
+                                        int w, int h);
 static void XP4SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
-        int x1, int y1, int x2,
-        int y2, int w, int h);
+                                            int x1, int y1,
+                                            int x2, int y2,
+                                            int w, int h);
 static void XP4SetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-        int xdir, int ydir, int rop,
-        unsigned int planemask,
-        int transparency_color);
+                                            int xdir, int ydir,
+                                            int rop,
+                                            unsigned int planemask,
+                                            int transparency_color);
 static void XP4SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
-        int patternx, int patterny, int fg, int bg,
-        int rop, unsigned int planemask);
+                                            int patternx,
+                                            int patterny,
+                                            int fg, int bg,
+                                            int rop,
+                                            unsigned int planemask);
 static void XP4SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
-        int patternx, int patterny, int x, int y,
-        int w, int h);
-static void XP4SetupForCPUToScreenColorExpandFill(
-        ScrnInfoPtr pScrn,
-        int fg, int bg, int rop,
-        unsigned int planemask);
-static void XP4SubsequentCPUToScreenColorExpandFill(
-        ScrnInfoPtr pScrn, int x,
-        int y, int w, int h, int skipleft);
+                                                int patternx,
+                                                int patterny,
+                                                int x, int y,
+                                                int w, int h);
+static void XP4SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+                                            int fg, int bg,
+                                            int rop,
+                                            unsigned int planemask);
+static void XP4SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+                                                    int x, int y,
+                                                    int w, int h,
+                                                    int skipleft);
 
 static int bpp;
 static int ropcode;
@@ -96,35 +120,39 @@ XP4InitializeAccelerator(ScrnInfoPtr pScrn)
     CHECKCLIPPING;
 
     switch (pScrn->bitsPerPixel) {
-        case 8:
-        default: /* Muffle compiler */
+    case 8:
+    default: /* Muffle compiler */
         shift = 18;
         break;
-        case 16:
+    case 16:
         shift = 19;
         break;
-        case 32:
+    case 32:
         shift = 20;
         break;
     }
 
     switch (pScrn->bitsPerPixel) {
-        case 8:
+    case 8:
         bpp = 0x40;
         break;
-        case 16:
+    case 16:
         bpp = 0x41;
         break;
-        case 32:
+    case 32:
         bpp = 0x42;
         break;
     }
-    MMIO_OUT32(pTrident->IOBase, 0x2154, (pScrn->displayWidth) << shift);
-    MMIO_OUT32(pTrident->IOBase, 0x2150, (pScrn->displayWidth) << shift);
+
+    MMIO_OUT32(pTrident->IOBase, 0x2154,
+                                    (pScrn->displayWidth) << shift);
+    MMIO_OUT32(pTrident->IOBase, 0x2150,
+                                    (pScrn->displayWidth) << shift);
 }
 #endif
 
-Bool XP4XaaInit(ScreenPtr pScreen) {
+Bool XP4XaaInit(ScreenPtr pScreen)
+{
 #ifdef HAVE_XAA_H
     XAAInfoRecPtr infoPtr;
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
@@ -136,9 +164,8 @@ Bool XP4XaaInit(ScreenPtr pScreen) {
     pTrident->AccelInfoRec = infoPtr = XAACreateInfoRec();
     if (!infoPtr) return FALSE;
 
-    infoPtr->Flags = PIXMAP_CACHE |
-    OFFSCREEN_PIXMAPS |
-    LINEAR_FRAMEBUFFER;
+    infoPtr->Flags = PIXMAP_CACHE | OFFSCREEN_PIXMAPS |
+                                    LINEAR_FRAMEBUFFER;
 
     pTrident->InitializeAccelerator = XP4InitializeAccelerator;
     XP4InitializeAccelerator(pScrn);
@@ -149,15 +176,16 @@ Bool XP4XaaInit(ScreenPtr pScreen) {
     infoPtr->SolidLineFlags = NO_PLANEMASK;
     infoPtr->SetupForSolidLine = XP4SetupForSolidLine;
     infoPtr->SolidBresenhamLineErrorTermBits = 12;
-    infoPtr->SubsequentSolidBresenhamLine = XP4SubsequentSolidBresenhamLine;
+    infoPtr->SubsequentSolidBresenhamLine =
+                                    XP4SubsequentSolidBresenhamLine;
 
     infoPtr->DashedLineFlags = LINE_PATTERN_MSBFIRST_LSBJUSTIFIED |
-    NO_PLANEMASK |
-    LINE_PATTERN_POWER_OF_2_ONLY;
+                                NO_PLANEMASK |
+                                LINE_PATTERN_POWER_OF_2_ONLY;
     infoPtr->SetupForDashedLine = XP4SetupForDashedLine;
     infoPtr->DashedBresenhamLineErrorTermBits = 12;
     infoPtr->SubsequentDashedBresenhamLine =
-    XP4SubsequentDashedBresenhamLine;
+                                    XP4SubsequentDashedBresenhamLine;
     infoPtr->DashPatternMaxLength = 16;
 #endif
 
@@ -171,30 +199,30 @@ Bool XP4XaaInit(ScreenPtr pScreen) {
     infoPtr->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
 
     infoPtr->SetupForScreenToScreenCopy =
-    XP4SetupForScreenToScreenCopy;
+                                        XP4SetupForScreenToScreenCopy;
     infoPtr->SubsequentScreenToScreenCopy =
-    XP4SubsequentScreenToScreenCopy;
+                                    XP4SubsequentScreenToScreenCopy;
 
     infoPtr->Mono8x8PatternFillFlags = NO_PLANEMASK |
-    HARDWARE_PATTERN_PROGRAMMED_BITS |
-    HARDWARE_PATTERN_SCREEN_ORIGIN |
-    BIT_ORDER_IN_BYTE_MSBFIRST;
+                                    HARDWARE_PATTERN_PROGRAMMED_BITS |
+                                    HARDWARE_PATTERN_SCREEN_ORIGIN |
+                                    BIT_ORDER_IN_BYTE_MSBFIRST;
 
     infoPtr->SetupForMono8x8PatternFill =
-    XP4SetupForMono8x8PatternFill;
+                                        XP4SetupForMono8x8PatternFill;
     infoPtr->SubsequentMono8x8PatternFillRect =
-    XP4SubsequentMono8x8PatternFillRect;
+                                XP4SubsequentMono8x8PatternFillRect;
 
 #if 0
     infoPtr->CPUToScreenColorExpandFillFlags = NO_PLANEMASK |
-    BIT_ORDER_IN_BYTE_MSBFIRST;
+                                        BIT_ORDER_IN_BYTE_MSBFIRST;
     infoPtr->ColorExpandBase = pTrident->D3Base;
     infoPtr->ColorExpandRange = pScrn->displayWidth;
 
     infoPtr->SetupForCPUToScreenColorExpandFill =
-    XP4SetupForCPUToScreenColorExpandFill;
+                                XP4SetupForCPUToScreenColorExpandFill;
     infoPtr->SubsequentCPUToScreenColorExpandFill =
-    XP4SubsequentCPUToScreenColorExpandFill;
+                            XP4SubsequentCPUToScreenColorExpandFill;
 #endif
 
     return(XAAInit(pScreen, infoPtr));
@@ -216,6 +244,7 @@ XP4Sync(ScrnInfoPtr pScrn)
         if (busy != GE_BUSY) {
             return;
         }
+
         count++;
         if (count == 10000000) {
             ErrorF("XP: BitBLT engine time-out.\n");
@@ -232,8 +261,10 @@ XP4Sync(ScrnInfoPtr pScrn)
 
 static void
 XP4SetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-        int xdir, int ydir, int rop,
-        unsigned int planemask, int transparency_color)
+                                int xdir, int ydir,
+                                int rop,
+                                unsigned int planemask,
+                                int transparency_color)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     int dst = 0;
@@ -250,12 +281,15 @@ XP4SetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
 
     ropcode = rop;
 
-    MMIO_OUT32(pTrident->IOBase, 0x2128, pTrident->BltScanDirection | SCR2SCR);
+    MMIO_OUT32(pTrident->IOBase, 0x2128,
+                                pTrident->BltScanDirection | SCR2SCR);
 }
 
 static void
-XP4SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1,
-        int x2, int y2, int w, int h)
+XP4SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
+                                int x1, int y1,
+                                int x2, int y2,
+                                int w, int h)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -267,17 +301,22 @@ XP4SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1,
         x1 = x1 + w - 1;
         x2 = x2 + w - 1;
     }
-    MMIO_OUT32(pTrident->IOBase, 0x2138, x2<<16 | y2);
-    MMIO_OUT32(pTrident->IOBase, 0x213C, x1<<16 | y1);
-    MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
+    MMIO_OUT32(pTrident->IOBase, 0x2138, (x2 << 16) | y2);
+    MMIO_OUT32(pTrident->IOBase, 0x213C, (x1 << 16) | y1);
+    MMIO_OUT32(pTrident->IOBase, 0x2140, (w << 16) | h);
     XP4Sync(pScrn);
-    MMIO_OUT32(pTrident->IOBase, 0x2124, XAAGetCopyROP(ropcode) << 24 | bpp << 8 | 1);
+    MMIO_OUT32(pTrident->IOBase, 0x2124,
+                                    (XAAGetCopyROP(ropcode) << 24) |
+                                    (bpp << 8) |
+                                    1);
 }
 
 #if 0
 static void
-XP4SetupForSolidLine(ScrnInfoPtr pScrn, int color,
-        int rop, unsigned int planemask)
+XP4SetupForSolidLine(ScrnInfoPtr pScrn,
+                        int color,
+                        int rop,
+                        unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -292,8 +331,10 @@ XP4SetupForSolidLine(ScrnInfoPtr pScrn, int color,
 }
 
 static void
-XP4SubsequentSolidBresenhamLine( ScrnInfoPtr pScrn,
-        int x, int y, int dmaj, int dmin, int e, int len, int octant)
+XP4SubsequentSolidBresenhamLine(ScrnInfoPtr pScrn,
+                                int x, int y,
+                                int dmaj, int dmin,
+                                int e, int len, int octant)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     int tmp = pTrident->BltScanDirection;
@@ -302,48 +343,48 @@ XP4SubsequentSolidBresenhamLine( ScrnInfoPtr pScrn,
     if (octant & XDECREASING) tmp |= XNEG;
     if (octant & YDECREASING) tmp |= YNEG;
     TGUI_DRAWFLAG(SOLIDFILL | STENCIL | tmp);
-    XP_SRC_XY(dmin-dmaj,dmin);
-    XP_DEST_XY(x,y);
-    XP_DIM_XY(dmin+e,len);
+    XP_SRC_XY(dmin - dmaj, dmin);
+    XP_DEST_XY(x, y);
+    XP_DIM_XY(dmin + e, len);
     TGUI_COMMAND(GE_BRESLINE);
     XP4Sync(pScrn);
 }
 #endif
 
 static void
-XP4SubsequentSolidHorVertLine(
-        ScrnInfoPtr pScrn,
-        int x, int y,
-        int len, int dir
-) {
+XP4SubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
+                                int x, int y,
+                                int len, int dir)
+{
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     TGUI_DRAWFLAG(SOLIDFILL);
     if (dir == DEGREES_0) {
-        XP_DIM_XY(len,1);
-        XP_DEST_XY(x,y);
+        XP_DIM_XY(len, 1);
+        XP_DEST_XY(x, y);
     } else {
-        XP_DIM_XY(1,len);
-        XP_DEST_XY(x,y);
+        XP_DIM_XY(1, len);
+        XP_DEST_XY(x, y);
     }
+
     TGUI_COMMAND(GE_BLT);
     XP4Sync(pScrn);
 }
 
 #if 0
 void
-XP4SetupForDashedLine(
-        ScrnInfoPtr pScrn,
-        int fg, int bg, int rop,
-        unsigned int planemask,
-        int length,
-        unsigned char *pattern
-) {
+XP4SetupForDashedLine(ScrnInfoPtr pScrn,
+                        int fg, int bg,
+                        int rop,
+                        unsigned int planemask,
+                        int length,
+                        unsigned char *pattern)
+{
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     CARD32 *DashPattern = (CARD32*)pattern;
     CARD32 NiceDashPattern = DashPattern[0];
 
-    NiceDashPattern = *((CARD16 *)pattern) & ((1<<length) - 1);
+    NiceDashPattern = *((CARD16 *)pattern) & ((1 << length) - 1);
     switch(length) {
         case 2: NiceDashPattern |= NiceDashPattern << 2;
         case 4: NiceDashPattern |= NiceDashPattern << 4;
@@ -354,7 +395,7 @@ XP4SetupForDashedLine(
     if (pTrident->Chipset >= PROVIDIA9685) {
         TGUI_FPATCOL(fg);
         if (bg == -1) {
-            pTrident->BltScanDirection |= 1<<12;
+            pTrident->BltScanDirection |= (1 << 12);
             TGUI_BPATCOL(~fg);
         } else {
             REPLICATE(bg);
@@ -363,20 +404,24 @@ XP4SetupForDashedLine(
     } else {
         TGUI_FCOLOUR(fg);
         if (bg == -1) {
-            pTrident->BltScanDirection |= 1<<12;
+            pTrident->BltScanDirection |= (1 << 12);
             TGUI_BCOLOUR(~fg);
         } else {
             REPLICATE(bg);
             TGUI_BCOLOUR(bg);
         }
     }
+
     TGUI_FMIX(XAAPatternROP[rop]);
     pTrident->LinePattern = NiceDashPattern;
 }
 
 void
 XP4SubsequentDashedBresenhamLine(ScrnInfoPtr pScrn,
-        int x, int y, int dmaj, int dmin, int e, int len, int octant, int phase)
+                                    int x, int y,
+                                    int dmaj, int dmin,
+                                    int e, int len,
+                                    int octant, int phase)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     int tmp = pTrident->BltScanDirection;
@@ -386,19 +431,21 @@ XP4SubsequentDashedBresenhamLine(ScrnInfoPtr pScrn,
     if (octant & YDECREASING) tmp |= YNEG;
 
     TGUI_STYLE(((pTrident->LinePattern >> phase) |
-                    (pTrident->LinePattern << (16-phase))) & 0x0000FFFF);
+                (pTrident->LinePattern << (16 - phase))) & 0x0000FFFF);
     TGUI_DRAWFLAG(STENCIL | tmp);
-    XP_SRC_XY(dmin-dmaj,dmin);
-    XP_DEST_XY(x,y);
-    XP_DIM_XY(e+dmin,len);
+    XP_SRC_XY(dmin - dmaj, dmin);
+    XP_DEST_XY(x, y);
+    XP_DIM_XY(e + dmin, len);
     TGUI_COMMAND(GE_BRESLINE);
     XP4Sync(pScrn);
 }
 #endif
 
 static void
-XP4SetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-        int rop, unsigned int planemask)
+XP4SetupForFillRectSolid(ScrnInfoPtr pScrn,
+                            int color,
+                            int rop,
+                            unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -406,25 +453,30 @@ XP4SetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
 
     REPLICATE(color);
     MMIO_OUT32(pTrident->IOBase, 0x2158, color);
-    MMIO_OUT32(pTrident->IOBase, 0x2128, 1<<14);
+    MMIO_OUT32(pTrident->IOBase, 0x2128, 1 << 14);
 }
 
 static void
-XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
+XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn,
+                            int x, int y,
+                            int w, int h)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
-    MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
-    MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
+    MMIO_OUT32(pTrident->IOBase, 0x2138, (x << 16) | y);
+    MMIO_OUT32(pTrident->IOBase, 0x2140, (w << 16) | h);
     XP4Sync(pScrn);
-    MMIO_OUT32(pTrident->IOBase, 0x2124, XAAGetPatternROP(ropcode) << 24 | bpp << 8 | 2);
+    MMIO_OUT32(pTrident->IOBase, 0x2124,
+                            (XAAGetPatternROP(ropcode) << 24) |
+                            (bpp << 8) |
+                            2);
 }
 
 #if 1
-static void MoveDWORDS(
-        register CARD32* dest,
-        register CARD32* src,
-        register int dwords )
+static void
+MoveDWORDS(register CARD32* dest,
+            register CARD32* src,
+            register int dwords)
 {
     while(dwords & ~0x03) {
         *dest = *src;
@@ -435,6 +487,7 @@ static void MoveDWORDS(
         dest += 4;
         dwords -= 4;
     }
+
     if (!dwords) return;
     *dest = *src;
     dest += 1;
@@ -451,10 +504,10 @@ static void MoveDWORDS(
 #endif
 
 #if 1
-static void MoveDWORDS_FixedBase(
-        register CARD32* dest,
-        register CARD32* src,
-        register int dwords )
+static void
+MoveDWORDS_FixedBase(register CARD32* dest,
+                        register CARD32* src,
+                        register int dwords)
 {
     while(dwords & ~0x03) {
         *dest = *src;
@@ -476,9 +529,10 @@ static void MoveDWORDS_FixedBase(
 
 static void
 XP4SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
-        int patternx, int patterny,
-        int fg, int bg, int rop,
-        unsigned int planemask)
+                                int patternx, int patterny,
+                                int fg, int bg,
+                                int rop,
+                                unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     int drawflag = 0;
@@ -487,7 +541,7 @@ XP4SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
     MMIO_OUT32(pTrident->IOBase, 0x2158, fg);
 
     if (bg == -1) {
-        drawflag |= 1<<12;
+        drawflag |= (1 << 12);
         MMIO_OUT32(pTrident->IOBase, 0x215C, ~fg);
     } else {
         REPLICATE(bg);
@@ -496,34 +550,36 @@ XP4SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
 
     ropcode = rop;
 
-    drawflag |= 7<<18;
+    drawflag |= (7 << 18);
     TGUI_DRAWFLAG(PATMONO | drawflag);
 }
 
 static void
 XP4SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
-        int patternx, int patterny,
-        int x, int y,
-        int w, int h)
+                                    int patternx, int patterny,
+                                    int x, int y,
+                                    int w, int h)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     MMIO_OUT32(pTrident->IOBase, 0x2180, patternx);
     MMIO_OUT32(pTrident->IOBase, 0x2184, patterny);
-    MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
-    MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
+    MMIO_OUT32(pTrident->IOBase, 0x2138, (x << 16) | y);
+    MMIO_OUT32(pTrident->IOBase, 0x2140, (w << 16) | h);
     XP4Sync(pScrn);
-    MMIO_OUT32(pTrident->IOBase, 0x2124, XAAGetPatternROP(ropcode) << 24 | bpp << 8 | 2);
+    MMIO_OUT32(pTrident->IOBase, 0x2124,
+                                (XAAGetPatternROP(ropcode) << 24) |
+                                (bpp << 8) |
+                                2);
 }
 
 #if 1
 static void
-XP4SetupForCPUToScreenColorExpandFill(
-        ScrnInfoPtr pScrn,
-        int fg, int bg,
-        int rop,
-        unsigned int planemask
-) {
+XP4SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+                                        int fg, int bg,
+                                        int rop,
+                                        unsigned int planemask)
+{
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     ropcode = XAAGetCopyROP(rop);
@@ -531,7 +587,7 @@ XP4SetupForCPUToScreenColorExpandFill(
     TGUI_FMIX(XAACopyROP[rop]);
 #endif
     if (bg == -1) {
-        TGUI_DRAWFLAG(SRCMONO | 1<<12);
+        TGUI_DRAWFLAG(SRCMONO | (1 << 12));
         REPLICATE(fg);
         TGUI_FCOLOUR(fg);
     } else {
@@ -544,17 +600,19 @@ XP4SetupForCPUToScreenColorExpandFill(
 }
 
 static void
-XP4SubsequentCPUToScreenColorExpandFill(
-        ScrnInfoPtr pScrn,
-        int x, int y, int w, int h,
-        int skipleft
-) {
+XP4SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+                                        int x, int y,
+                                        int w, int h,
+                                        int skipleft)
+{
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
-    MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
-    MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
+    MMIO_OUT32(pTrident->IOBase, 0x2138, (x << 16) | y);
+    MMIO_OUT32(pTrident->IOBase, 0x2140, (w << 16) | h);
     XP4Sync(pScrn);
-    MMIO_OUT32(pTrident->IOBase, 0x2124, ropcode << 24 | bpp << 8 | 2);
+    MMIO_OUT32(pTrident->IOBase, 0x2124, (ropcode << 24) |
+                                            (bpp << 8) |
+                                            2);
 }
 #endif
 #endif
-- 
2.17.1



More information about the xorg-devel mailing list