[PATCH xf86-video-trident v2 3/3] Rename xp4_accel_exa.c to xp4_exa.c

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am| 2 +-
 src/{xp4_accel_exa.c => xp4_exa.c} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename src/{xp4_accel_exa.c => xp4_exa.c} (100%)

diff --git a/src/Makefile.am b/src/Makefile.am
index e340c53..e2f2bd6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,5 +49,5 @@ trident_drv_la_SOURCES = \
 trident_video.c \
 tvga_dac.c \
 xp_xaa.c \
-xp4_accel_exa.c \
+xp4_exa.c \
 xp4_xaa.c
diff --git a/src/xp4_accel_exa.c b/src/xp4_exa.c
similarity index 100%
rename from src/xp4_accel_exa.c
rename to src/xp4_exa.c
-- 
2.17.1

___
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 v2 2/3] Fix indentation of xp4_accel_exa.c

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/xp4_accel_exa.c | 139 ++--
 1 file changed, 84 insertions(+), 55 deletions(-)

diff --git a/src/xp4_accel_exa.c b/src/xp4_accel_exa.c
index bb58c13..9bd3381 100644
--- a/src/xp4_accel_exa.c
+++ b/src/xp4_accel_exa.c
@@ -43,57 +43,65 @@ static int ropcode;
 
 static int CopyROP[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 */
+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 PatternROP[16]=
 {
-   ROP_0,
-   ROP_DPa,
-   ROP_PDna,
-   ROP_P,
-   ROP_DPna,
-   ROP_D,
-   ROP_DPx,
-   ROP_DPo,
-   ROP_DPon,
-   ROP_PDxn,
-   ROP_Dn,
-   ROP_PDno,
-   ROP_Pn,
-   ROP_DPno,
-   ROP_DPan,
-   ROP_1
+ROP_0,
+ROP_DPa,
+ROP_PDna,
+ROP_P,
+ROP_DPna,
+ROP_D,
+ROP_DPx,
+ROP_DPo,
+ROP_DPon,
+ROP_PDxn,
+ROP_Dn,
+ROP_PDno,
+ROP_Pn,
+ROP_DPno,
+ROP_DPan,
+ROP_1
 };
 
-static int GetCopyROP(int i) {
+static int
+GetCopyROP(int i)
+{
 return CopyROP[i];
 }
 
-static int GetPatternROP(int i) {
+static int
+GetPatternROP(int i)
+{
 return PatternROP[i];
 }
 
-static void XP4WaitMarker(ScreenPtr pScreen, int Marker) {
+static void
+XP4WaitMarker(ScreenPtr pScreen, int Marker)
+{
 /* Don't need a wait marker as we need to sync on all operations */
 }
 
-static void XP4Done(PixmapPtr p) {
+static void
+XP4Done(PixmapPtr p)
+{
 ScrnInfoPtr pScrn = xf86ScreenToScrn(p->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 int count = 0, timeout = 0;
@@ -104,6 +112,7 @@ static void XP4Done(PixmapPtr p) {
 if (busy != GE_BUSY) {
 return;
 }
+
 count++;
 if (count == 1000) {
 ErrorF("XP: BitBLT engine time-out.\n");
@@ -118,8 +127,10 @@ static void XP4Done(PixmapPtr p) {
 }
 }
 
-static Bool XP4PrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask,
-Pixel fg) {
+static Bool
+XP4PrepareSolid(PixmapPtr pPixmap,
+int alu, Pixel planemask, Pixel fg)
+{
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 unsigned int dorg = exaGetPixmapOffset(pPixmap);
@@ -139,7 +150,11 @@ static Bool XP4PrepareSolid(PixmapPtr pPixmap, int alu, 
Pixel planemask,
 return TRUE;
 }
 
-static void XP4Solid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2) {
+static void
+XP4Solid(PixmapPtr pPixmap,
+int x1, int y1,
+int x2, int y2)
+{
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 int bpp;
@@ -156,14 +171,20 @@ static void XP4Solid(PixmapPtr pPixmap, int x1, int y1, 
int x2, int y2) {
 break;
 }
 
-MMIO_OUT32(pTrident->IOBase, 0x2138, x1 << 16 | y1);
-MMIO_OUT32(pTrident->IOBase, 0x2140, (x2 - x1) << 16 | (y2 - y1));
+MMIO_OUT32(pTrident->IOBase, 0x2138, (x1 << 16) | y1);
+MMIO_OUT32(pTrident->IOBase, 0x2140, ((x2 - x1) << 16) |
+(y2 - y1));
 MMIO_OUT32(pTrident->IOBase, 0x2124,
-GetPatternROP(ropcode) << 24 | bpp << 8 | 2);
+(GetPatternROP(ropcode) << 24) |
+(bpp << 8) |
+2);
 }
 
-static Bool XP4PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx,
-int dy, int alu, Pixel planemask) {
+static Bool
+XP4PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap,
+int dx, int dy,
+int alu, Pixel planemask)
+{
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pDstPixmap->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 unsigned int sorg = exaGetPixmapOffset(pSrcPixmap);
@@ -188,8 +209,12 @@ static Bool 

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

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/xp4_accel_exa.c | 151 +---
 1 file changed, 71 insertions(+), 80 deletions(-)

diff --git a/src/xp4_accel_exa.c b/src/xp4_accel_exa.c
index 7a7b4d3..bb58c13 100644
--- a/src/xp4_accel_exa.c
+++ b/src/xp4_accel_exa.c
@@ -81,58 +81,52 @@ static int PatternROP[16]=
ROP_1
 };
 
-static int GetCopyROP(int i)
-{
+static int GetCopyROP(int i) {
 return CopyROP[i];
 }
 
-static int GetPatternROP(int i)
-{
+static int GetPatternROP(int i) {
 return PatternROP[i];
 }
 
-static void
-XP4WaitMarker(ScreenPtr pScreen, int Marker)
-{
-   /* Don't need a wait marker as we need to sync on all operations */
+static void XP4WaitMarker(ScreenPtr pScreen, int Marker) {
+/* Don't need a wait marker as we need to sync on all operations */
 }
 
-static void
-XP4Done(PixmapPtr p) {
+static void XP4Done(PixmapPtr p) {
 ScrnInfoPtr pScrn = xf86ScreenToScrn(p->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 int count = 0, timeout = 0;
 int busy;
 
 for (;;) {
-   BLTBUSY(busy);
-   if (busy != GE_BUSY) {
-   return;
-   }
-   count++;
-   if (count == 1000) {
-   ErrorF("XP: BitBLT engine time-out.\n");
-   count = 999;
-   timeout++;
-   if (timeout == 4) {
-   /* Reset BitBLT Engine */
-   TGUI_STATUS(0x00);
-   return;
-   }
-   }
+BLTBUSY(busy);
+if (busy != GE_BUSY) {
+return;
+}
+count++;
+if (count == 1000) {
+ErrorF("XP: BitBLT engine time-out.\n");
+count = 999;
+timeout++;
+if (timeout == 4) {
+/* Reset BitBLT Engine */
+TGUI_STATUS(0x00);
+return;
+}
+}
 }
 }
 
-static Bool
-XP4PrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
-{
+static Bool XP4PrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask,
+Pixel fg) {
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 unsigned int dorg = exaGetPixmapOffset(pPixmap);
 unsigned int dptch = exaGetPixmapPitch(pPixmap);
 
 if (planemask != -1)
-   return FALSE;
+return FALSE;
 
 ropcode = alu;
 
@@ -140,39 +134,36 @@ XP4PrepareSolid(PixmapPtr pPixmap, int alu, Pixel 
planemask, Pixel fg)
 
 REPLICATE(fg);
 MMIO_OUT32(pTrident->IOBase, 0x2158, fg);
-MMIO_OUT32(pTrident->IOBase, 0x2128, 1<<14);
+MMIO_OUT32(pTrident->IOBase, 0x2128, 1 << 14);
 
 return TRUE;
 }
 
-static void
-XP4Solid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2)
-{
+static void XP4Solid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2) {
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 int bpp;
-
+
 switch (pPixmap->drawable.bitsPerPixel) {
-   case 8:
-   bpp = 0x40;
-   break;
-   case 16:
-   bpp = 0x41;
-   break;
-   case 32:
-   bpp = 0x42;
-   break;
+case 8:
+bpp = 0x40;
+break;
+case 16:
+bpp = 0x41;
+break;
+case 32:
+bpp = 0x42;
+break;
 }
 
-MMIO_OUT32(pTrident->IOBase, 0x2138, x1<<16 | y1);
-MMIO_OUT32(pTrident->IOBase, 0x2140, (x2-x1)<<16 | (y2-y1));
-MMIO_OUT32(pTrident->IOBase, 0x2124, GetPatternROP(ropcode) << 24 | bpp << 
8 | 2);
+MMIO_OUT32(pTrident->IOBase, 0x2138, x1 << 16 | y1);
+MMIO_OUT32(pTrident->IOBase, 0x2140, (x2 - x1) << 16 | (y2 - y1));
+MMIO_OUT32(pTrident->IOBase, 0x2124,
+GetPatternROP(ropcode) << 24 | bpp << 8 | 2);
 }
 
-static Bool
-XP4PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx, int dy,
-int alu, Pixel planemask)
-{
+static Bool XP4PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx,
+int dy, int alu, Pixel planemask) {
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pDstPixmap->drawable.pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 unsigned int sorg = exaGetPixmapOffset(pSrcPixmap);
@@ -181,11 +172,13 @@ XP4PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr 
pDstPixmap, int dx, int dy,
 unsigned int dptch = exaGetPixmapPitch(pDstPixmap);
 
 if (planemask != -1)
-   return FALSE;
+return FALSE;
 
 pTrident->BltScanDirection = 0;
-if (dx < 0) pTrident->BltScanDirection |= XNEG;
-if (dy < 0) pTrident->BltScanDirection |= YNEG;
+if (dx < 0)
+pTrident->BltScanDirection |= XNEG;
+if (dy < 0)
+pTrident->BltScanDirection |= YNEG;
 
 ropcode = alu;
 
@@ -195,49 +188,47 @@ XP4PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr 
pDstPixmap, int dx, int dy,
 return TRUE;
 }
 
-static void
-XP4Copy(PixmapPtr pDstPixmap, int x1, int y1, int x2, int y2, int w, int h)
-{

[PATCH xf86-video-trident v2 0/3] Convert xp4_accel_exa.c to xp4_exa.c

2019-03-05 Thread Kevin Brace
v2: Small changes to src/Makefile.am

--
Kevin Brace (3):
  Tab to spaces conversion for xp4_accel_exa.c
  Fix indentation of xp4_accel_exa.c
  Rename xp4_accel_exa.c to xp4_exa.c

 src/Makefile.am|   2 +-
 src/{xp4_accel_exa.c => xp4_exa.c} | 208 -
 2 files changed, 115 insertions(+), 95 deletions(-)
 rename src/{xp4_accel_exa.c => xp4_exa.c} (58%)

-- 
2.17.1

___
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 v2 3/4] Suppress unused function compilation warnings for XP4 XAA functions

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/xp4_accel.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/xp4_accel.c b/src/xp4_accel.c
index 949c415..be393f4 100644
--- a/src/xp4_accel.c
+++ b/src/xp4_accel.c
@@ -65,10 +65,10 @@ static void XP4SubsequentSolidBresenhamLine(ScrnInfoPtr 
pScrn,
 int dmaj, int dmin,
 int e, int len,
 int octant);
-#endif
 static void XP4SubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
 int x, int y,
 int len, int dir);
+#endif
 static void XP4SetupForFillRectSolid(ScrnInfoPtr pScrn,
 int color,
 int rop,
@@ -96,6 +96,7 @@ static void XP4SubsequentMono8x8PatternFillRect(ScrnInfoPtr 
pScrn,
 int patterny,
 int x, int y,
 int w, int h);
+#if 0
 static void XP4SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
 int fg, int bg,
 int rop,
@@ -104,6 +105,7 @@ static void 
XP4SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
 int x, int y,
 int w, int h,
 int skipleft);
+#endif
 
 static int bpp;
 static int ropcode;
@@ -349,7 +351,6 @@ XP4SubsequentSolidBresenhamLine(ScrnInfoPtr pScrn,
 TGUI_COMMAND(GE_BRESLINE);
 XP4Sync(pScrn);
 }
-#endif
 
 static void
 XP4SubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
@@ -371,7 +372,6 @@ XP4SubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
 XP4Sync(pScrn);
 }
 
-#if 0
 void
 XP4SetupForDashedLine(ScrnInfoPtr pScrn,
 int fg, int bg,
@@ -472,7 +472,7 @@ XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn,
 2);
 }
 
-#if 1
+#if 0
 static void
 MoveDWORDS(register CARD32* dest,
 register CARD32* src,
@@ -503,7 +503,7 @@ MoveDWORDS(register CARD32* dest,
 }
 #endif
 
-#if 1
+#if 0
 static void
 MoveDWORDS_FixedBase(register CARD32* dest,
 register CARD32* src,
@@ -573,7 +573,7 @@ XP4SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
 2);
 }
 
-#if 1
+#if 0
 static void
 XP4SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
 int fg, int bg,
-- 
2.17.1

___
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 v2 1/4] Tab to spaces conversion for xp4_accel.c

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/xp4_accel.c | 432 
 1 file changed, 214 insertions(+), 218 deletions(-)

diff --git a/src/xp4_accel.c b/src/xp4_accel.c
index cc739cf..8ea3697 100644
--- a/src/xp4_accel.c
+++ b/src/xp4_accel.c
@@ -42,44 +42,44 @@
 
 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);
+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 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);
+int len, int dir);
 static void XP4SetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-   int y, int w, int h);
+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);
-static void XP4SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
-   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);
+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);
+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);
+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);
+ScrnInfoPtr pScrn, int x,
+int y, int w, int h, int skipleft);
 
 static int bpp;
 static int ropcode;
@@ -96,51 +96,49 @@ XP4InitializeAccelerator(ScrnInfoPtr pScrn)
 CHECKCLIPPING;
 
 switch (pScrn->bitsPerPixel) {
-   case 8:
-   default:/* Muffle compiler */
-   shift = 18;
-   break;
-   case 16:
-   shift = 19;
-   break;
-   case 32:
-   shift = 20;
-   break;
+case 8:
+default: /* Muffle compiler */
+shift = 18;
+break;
+case 16:
+shift = 19;
+break;
+case 32:
+shift = 20;
+break;
 }
-
+
 switch (pScrn->bitsPerPixel) {
-   case 8:
-   bpp = 0x40;
-   break;
-   case 16:
-   bpp = 0x41;
-   break;
-   case 32:
-   bpp = 0x42;
-   break;
+case 8:
+bpp = 0x40;
+break;
+case 16:
+bpp = 0x41;
+break;
+case 32:
+bpp = 0x42;
+break;
 }
 MMIO_OUT32(pTrident->IOBase, 0x2154, (pScrn->displayWidth) << shift);
 MMIO_OUT32(pTrident->IOBase, 0x2150, (pScrn->displayWidth) << shift);
 }
 #endif
 
-Bool

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

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 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, 
- * 
+ *
  * 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,
+ 

[PATCH xf86-video-trident v2 4/4] Rename xp4_accel.c to xp4_xaa.c

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am| 4 ++--
 src/{xp4_accel.c => xp4_xaa.c} | 0
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename src/{xp4_accel.c => xp4_xaa.c} (100%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 7bdad06..e340c53 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,5 +49,5 @@ trident_drv_la_SOURCES = \
 trident_video.c \
 tvga_dac.c \
 xp_xaa.c \
-xp4_accel.c \
-xp4_accel_exa.c
+xp4_accel_exa.c \
+xp4_xaa.c
diff --git a/src/xp4_accel.c b/src/xp4_xaa.c
similarity index 100%
rename from src/xp4_accel.c
rename to src/xp4_xaa.c
-- 
2.17.1

___
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 v2 0/4] Convert xp4_accel.c to xp4_xaa.c

2019-03-05 Thread Kevin Brace
v2: Small changes to src/Makefile.am

--
Kevin Brace (4):
  Tab to spaces conversion for xp4_accel.c
  Fix indentation of xp4_accel.c
  Suppress unused function compilation warnings for XP4 XAA functions
  Rename xp4_accel.c to xp4_xaa.c

 src/Makefile.am |   4 +-
 src/xp4_accel.c | 564 ---
 src/xp4_xaa.c   | 618 
 3 files changed, 620 insertions(+), 566 deletions(-)
 delete mode 100644 src/xp4_accel.c
 create mode 100644 src/xp4_xaa.c

-- 
2.17.1

___
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 3/3] Rename xp_accel.c to xp_xaa.c

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am  | 2 +-
 src/{xp_accel.c => xp_xaa.c} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename src/{xp_accel.c => xp_xaa.c} (100%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 4e5b098..7bdad06 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,6 +48,6 @@ trident_drv_la_SOURCES = \
 trident_tv.c \
 trident_video.c \
 tvga_dac.c \
-xp_accel.c \
+xp_xaa.c \
 xp4_accel.c \
 xp4_accel_exa.c
diff --git a/src/xp_accel.c b/src/xp_xaa.c
similarity index 100%
rename from src/xp_accel.c
rename to src/xp_xaa.c
-- 
2.17.1

___
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 2/3] Fix indentation of xp_accel.c

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/xp_accel.c | 346 +
 1 file changed, 202 insertions(+), 144 deletions(-)

diff --git a/src/xp_accel.c b/src/xp_accel.c
index 401e24f..b6b6006 100644
--- a/src/xp_accel.c
+++ b/src/xp_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, 
- * 
+ *
  * BladeXP accelerated options.
  */
 
@@ -43,46 +45,70 @@
 
 static void XPSync(ScrnInfoPtr pScrn);
 #if 0
-static void XPSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
-int rop, unsigned int planemask, int length,
-unsigned char *pattern);
+static void XPSetupForDashedLine(ScrnInfoPtr pScrn,
+int fg, int bg,
+int rop,
+unsigned int planemask,
+int length,
+unsigned char *pattern);
 static void XPSubsequentDashedBresenhamLine(ScrnInfoPtr pScrn,
-int x, int y, int dmaj, int dmin, int e,
-int len, int octant, int phase);
-static void XPSetupForSolidLine(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 XPSetupForSolidLine(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int planemask);
 static void XPSubsequentSolidBresenhamLine(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 XPSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y,
-int len, int dir);
-static void XPSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-int rop, unsigned int planemask);
-static void XPSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-int y, int w, int h);
+static void XPSubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
+int x, int y,
+int len, int dir);
+static void XPSetupForFillRectSolid(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int 

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

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/xp_accel.c | 451 -
 1 file changed, 224 insertions(+), 227 deletions(-)

diff --git a/src/xp_accel.c b/src/xp_accel.c
index 615428a..401e24f 100644
--- a/src/xp_accel.c
+++ b/src/xp_accel.c
@@ -43,45 +43,45 @@
 
 static void XPSync(ScrnInfoPtr pScrn);
 #if 0
-static void XPSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, 
-   int rop, unsigned int planemask, int length,
-   unsigned char *pattern);
+static void XPSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
+int rop, unsigned int planemask, int length,
+unsigned char *pattern);
 static void XPSubsequentDashedBresenhamLine(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);
 static void XPSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void XPSubsequentSolidBresenhamLine(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 XPSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y,
-   int len, int dir);
+int len, int dir);
 static void XPSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void XPSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-   int y, int w, int h);
+int y, int w, int h);
 static void XPSubsequentScreenToScreenCopy(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 XPSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-   int xdir, int ydir, int rop, 
-unsigned int planemask,
-   int transparency_color);
-static void XPSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, int fg, int bg, 
-   int rop, unsigned int planemask);
-static void XPSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, int x, int y, 
-   int w, int h);
+int xdir, int ydir, int rop,
+unsigned int planemask,
+int transparency_color);
+static void XPSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
+int patternx, int patterny, int fg, int bg,
+int rop, unsigned int planemask);
+static void XPSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
+int patternx, int patterny, int x, int y,
+int w, int h);
 #if 0
 static void XPSetupForScanlineCPUToScreenColorExpandFill(
-   ScrnInfoPtr pScrn,
-   int fg, int bg, int rop, 
-   unsigned int planemask);
+ScrnInfoPtr pScrn,
+int fg, int bg, int rop,
+unsigned int planemask);
 static void XPSubsequentScanlineCPUToScreenColorExpandFill(
-   ScrnInfoPtr pScrn, int x,
-   int y, int w, int h, int skipleft);
+ScrnInfoPtr pScrn, int x,
+int y, int w, int h, int skipleft);
 static void XPSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
 #endif
 
@@ -99,16 +99,16 @@ XPInitializeAccelerator(ScrnInfoPtr pScrn)
 BLADE_XP_OPERMODE(pTrident->EngineOperation);
 pTrident->EngineOperation |= 0x40;
 switch (pScrn->bitsPerPixel) {
-   case 8:
-   default:/* Muffle compiler */
-   shift = 18;
-   break;
-   case 16:
-   shift = 19;
-   break;
-   case 32:
-   shift = 20;
-   break;
+case 8:
+default: /* Muffle compiler */
+shift = 18;
+break;
+case 16:
+shift = 19;
+break;
+case 32:
+shift = 20;
+break;
 }
 MMIO_OUT32(pTrident->IOBase, 0x2154, (pScrn->displayWidth) << shift);
 MMIO_OUT32(pTrident->IOBase, 0x2150, (pScrn->displayWidth) << shift);
@@ -116,23 +116,21 @@ XPInitializeAccelerator(ScrnInfoPtr pScrn)
 }
 #endif
 
-Bool
-XPAccelInit(ScreenPtr pScreen)
-{
+Bool XPAccelInit(ScreenPtr pScreen) {
 #ifdef HAVE_XAA_H
 XAAInfoRecPtr infoPtr;
 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);

[PATCH xf86-video-trident 0/3] Convert xp_accel.c to xp_xaa.c

2019-03-05 Thread Kevin Brace
--   
Kevin Brace (3):
  Tab to spaces conversion for xp_accel.c
  Fix indentation of xp_accel.c
  Rename xp_accel.c to xp_xaa.c

 src/Makefile.am |   2 +-
 src/xp_accel.c  | 598 
 src/xp_xaa.c| 653 
 3 files changed, 654 insertions(+), 599 deletions(-)
 delete mode 100644 src/xp_accel.c
 create mode 100644 src/xp_xaa.c

-- 
2.17.1

___
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] Fix indentation of src/Makefile.am

2019-03-05 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cdb58ab..4e5b098 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,24 +30,24 @@ trident_drv_la_LIBADD = -lm
 trident_drv_ladir = @moduledir@/drivers
 
 trident_drv_la_SOURCES = \
- blade_exa.c \
- blade_xaa.c \
- compat-api.h \
- image_xaa.c \
- tgui_xaa.c \
- trident_bank.c \
- trident_dac.c \
- trident_dga.c \
- trident_driver.c \
- trident.h \
- tridenthelper.c \
-tridentpcirename.h \
- trident_i2c.c \
- trident_regs.h \
- trident_shadow.c \
- trident_tv.c \
- trident_video.c \
- tvga_dac.c \
- xp_accel.c \
-xp4_accel.c \
-xp4_accel_exa.c
+blade_exa.c \
+blade_xaa.c \
+compat-api.h \
+image_xaa.c \
+tgui_xaa.c \
+trident_bank.c \
+trident_dac.c \
+trident_dga.c \
+trident_driver.c \
+trident.h \
+tridenthelper.c \
+tridentpcirename.h \
+trident_i2c.c \
+trident_regs.h \
+trident_shadow.c \
+trident_tv.c \
+trident_video.c \
+tvga_dac.c \
+xp_accel.c \
+xp4_accel.c \
+xp4_accel_exa.c
-- 
2.17.1

___
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

Re: [PATCH libXaw] Add definition of getpagesize(), missing on Windows.

2019-03-05 Thread Alan Coopersmith

What's wrong with it is mainly that the set of people who know about X libraries
on Windows is small, and the set of people who deal with libXaw is small, and
the intersection of those two sets is tiny.   (It also doesn't help that we've
sucked for years at handling patches by email for the unmaintained modules like
libXaw - we're trying to get better with gitlab merge requests now, but we're
still not great - unmaintained modules are still not well maintained.)

I was hoping one of our Windows folks would comment on whether or not that's the
right way to handle this, or if there's some Windows header to include instead.
But if no one pipes up soon, I'll likely just go ahead and push it and see if
anyone complains afterwards that it broke something.

-Alan Coopersmith-   alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/alanc

On 03/ 4/19 06:54 AM, James Larrowe wrote:
Ping. Anything wrong with this? It's only defined in the plugin header files for 
gcc.


On Thu, Feb 28, 2019 at 12:56 PM James R Larrowe > wrote:


Fix build with --enable-selective-werror.

Signed-off-by: James R Larrowe mailto:larrowe.sema...@gmail.com>>
---
  src/OS.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/OS.c b/src/OS.c
index 4c69005..cd0c517 100644
--- a/src/OS.c
+++ b/src/OS.c
@@ -37,6 +37,9 @@ _XawGetPageSize(void)
  #endif

  #ifdef HAVE_GETPAGESIZE
+# if defined(_WIN32)
+extern int getpagesize(void);
+# endif
      if (pagesize == -1)
         pagesize = getpagesize();
  #endif
-- 
2.11.0




___
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





___
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