[PATCH xf86-video-trident 1/3] Tab to spaces conversion for blade_accel.c

Kevin Brace kevinbrace at gmx.com
Thu Feb 21 19:55:48 UTC 2019


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/blade_accel.c | 491 +++++++++++++++++++++++++++---------------------------
 1 file changed, 244 insertions(+), 247 deletions(-)

diff --git a/src/blade_accel.c b/src/blade_accel.c
index 1645e1d..86a67a2 100644
--- a/src/blade_accel.c
+++ b/src/blade_accel.c
@@ -45,72 +45,72 @@
 static void BladeSync(ScrnInfoPtr pScrn);
 #if 0
 static void BladeSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-				int rop, unsigned int planemask);
+        int rop, unsigned int planemask);
 static void BladeSubsequentSolidBresenhamLine(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);
 static void BladeSubsequentSolidTwoPointLine( ScrnInfoPtr pScrn,
-        			int x1, int y1, int x2, int y2, int flags); 
+        int x1, int y1, int x2, int y2, int flags);
 static void BladeSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
-				int rop, unsigned int planemask, int length,
-				unsigned char *pattern);
+        int rop, unsigned int planemask, int length,
+        unsigned char *pattern);
 static void BladeSubsequentDashedTwoPointLine( ScrnInfoPtr pScrn,
-        			int x1, int y1, int x2, int y2, int flags,
-				int phase); 
+        int x1, int y1, int x2, int y2, int flags,
+        int phase);
 #endif
 static void BladeSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-				int rop, unsigned int planemask);
+        int rop, unsigned int planemask);
 static void BladeSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-				int y, int w, int h);
+        int y, int w, int h);
 static void BladeSubsequentScreenToScreenCopy(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 BladeSetupForScreenToScreenCopy(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);
 #if 0
 static void BladeSetupForScreenToScreenColorExpand(ScrnInfoPtr pScrn,
-    				int fg, int bg, int rop,
-    				unsigned int planemask);
+        int fg, int bg, int rop,
+        unsigned int planemask);
 static void BladeSubsequentScreenToScreenColorExpand(ScrnInfoPtr pScrn,
-    				int x, int y, int w, int h, int srcx, int srcy,
-				int offset);
+        int x, int y, int w, int h, int srcx, int srcy,
+        int offset);
 #endif
 static void BladeSetupForCPUToScreenColorExpand(ScrnInfoPtr pScrn,
-    				int fg, int bg, int rop,
-    				unsigned int planemask);
+        int fg, int bg, int rop,
+        unsigned int planemask);
 static void BladeSubsequentCPUToScreenColorExpand(ScrnInfoPtr pScrn,
-				int x, int y, int w, int h, int skipleft);
-static void BladeSetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1, 
-				int x2, int y2);
+        int x, int y, int w, int h, int skipleft);
+static void BladeSetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1,
+        int x2, int y2);
 static void BladeDisableClipping(ScrnInfoPtr pScrn);
-static void BladeSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
-				int patternx, int patterny, int fg, int bg, 
-				int rop, unsigned int planemask);
-static void BladeSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, 
-				int patternx, int patterny, int x, int y, 
-				int w, int h);
+static void BladeSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
+        int patternx, int patterny, int fg, int bg,
+        int rop, unsigned int planemask);
+static void BladeSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
+        int patternx, int patterny, int x, int y,
+        int w, int h);
 #if 0
-static void BladeSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, 
-				int patternx, int patterny, 
-				int rop, unsigned int planemask, int trans_col);
-static void BladeSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, 
-				int patternx, int patterny, int x, int y, 
-				int w, int h);
+static void BladeSetupForColor8x8PatternFill(ScrnInfoPtr pScrn,
+        int patternx, int patterny,
+        int rop, unsigned int planemask, int trans_col);
+static void BladeSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn,
+        int patternx, int patterny, int x, int y,
+        int w, int h);
 #endif
 static void BladeSetupForImageWrite(ScrnInfoPtr pScrn, int rop,
-   				unsigned int planemask, int transparency_color,
-   				int bpp, int depth);
+        unsigned int planemask, int transparency_color,
+        int bpp, int depth);
 static void BladeSubsequentImageWriteRect(ScrnInfoPtr pScrn, int x,
-   				int y, int w, int h, int skipleft);
+        int y, int w, int h, int skipleft);
 
 static void
 BladeInitializeAccelerator(ScrnInfoPtr pScrn)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     CARD32 stride;
- 
+
     stride = (pScrn->displayWidth >> 3) << 20;
 
     BLADE_OUT(0x21C8, stride);
@@ -118,18 +118,18 @@ BladeInitializeAccelerator(ScrnInfoPtr pScrn)
     BLADE_OUT(0x21D0, stride);
     BLADE_OUT(0x21D4, stride);
     switch (pScrn->depth) {
-	case 8:
-	    stride |= 0<<29;
-	    break;
-	case 15:
-	    stride |= 5<<29;
-	    break;
-	case 16:
-	    stride |= 1<<29;
-	    break;
-	case 24:
-	    stride |= 2<<29;
-	    break;
+        case 8:
+        stride |= 0<<29;
+        break;
+        case 15:
+        stride |= 5<<29;
+        break;
+        case 16:
+        stride |= 1<<29;
+        break;
+        case 24:
+        stride |= 2<<29;
+        break;
     }
     BLADE_OUT(0x21B8, 0);
     BLADE_OUT(0x21B8, stride);
@@ -140,24 +140,22 @@ BladeInitializeAccelerator(ScrnInfoPtr pScrn)
     /* It appears that the driver sometimes misdetects the RAM type, so we
      * don't force this for now */
     if (pTrident->HasSGRAM)
-    	BLADE_OUT(0x2168, 1<<26); /* Enables Block Write if available (SGRAM) */
+    BLADE_OUT(0x2168, 1<<26); /* Enables Block Write if available (SGRAM) */
     else
-	BLADE_OUT(0x2168, 0);
+    BLADE_OUT(0x2168, 0);
 #endif
     BLADE_OUT(0x216C, 0);
 }
 #endif
 
-Bool
-BladeXaaInit(ScreenPtr pScreen)
-{
+Bool BladeXaaInit(ScreenPtr pScreen) {
 #ifdef HAVE_XAA_H
     XAAInfoRecPtr infoPtr;
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     if (pTrident->NoAccel)
-	return FALSE;
+    return FALSE;
 
     pTrident->AccelInfoRec = infoPtr = XAACreateInfoRec();
     if (!infoPtr) return FALSE;
@@ -166,9 +164,9 @@ BladeXaaInit(ScreenPtr pScreen)
     BladeInitializeAccelerator(pScrn);
 
     infoPtr->Flags = PIXMAP_CACHE |
-		     LINEAR_FRAMEBUFFER |
-		     OFFSCREEN_PIXMAPS;
- 
+    LINEAR_FRAMEBUFFER |
+    OFFSCREEN_PIXMAPS;
+
     infoPtr->Sync = BladeSync;
 
     infoPtr->SetClippingRectangle = BladeSetClippingRectangle;
@@ -182,70 +180,70 @@ BladeXaaInit(ScreenPtr pScreen)
     infoPtr->SubsequentDashedTwoPointLine = BladeSubsequentDashedTwoPointLine;
     infoPtr->DashPatternMaxLength = 16;
     infoPtr->DashedLineFlags = LINE_PATTERN_LSBFIRST_LSBJUSTIFIED |
-			       LINE_PATTERN_POWER_OF_2_ONLY;
+    LINE_PATTERN_POWER_OF_2_ONLY;
 #endif
 
     infoPtr->SolidFillFlags = NO_PLANEMASK;
     infoPtr->SetupForSolidFill = BladeSetupForFillRectSolid;
     infoPtr->SubsequentSolidFillRect = BladeSubsequentFillRectSolid;
-    
+
     infoPtr->ScreenToScreenCopyFlags = ONLY_TWO_BITBLT_DIRECTIONS |
-					NO_PLANEMASK |
-					NO_TRANSPARENCY;
+    NO_PLANEMASK |
+    NO_TRANSPARENCY;
 
-    infoPtr->SetupForScreenToScreenCopy = 	
-				BladeSetupForScreenToScreenCopy;
-    infoPtr->SubsequentScreenToScreenCopy = 		
-				BladeSubsequentScreenToScreenCopy;
+    infoPtr->SetupForScreenToScreenCopy =
+    BladeSetupForScreenToScreenCopy;
+    infoPtr->SubsequentScreenToScreenCopy =
+    BladeSubsequentScreenToScreenCopy;
 
     infoPtr->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY |
-					BIT_ORDER_IN_BYTE_MSBFIRST |
-					HARDWARE_PATTERN_SCREEN_ORIGIN |
-					HARDWARE_PATTERN_PROGRAMMED_BITS;
+    BIT_ORDER_IN_BYTE_MSBFIRST |
+    HARDWARE_PATTERN_SCREEN_ORIGIN |
+    HARDWARE_PATTERN_PROGRAMMED_BITS;
 
     infoPtr->SetupForMono8x8PatternFill =
-				BladeSetupForMono8x8PatternFill;
-    infoPtr->SubsequentMono8x8PatternFillRect = 
-				BladeSubsequentMono8x8PatternFillRect;
+    BladeSetupForMono8x8PatternFill;
+    infoPtr->SubsequentMono8x8PatternFillRect =
+    BladeSubsequentMono8x8PatternFillRect;
 
 #if 0
-    infoPtr->Color8x8PatternFillFlags =  
-					HARDWARE_PATTERN_SCREEN_ORIGIN | 
-					BIT_ORDER_IN_BYTE_MSBFIRST;
+    infoPtr->Color8x8PatternFillFlags =
+    HARDWARE_PATTERN_SCREEN_ORIGIN |
+    BIT_ORDER_IN_BYTE_MSBFIRST;
 
     infoPtr->SetupForColor8x8PatternFill =
-				TridentSetupForColor8x8PatternFill;
-    infoPtr->SubsequentColor8x8PatternFillRect = 
-				TridentSubsequentColor8x8PatternFillRect;
+    TridentSetupForColor8x8PatternFill;
+    infoPtr->SubsequentColor8x8PatternFillRect =
+    TridentSubsequentColor8x8PatternFillRect;
 
     infoPtr->ScreenToScreenColorExpandFillFlags = 0;
 
-    infoPtr->SetupForScreenToScreenColorExpandFill = 	
-				BladeSetupForScreenToScreenColorExpand;
-    infoPtr->SubsequentScreenToScreenColorExpandFill = 		
-				BladeSubsequentScreenToScreenColorExpand;
+    infoPtr->SetupForScreenToScreenColorExpandFill =
+    BladeSetupForScreenToScreenColorExpand;
+    infoPtr->SubsequentScreenToScreenColorExpandFill =
+    BladeSubsequentScreenToScreenColorExpand;
 #endif
 
     infoPtr->CPUToScreenColorExpandFillFlags = CPU_TRANSFER_PAD_DWORD |
-				LEFT_EDGE_CLIPPING |
-				SYNC_AFTER_COLOR_EXPAND |
-				NO_PLANEMASK |
-				BIT_ORDER_IN_BYTE_MSBFIRST |
-			        SCANLINE_PAD_DWORD;
+    LEFT_EDGE_CLIPPING |
+    SYNC_AFTER_COLOR_EXPAND |
+    NO_PLANEMASK |
+    BIT_ORDER_IN_BYTE_MSBFIRST |
+    SCANLINE_PAD_DWORD;
     infoPtr->ColorExpandRange = 0x10000;
     infoPtr->ColorExpandBase = pTrident->IOBase + 0x10000;
-    infoPtr->SetupForCPUToScreenColorExpandFill = 	
-				BladeSetupForCPUToScreenColorExpand;
-    infoPtr->SubsequentCPUToScreenColorExpandFill = 		
-				BladeSubsequentCPUToScreenColorExpand;
+    infoPtr->SetupForCPUToScreenColorExpandFill =
+    BladeSetupForCPUToScreenColorExpand;
+    infoPtr->SubsequentCPUToScreenColorExpandFill =
+    BladeSubsequentCPUToScreenColorExpand;
 
     infoPtr->SetupForImageWrite = BladeSetupForImageWrite;
-    infoPtr->SubsequentImageWriteRect = 
-					BladeSubsequentImageWriteRect;
-    infoPtr->ImageWriteFlags =  NO_PLANEMASK |
-				LEFT_EDGE_CLIPPING |
-				CPU_TRANSFER_PAD_DWORD |
-				SYNC_AFTER_IMAGE_WRITE;
+    infoPtr->SubsequentImageWriteRect =
+    BladeSubsequentImageWriteRect;
+    infoPtr->ImageWriteFlags = NO_PLANEMASK |
+    LEFT_EDGE_CLIPPING |
+    CPU_TRANSFER_PAD_DWORD |
+    SYNC_AFTER_IMAGE_WRITE;
     infoPtr->ImageWriteBase = pTrident->IOBase + 0x10000;
     infoPtr->ImageWriteRange = 0x10000;
 
@@ -268,20 +266,20 @@ BladeSync(ScrnInfoPtr pScrn)
 
     BLADEBUSY(busy);
     while (busy != 0) {
-	if (--cnt < 0) {
-	    ErrorF("GE timeout\n");
-	    BLADE_OUT(0x2124, 1<<7);
-	    BLADE_OUT(0x2124, 0);
-	    break;
-	}
-    	BLADEBUSY(busy);
+        if (--cnt < 0) {
+            ErrorF("GE timeout\n");
+            BLADE_OUT(0x2124, 1<<7);
+            BLADE_OUT(0x2124, 0);
+            break;
+        }
+        BLADEBUSY(busy);
     }
 }
 
 static void
-BladeSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, 
-				int xdir, int ydir, int rop,
-				unsigned int planemask, int transparency_color)
+BladeSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
+        int xdir, int ydir, int rop,
+        unsigned int planemask, int transparency_color)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -290,14 +288,14 @@ BladeSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
 
 #if 0
     if (transparency_color != -1) {
-	BLADE_OUT(0x2168, transparency_color & 0xffffff);
-	pTrident->BltScanDirection |= 1<<6;
+        BLADE_OUT(0x2168, transparency_color & 0xffffff);
+        pTrident->BltScanDirection |= 1<<6;
     }
- 
+
     REPLICATE(planemask);
     if (planemask != (unsigned int)-1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 #endif
     BLADE_OUT(0x2148, XAAGetCopyROP(rop));
@@ -305,7 +303,7 @@ BladeSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
 
 static void
 BladeSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1,
-					int x2, int y2, int w, int h)
+        int x2, int y2, int w, int h)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     int clip = 0;
@@ -315,15 +313,15 @@ BladeSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1,
     BLADE_OUT(0x2144, 0xE0000000 | 1<<19 | 1<<4 | 1<<2 | pTrident->BltScanDirection | clip);
 
     if (pTrident->BltScanDirection) {
-	BLADE_OUT(0x2100, (y1+h-1)<<16 | (x1+w-1));
-	BLADE_OUT(0x2104, y1<<16 | x1);
-	BLADE_OUT(0x2108, (y2+h-1)<<16 | (x2+w-1));
-	BLADE_OUT(0x210C, (y2&0xfff)<<16 | (x2&0xfff));
+        BLADE_OUT(0x2100, (y1+h-1)<<16 | (x1+w-1));
+        BLADE_OUT(0x2104, y1<<16 | x1);
+        BLADE_OUT(0x2108, (y2+h-1)<<16 | (x2+w-1));
+        BLADE_OUT(0x210C, (y2&0xfff)<<16 | (x2&0xfff));
     } else {
-	BLADE_OUT(0x2100, y1<<16 | x1);
-	BLADE_OUT(0x2104, (y1+h-1)<<16 | (x1+w-1));
-	BLADE_OUT(0x2108, y2<<16 | x2);
-	BLADE_OUT(0x210C, ((y2+h-1)&0xfff)<<16 | ((x2+w-1)&0xfff));
+        BLADE_OUT(0x2100, y1<<16 | x1);
+        BLADE_OUT(0x2104, (y1+h-1)<<16 | (x1+w-1));
+        BLADE_OUT(0x2108, y2<<16 | x2);
+        BLADE_OUT(0x210C, ((y2+h-1)&0xfff)<<16 | ((x2+w-1)&0xfff));
     }
 }
 
@@ -343,11 +341,11 @@ BladeDisableClipping(ScrnInfoPtr pScrn)
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     pTrident->Clipping = FALSE;
 }
-    
+
 #if 0
 static void
 BladeSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-					 int rop, unsigned int planemask)
+        int rop, unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -357,12 +355,12 @@ BladeSetupForSolidLine(ScrnInfoPtr pScrn, int color,
     pTrident->BltScanDirection = 0;
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 }
 
-static void 
+static void
 BladeSubsequentSolidBresenhamLine( ScrnInfoPtr pScrn,
         int x, int y, int dmaj, int dmin, int e, int len, int octant)
 {
@@ -370,38 +368,37 @@ BladeSubsequentSolidBresenhamLine( ScrnInfoPtr pScrn,
     int tmp;
     int D = 0, E = 0, ymajor = 0;
 
-
     BLADE_OUT(0x2144, 0x20000000 | 3<<19 | 1<<4 | 2<<2 | (pTrident->Clipping ? 1: 0));
 
     if (!(octant & YMAJOR)) {
-    	if ((!(octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 1; D = 0;}
-    	if ((!(octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 1; D = 1;}
-    	if (( (octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 1; D = 2;}
-    	if (( (octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 1; D = 3;}
-	ymajor = 0;
+        if ((!(octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 1; D = 0;}
+        if ((!(octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 1; D = 1;}
+        if (( (octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 1; D = 2;}
+        if (( (octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 1; D = 3;}
+        ymajor = 0;
     } else {
-    	if ((!(octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 0; D = 0;}
-    	if ((!(octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 0; D = 2;}
-    	if (( (octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 0; D = 1;}
-    	if (( (octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 0; D = 3;}
-	ymajor = 1<<21;
+        if ((!(octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 0; D = 0;}
+        if ((!(octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 0; D = 2;}
+        if (( (octant&XDECREASING)) && (!(octant&YDECREASING))) {E = 0; D = 1;}
+        if (( (octant&XDECREASING)) && ( (octant&YDECREASING))) {E = 0; D = 3;}
+        ymajor = 1<<21;
     }
 
-    if (E) { 
-	tmp = x; x = y; y = tmp; 
+    if (E) {
+        tmp = x; x = y; y = tmp;
     }
     BLADE_OUT(0x2130, 0x00000001);
     if (D&0x02) {
-    BLADE_OUT(0x213C, 0x10000000 | 1<<25 | 1<<19 | 1<<17 | ymajor | ((x+len-1)<<4));
+        BLADE_OUT(0x213C, 0x10000000 | 1<<25 | 1<<19 | 1<<17 | ymajor | ((x+len-1)<<4));
     } else {
-    BLADE_OUT(0x213C, 0x10000000 | 1<<25 | 1<<19 | 1<<17 | ymajor | ((y+len-1)<<4));
+        BLADE_OUT(0x213C, 0x10000000 | 1<<25 | 1<<19 | 1<<17 | ymajor | ((y+len-1)<<4));
     }
     BLADE_OUT(0x2140, E<<30 | (y&0xfff)<<20 | ((x&0xfff)<<4));
     BLADE_OUT(0x2144, D<<30 | (((dmaj-dmin)&0xfff) << 16) | (-dmin&0xfff));
     BLADE_OUT(0x2148, ((-(dmin+e)&0xfff) << 16));
 }
 
-static void 
+static void
 BladeSubsequentSolidTwoPointLine( ScrnInfoPtr pScrn,
         int x1, int y1, int x2, int y2, int flags)
 {
@@ -409,7 +406,7 @@ BladeSubsequentSolidTwoPointLine( ScrnInfoPtr pScrn,
 
 #if 0
     if (flags & OMIT_LAST)
-	BladeSetClippingRectangle(pScrn,x1,y1,x2-1,y2-1);
+    BladeSetClippingRectangle(pScrn,x1,y1,x2-1,y2-1);
 #endif
 
     BLADE_OUT(0x2144, 0x20000000 | pTrident->BltScanDirection | 1<<19 | 1<<4 | 2<<2);
@@ -419,24 +416,24 @@ BladeSubsequentSolidTwoPointLine( ScrnInfoPtr pScrn,
 
 #if 0
     if (flags & OMIT_LAST)
-	BladeDisableClipping(pScrn);
+    BladeDisableClipping(pScrn);
 #endif
 }
 
 static void
 BladeSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop,
-		unsigned int planemask, int length, unsigned char *pattern)
+        unsigned int planemask, int length, unsigned char *pattern)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     pTrident->LinePattern = *((CARD16 *)pattern) & ((1<<length) - 1);
     switch (length) {
-	case 2:
-	    pTrident->LinePattern = pTrident->LinePattern | (pTrident->LinePattern << 2);
-	case 4:
-	    pTrident->LinePattern = pTrident->LinePattern | (pTrident->LinePattern << 4);
-	case 8:
-	    pTrident->LinePattern = pTrident->LinePattern | (pTrident->LinePattern << 8);
+        case 2:
+        pTrident->LinePattern = pTrident->LinePattern | (pTrident->LinePattern << 2);
+        case 4:
+        pTrident->LinePattern = pTrident->LinePattern | (pTrident->LinePattern << 4);
+        case 8:
+        pTrident->LinePattern = pTrident->LinePattern | (pTrident->LinePattern << 8);
     }
 
     REPLICATE(fg);
@@ -447,19 +444,19 @@ BladeSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop,
     pTrident->BltScanDirection = 0;
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 }
 
-static void 
+static void
 BladeSubsequentDashedTwoPointLine( ScrnInfoPtr pScrn,
         int x1, int y1, int x2, int y2, int flags, int phase)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     if (flags & OMIT_LAST)
-	BladeSetClippingRectangle(pScrn,x1,y1,x2-1,y2-1);
+    BladeSetClippingRectangle(pScrn,x1,y1,x2-1,y2-1);
 
     BLADE_OUT(0x216C, (pTrident->LinePattern >> phase) | (pTrident->LinePattern << (16-phase)));
     BLADE_OUT(0x2144, 0x20000000 | pTrident->BltScanDirection | 1<<27 | 1<<19 | 1<<4 | 2<<2);
@@ -467,13 +464,13 @@ BladeSubsequentDashedTwoPointLine( ScrnInfoPtr pScrn,
     BLADE_OUT(0x210C, (y2&0xfff)<<16 | (x2&0xfff));
 
     if (flags & OMIT_LAST)
-	BladeDisableClipping(pScrn);
+    BladeDisableClipping(pScrn);
 }
 #endif
 
 static void
-BladeSetupForFillRectSolid(ScrnInfoPtr pScrn, int color, 
-				    int rop, unsigned int planemask)
+BladeSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
+        int rop, unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -484,8 +481,8 @@ BladeSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
 #if 0
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 #endif
 }
@@ -501,10 +498,10 @@ BladeSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
 }
 
 #if 0
-static void 
+static void
 BladeSetupForScreenToScreenColorExpand(ScrnInfoPtr pScrn,
-    int fg, int bg, int rop,
-    unsigned int planemask)
+        int fg, int bg, int rop,
+        unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -518,59 +515,59 @@ BladeSetupForScreenToScreenColorExpand(ScrnInfoPtr pScrn,
     pTrident->BltScanDirection = 0;
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 }
 
-static void 
+static void
 BladeSubsequentScreenToScreenColorExpand(ScrnInfoPtr pScrn,
-    int x, int y, int w, int h, int srcx, int srcy, int offset)
+        int x, int y, int w, int h, int srcx, int srcy, int offset)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
-	IMAGE_OUT(0x00, srcy<<16 | srcx);
-	IMAGE_OUT(0x04, (srcy+h-1)<<16 | (srcx+w-1));
-	IMAGE_OUT(0x08, y<<16 | x);
-	IMAGE_OUT(0x0C, (y+h-1)<<16 | (x+w-1));
+    IMAGE_OUT(0x00, srcy<<16 | srcx);
+    IMAGE_OUT(0x04, (srcy+h-1)<<16 | (srcx+w-1));
+    IMAGE_OUT(0x08, y<<16 | x);
+    IMAGE_OUT(0x0C, (y+h-1)<<16 | (x+w-1));
 
     IMAGE_OUT(0x24, 0x80000000 | 3<<22 | 1<<7 | pTrident->BltScanDirection | (pTrident->ROP == GXcopy ? 0 : 1<<10) | offset<<25);
 }
 #endif
 
-static void 
+static void
 BladeSetupForCPUToScreenColorExpand(ScrnInfoPtr pScrn,
-    int fg, int bg, int rop,
-    unsigned int planemask)
+        int fg, int bg, int rop,
+        unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     pTrident->BltScanDirection = 0;
     BLADE_OUT(0x2148, XAAGetCopyROP(rop));
     if (bg == -1) {
-	pTrident->BltScanDirection |= 2<<19;
-    	REPLICATE(fg);
-    	BLADE_OUT(0x2160, fg);
-    	BLADE_OUT(0x2164, ~fg);
-    } else { 
-	pTrident->BltScanDirection |= 3<<19;
-    	REPLICATE(fg);
-    	REPLICATE(bg);
-    	BLADE_OUT(0x2160, fg);
-    	BLADE_OUT(0x2164, bg);
+        pTrident->BltScanDirection |= 2<<19;
+        REPLICATE(fg);
+        BLADE_OUT(0x2160, fg);
+        BLADE_OUT(0x2164, ~fg);
+    } else {
+        pTrident->BltScanDirection |= 3<<19;
+        REPLICATE(fg);
+        REPLICATE(bg);
+        BLADE_OUT(0x2160, fg);
+        BLADE_OUT(0x2164, bg);
     }
 #if 0
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 #endif
 }
 
 static void
 BladeSubsequentCPUToScreenColorExpand(ScrnInfoPtr pScrn,
-	int x, int y, int w, int h, int skipleft)
+        int x, int y, int w, int h, int skipleft)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -580,11 +577,11 @@ BladeSubsequentCPUToScreenColorExpand(ScrnInfoPtr pScrn,
     BLADE_OUT(0x210C, ((y+h-1)&0xfff)<<16 | ((x+w-1)&0xfff));
 }
 
-static void 
-BladeSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
-					   int patternx, int patterny, 
-					   int fg, int bg, int rop,
-					   unsigned int planemask)
+static void
+BladeSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
+        int patternx, int patterny,
+        int fg, int bg, int rop,
+        unsigned int planemask)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
@@ -592,40 +589,40 @@ BladeSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
     BLADE_OUT(0x2148, XAAGetPatternROP(rop));
 
     if (bg == -1) {
-    REPLICATE(fg);
-    BLADE_OUT(0x216C, 0x80000000 | 1<<30);
-    BLADE_OUT(0x216C, 0x80000000 | 1<<28 | 1<<30);
-    BLADE_OUT(0x2170, patternx);
-    BLADE_OUT(0x2170, patterny);
-    BLADE_OUT(0x2174, fg);
+        REPLICATE(fg);
+        BLADE_OUT(0x216C, 0x80000000 | 1<<30);
+        BLADE_OUT(0x216C, 0x80000000 | 1<<28 | 1<<30);
+        BLADE_OUT(0x2170, patternx);
+        BLADE_OUT(0x2170, patterny);
+        BLADE_OUT(0x2174, fg);
 #if 0
-    BLADE_OUT(0x2178, ~fg);
+        BLADE_OUT(0x2178, ~fg);
 #endif
     } else {
-    REPLICATE(fg);
-    REPLICATE(bg);
-    BLADE_OUT(0x216C, 0x80000000);
-    BLADE_OUT(0x216C, 0x80000000 | 1<<28);
-    BLADE_OUT(0x2170, patternx);
-    BLADE_OUT(0x2170, patterny);
-    BLADE_OUT(0x2174, fg);
-    BLADE_OUT(0x2178, bg);
+        REPLICATE(fg);
+        REPLICATE(bg);
+        BLADE_OUT(0x216C, 0x80000000);
+        BLADE_OUT(0x216C, 0x80000000 | 1<<28);
+        BLADE_OUT(0x2170, patternx);
+        BLADE_OUT(0x2170, patterny);
+        BLADE_OUT(0x2174, fg);
+        BLADE_OUT(0x2178, bg);
     }
     pTrident->BltScanDirection = 0;
 #if 0
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 #endif
 }
 
-static void 
-BladeSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, 	
-				   int patternx, int patterny,
-				   int x, int y,
-				   int w, int h)
+static void
+BladeSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
+        int patternx, int patterny,
+        int x, int y,
+        int w, int h)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
     int clip = 0;
@@ -637,38 +634,38 @@ BladeSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
 }
 
 #if 0
-static void 
-BladeSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, 
-					   int patternx, int patterny, 
-					   int rop,
-					   unsigned int planemask,
-					   int transparency_color)
+static void
+BladeSetupForColor8x8PatternFill(ScrnInfoPtr pScrn,
+        int patternx, int patterny,
+        int rop,
+        unsigned int planemask,
+        int transparency_color)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     TGUI_PATLOC(((patterny * pScrn->displayWidth * pScrn->bitsPerPixel / 8) +
-		 (patternx * pScrn->bitsPerPixel / 8)) >> 6);
+                    (patternx * pScrn->bitsPerPixel / 8)) >> 6);
     pTrident->BltScanDirection = 0;
     if (transparency_color != -1) {
-	BLADE_OUT(0x2168, transparency_color & 0xffffff);
-	pTrident->BltScanDirection |= 1<<6;
+        BLADE_OUT(0x2168, transparency_color & 0xffffff);
+        pTrident->BltScanDirection |= 1<<6;
     }
     TGUI_FMIX(XAAGetPatternROP(rop));
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 }
 
-static void 
-BladeSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, 	
-				   int patternx, int patterny,
-				   int x, int y,
-				   int w, int h)
+static void
+BladeSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn,
+        int patternx, int patterny,
+        int x, int y,
+        int w, int h)
 {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-  
+
     TGUI_DEST_XY(x,y);
     TGUI_DIM_XY(w,h);
     TGUI_COMMAND(GE_BLT);
@@ -676,13 +673,13 @@ BladeSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn,
 }
 #endif
 
-static void BladeSetupForImageWrite(	
-   ScrnInfoPtr pScrn,
-   int rop,
-   unsigned int planemask,
-   int transparency_color,
-   int bpp, int depth
-){
+static void BladeSetupForImageWrite(
+        ScrnInfoPtr pScrn,
+        int rop,
+        unsigned int planemask,
+        int transparency_color,
+        int bpp, int depth
+) {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     BLADE_OUT(0x2148, XAAGetCopyROP(rop));
@@ -690,17 +687,17 @@ static void BladeSetupForImageWrite(
 #if 0
     REPLICATE(planemask);
     if (planemask != -1) {
-	BLADE_OUT(0x2184, ~planemask);
-	pTrident->BltScanDirection |= 1<<5;
+        BLADE_OUT(0x2184, ~planemask);
+        pTrident->BltScanDirection |= 1<<5;
     }
 #endif
 }
 
 static void BladeSubsequentImageWriteRect(
-   ScrnInfoPtr pScrn,
-   int x, int y, int w, int h,
-   int skipleft
-){
+        ScrnInfoPtr pScrn,
+        int x, int y, int w, int h,
+        int skipleft
+) {
     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
     if (skipleft) BladeSetClippingRectangle(pScrn,x+skipleft,y,(x+w-1),(y+h-1));
-- 
2.7.4



More information about the xorg-devel mailing list