[PATCH xf86-video-trident 2/3] Fix indentation of blade_accel_exa.c
Signed-off-by: Kevin Brace --- src/blade_accel_exa.c | 157 -- 1 file changed, 100 insertions(+), 57 deletions(-) diff --git a/src/blade_accel_exa.c b/src/blade_accel_exa.c index 9c9efcb..a3e1ea0 100644 --- a/src/blade_accel_exa.c +++ b/src/blade_accel_exa.c @@ -2,23 +2,24 @@ * Copyright 1997-2003 by Alan Hourihane, North Wales, UK. * Copyright (c) 2006, Jesse Barnes * - * 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 the authors not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. The authors make 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 the + * authors not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior + * permission. The authors make no representations about the + * suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THE AUTHORS 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. + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, + * IN NO EVENT SHALL THE AUTHORS 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, * Jesse Barnes @@ -26,7 +27,8 @@ * Trident Blade3D EXA support. * TODO: * Composite hooks (some ops/arg. combos may not be supported) - * Upload/Download from screen (is this even possible with this chip?) + * Upload/Download from screen (is this even possible + *with this chip?) * Fast mixed directoion Blts */ @@ -54,8 +56,8 @@ } else \ if (bpp == 8) { \ r &= 0xFF; \ -r |= (r<<8);\ -r |= (r<<16); \ +r |= (r << 8); \ +r |= (r << 16); \ } \ } @@ -78,11 +80,15 @@ static int rop_table[16] = { ROP_1 /* GXset */ }; -static int GetCopyROP(int rop) { +static int +GetCopyROP(int rop) +{ return rop_table[rop]; } -static unsigned long GetDepth(int depth) { +static unsigned long +GetDepth(int depth) +{ unsigned long ret; switch (depth) { @@ -101,11 +107,14 @@ static unsigned long GetDepth(int depth) { ret = 0; break; } + return ret; } -static Bool PrepareSolid(PixmapPtr pPixmap, int rop, Pixel planemask, -Pixel color) { +static Bool +PrepareSolid(PixmapPtr pPixmap, +int rop, Pixel planemask, Pixel color) +{ TRIDENTPtr pTrident = TRIDENTPTR( xf86ScreenToScrn(pPixmap->drawable.pScreen)); @@ -117,30 +126,43 @@ static Bool PrepareSolid(PixmapPtr pPixmap, int rop, Pixel planemask, return TRUE; } -static void Solid(PixmapPtr pPixmap, int x, int y, int x2, int y2) { +static void +Solid(PixmapPtr pPixmap, +int x, int y, +int x2, int y2) +{ TRIDENTPtr pTrident = TRIDENTPTR( -xf86ScreenToScrn(pPixmap->drawable.pScreen)); +xf86ScreenToScrn(pPixmap->drawable.pScreen)); int dst_stride = (pPixmap->drawable.width + 7) / 8; int dst_off = exaGetPixmapOffset(pPixmap) / 8; BLADE_OUT(GER_DSTBASE0, -GetDepth(pPixmap->drawable.bitsPerPixel) | dst_stride << 20 -| dst_off); +GetDepth(pPixmap->drawable.bitsPerPixel) | +(dst_stride << 20) | +
[PATCH xf86-video-trident 3/3] Rename blade_accel_exa.c to blade_exa.c
Signed-off-by: Kevin Brace --- src/Makefile.am | 2 +- src/blade_accel_exa.c | 333 -- src/blade_exa.c | 333 ++ 3 files changed, 334 insertions(+), 334 deletions(-) delete mode 100644 src/blade_accel_exa.c create mode 100644 src/blade_exa.c diff --git a/src/Makefile.am b/src/Makefile.am index d04dce8..cdb58ab 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,7 +30,7 @@ trident_drv_la_LIBADD = -lm trident_drv_ladir = @moduledir@/drivers trident_drv_la_SOURCES = \ - blade_accel_exa.c \ + blade_exa.c \ blade_xaa.c \ compat-api.h \ image_xaa.c \ diff --git a/src/blade_accel_exa.c b/src/blade_accel_exa.c deleted file mode 100644 index a3e1ea0..000 --- a/src/blade_accel_exa.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright 1997-2003 by Alan Hourihane, North Wales, UK. - * Copyright (c) 2006, Jesse Barnes - * - * 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 the - * authors not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. The authors make no representations about the - * suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL THE AUTHORS 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, - * Jesse Barnes - * - * Trident Blade3D EXA support. - * TODO: - * Composite hooks (some ops/arg. combos may not be supported) - * Upload/Download from screen (is this even possible - *with this chip?) - * Fast mixed directoion Blts - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "xf86.h" -#include "xf86_OSproc.h" - -#include "xf86Pci.h" - -#include "exa.h" - -#include "trident.h" -#include "trident_regs.h" - -#include "xaarop.h" - -#undef REPLICATE -#define REPLICATE(r, bpp) \ -{ \ -if (bpp == 16) {\ -r = ((r & 0x) << 16) | (r & 0x);\ -} else \ -if (bpp == 8) { \ -r &= 0xFF; \ -r |= (r << 8); \ -r |= (r << 16); \ -} \ -} - -static int rop_table[16] = { -ROP_0, /* GXclear */ -ROP_DSa,/* GXand */ -ROP_SDna, /* GXandReverse */ -ROP_S, /* GXcopy */ -ROP_DSna, /* GXandInverted */ -ROP_D, /* GXnoop */ -ROP_DSx,/* GXxor */ -ROP_DSo,/* GXor */ -ROP_DSon, /* GXnor */ -ROP_DSxn, /* GXequiv */ -ROP_Dn, /* GXinvert*/ -ROP_SDno, /* GXorReverse */ -ROP_Sn, /* GXcopyInverted */ -ROP_DSno, /* GXorInverted */ -ROP_DSan, /* GXnand */ -ROP_1 /* GXset */ -}; - -static int -GetCopyROP(int rop) -{ -return rop_table[rop]; -} - -static unsigned long -GetDepth(int depth) -{ -unsigned long ret; - -switch (depth) { -case 8: -ret = 0; -break; -case 15: -ret = 5UL << 29; /* 555 */ -case 16: -ret = 1UL << 29; /* 565 */ -break; -case 32: -ret = 2UL << 29; -break; -default: -ret = 0; -break; -} - -return ret; -} - -static Bool -PrepareSolid(PixmapPtr pPixmap, -int rop, Pixel planemask, Pixel color) -{ -TRIDENTPtr pTrident = TRIDENTPTR( -xf86ScreenToScrn(pPixmap->drawable.pScreen)); - -REPLICATE(color, pPixmap->drawable.bitsPerPixel); -BLADE_OUT(GER_FGCOLOR, color); -BLADE_OUT(GER_ROP, GetCopyROP(rop)); -pTrident->BltScanDirection = 0; - -return TRUE; -} - -static void -Solid(PixmapPtr pPixmap, -int x, int y, -int x2, int y2) -{ -TRIDENTPtr pTrident = TRIDENTPTR( -xf86ScreenToScrn(pPixmap->drawable.pScreen)); -int dst_stride =
[PATCH xf86-video-trident 0/3] Convert blade_accel_exa.c to blade_exa.c
-- Kevin Brace (3): Tab to spaces conversion for blade_accel_exa.c Fix indentation of blade_accel_exa.c Rename blade_accel_exa.c to blade_exa.c src/Makefile.am | 2 +- src/blade_accel_exa.c | 299 src/blade_exa.c | 333 ++ 3 files changed, 334 insertions(+), 300 deletions(-) delete mode 100644 src/blade_accel_exa.c create mode 100644 src/blade_exa.c -- 2.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xf86-video-trident 1/3] Tab to spaces conversion for blade_accel_exa.c
Signed-off-by: Kevin Brace --- src/blade_accel_exa.c | 207 -- 1 file changed, 99 insertions(+), 108 deletions(-) diff --git a/src/blade_accel_exa.c b/src/blade_accel_exa.c index 511e4ad..9c9efcb 100644 --- a/src/blade_accel_exa.c +++ b/src/blade_accel_exa.c @@ -47,71 +47,67 @@ #include "xaarop.h" #undef REPLICATE -#define REPLICATE(r, bpp) \ -{ \ - if (bpp == 16) {\ - r = ((r & 0x) << 16) | (r & 0x);\ - } else \ - if (bpp == 8) { \ - r &= 0xFF; \ - r |= (r<<8);\ - r |= (r<<16); \ - } \ +#define REPLICATE(r, bpp) \ +{ \ +if (bpp == 16) {\ +r = ((r & 0x) << 16) | (r & 0x);\ +} else \ +if (bpp == 8) { \ +r &= 0xFF; \ +r |= (r<<8);\ +r |= (r<<16); \ +} \ } -static int rop_table[16] = -{ - ROP_0, /* GXclear */ - ROP_DSa, /* GXand */ - ROP_SDna,/* GXandReverse */ - ROP_S, /* GXcopy */ - ROP_DSna,/* GXandInverted */ - ROP_D, /* GXnoop */ - ROP_DSx, /* GXxor */ - ROP_DSo, /* GXor */ - ROP_DSon,/* GXnor */ - ROP_DSxn,/* GXequiv */ - ROP_Dn, /* GXinvert*/ - ROP_SDno,/* GXorReverse */ - ROP_Sn, /* GXcopyInverted */ - ROP_DSno,/* GXorInverted */ - ROP_DSan,/* GXnand */ - ROP_1/* GXset */ +static int rop_table[16] = { +ROP_0, /* GXclear */ +ROP_DSa,/* GXand */ +ROP_SDna, /* GXandReverse */ +ROP_S, /* GXcopy */ +ROP_DSna, /* GXandInverted */ +ROP_D, /* GXnoop */ +ROP_DSx,/* GXxor */ +ROP_DSo,/* GXor */ +ROP_DSon, /* GXnor */ +ROP_DSxn, /* GXequiv */ +ROP_Dn, /* GXinvert*/ +ROP_SDno, /* GXorReverse */ +ROP_Sn, /* GXcopyInverted */ +ROP_DSno, /* GXorInverted */ +ROP_DSan, /* GXnand */ +ROP_1 /* GXset */ }; -static int GetCopyROP(int rop) -{ +static int GetCopyROP(int rop) { return rop_table[rop]; } -static unsigned long GetDepth(int depth) -{ +static unsigned long GetDepth(int depth) { unsigned long ret; switch (depth) { case 8: - ret = 0; - break; +ret = 0; +break; case 15: - ret = 5UL << 29; /* 555 */ +ret = 5UL << 29; /* 555 */ case 16: - ret = 1UL << 29; /* 565 */ - break; +ret = 1UL << 29; /* 565 */ +break; case 32: - ret = 2UL << 29; - break; +ret = 2UL << 29; +break; default: - ret = 0; - break; +ret = 0; +break; } return ret; } static Bool PrepareSolid(PixmapPtr pPixmap, int rop, Pixel planemask, -Pixel color) -{ -TRIDENTPtr pTrident = - TRIDENTPTR(xf86ScreenToScrn(pPixmap->drawable.pScreen)); +Pixel color) { +TRIDENTPtr pTrident = TRIDENTPTR( +xf86ScreenToScrn(pPixmap->drawable.pScreen)); REPLICATE(color, pPixmap->drawable.bitsPerPixel); BLADE_OUT(GER_FGCOLOR, color); @@ -121,32 +117,30 @@ static Bool PrepareSolid(PixmapPtr pPixmap, int rop, Pixel planemask, return TRUE; } -static void Solid(PixmapPtr pPixmap, int x, int y, int x2, int y2) -{ -TRIDENTPtr pTrident = - TRIDENTPTR(xf86ScreenToScrn(pPixmap->drawable.pScreen)); +static void Solid(PixmapPtr pPixmap, int x, int y, int x2, int y2) { +TRIDENTPtr pTrident = TRIDENTPTR( +xf86ScreenToScrn(pPixmap->drawable.pScreen)); int dst_stride = (pPixmap->drawable.width + 7) / 8; int dst_off = exaGetPixmapOffset(pPixmap) / 8; -BLADE_OUT(GER_DSTBASE0, GetDepth(pPixmap->drawable.bitsPerPixel) | - dst_stride << 20 | dst_off); +BLADE_OUT(GER_DSTBASE0, +GetDepth(pPixmap->drawable.bitsPerPixel) | dst_stride << 20 +| dst_off); -BLADE_OUT(GER_DRAW_CMD, GER_OP_LINE | pTrident->BltScanDirection | - GER_DRAW_SRC_COLOR |
Re: [PATCH xf86-video-trident 1/3] Tab to spaces conversion for blade_accel.c
maybe it is cheaper to kill the dead code instead of fixing white space ? re, wh > Kevin Brace hat am 21. Februar 2019 um 20:55 geschrieben: > > > Signed-off-by: Kevin Brace > --- > 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
[PATCH xf86-video-trident 2/3] Fix indentation for blade_accel.c
Signed-off-by: Kevin Brace --- src/blade_accel.c | 615 ++ 1 file changed, 385 insertions(+), 230 deletions(-) diff --git a/src/blade_accel.c b/src/blade_accel.c index 86a67a2..128913f 100644 --- a/src/blade_accel.c +++ b/src/blade_accel.c @@ -1,26 +1,28 @@ /* * Copyright 1997-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, - * + * * Trident Blade3D accelerated options. */ @@ -44,66 +46,102 @@ static void BladeSync(ScrnInfoPtr pScrn); #if 0 -static void BladeSetupForSolidLine(ScrnInfoPtr pScrn, int color, -int rop, unsigned int planemask); +static void BladeSetupForSolidLine(ScrnInfoPtr pScrn, +int color, +int rop, +unsigned int planemask); static void BladeSubsequentSolidBresenhamLine(ScrnInfoPtr pScrn, -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); -static void BladeSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, -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 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); +static void BladeSetupForDashedLine(ScrnInfoPtr pScrn, +int fg, int bg, +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); #endif -static void BladeSetupForFillRectSolid(ScrnInfoPtr pScrn, int color, -int rop, unsigned int planemask); -static void BladeSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, -int y, int w, int h); +static
[PATCH xf86-video-trident 3/3] Rename blade_accel.c to blade_xaa.c
Signed-off-by: Kevin Brace --- src/Makefile.am | 2 +- src/blade_accel.c | 863 -- src/blade_xaa.c | 863 ++ 3 files changed, 864 insertions(+), 864 deletions(-) delete mode 100644 src/blade_accel.c create mode 100644 src/blade_xaa.c diff --git a/src/Makefile.am b/src/Makefile.am index f2dc14c..d04dce8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,8 +30,8 @@ trident_drv_la_LIBADD = -lm trident_drv_ladir = @moduledir@/drivers trident_drv_la_SOURCES = \ - blade_accel.c \ blade_accel_exa.c \ + blade_xaa.c \ compat-api.h \ image_xaa.c \ tgui_xaa.c \ diff --git a/src/blade_accel.c b/src/blade_accel.c deleted file mode 100644 index 128913f..000 --- a/src/blade_accel.c +++ /dev/null @@ -1,863 +0,0 @@ -/* - * Copyright 1997-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 - * "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. - * - * Authors: Alan Hourihane, - * - * Trident Blade3D accelerated options. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "xf86.h" -#include "xf86_OSproc.h" - -#include "xf86Pci.h" - -#include "miline.h" - -#include "trident.h" -#include "trident_regs.h" - -#ifdef HAVE_XAA_H -#include "xaarop.h" -#include "xaalocal.h" - -static void BladeSync(ScrnInfoPtr pScrn); -#if 0 -static void BladeSetupForSolidLine(ScrnInfoPtr pScrn, -int color, -int rop, -unsigned int planemask); -static void BladeSubsequentSolidBresenhamLine(ScrnInfoPtr pScrn, -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); -static void BladeSetupForDashedLine(ScrnInfoPtr pScrn, -int fg, int bg, -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); -#endif -static void BladeSetupForFillRectSolid(ScrnInfoPtr pScrn, -int color, -int rop, -unsigned int planemask); -static void BladeSubsequentFillRectSolid(ScrnInfoPtr pScrn, -int x, int y, -int w, int h); -static void BladeSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, -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); -#if 0 -static void BladeSetupForScreenToScreenColorExpand(ScrnInfoPtr pScrn, -
[PATCH xf86-video-trident 0/3] Convert blade_accel.c to blade_xaa.c
-- Kevin Brace (3): Tab to spaces conversion for blade_accel.c Fix indentation for blade_accel.c Rename blade_accel.c to blade_xaa.c src/Makefile.am | 2 +- src/blade_accel.c | 711 src/blade_xaa.c | 863 ++ 3 files changed, 864 insertions(+), 712 deletions(-) delete mode 100644 src/blade_accel.c create mode 100644 src/blade_xaa.c -- 2.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xf86-video-trident 1/3] Tab to spaces conversion for blade_accel.c
Signed-off-by: Kevin Brace --- 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,