Re: [RFC PATCH 2/2] Add official support for SiS[M]662[MX] integrated graphics

2020-01-07 Thread Kevin Brace
Hi Adam,

I am the sole author of the SiS[M]662[MX] (SiS662 from hereon) support addition 
patch.
I did not do much with the code since all I did was to treat SiS662 like SiS761 
without the special memory bandwidth check meant for AMD platform's relatively 
high memory access latency. (Thomas Winischhofer put in such code to cope with 
Xv issues.)
SiS761 is PCIe based, and I assume SiS662 works similarly since it is also PCIe 
based.
The only thing is, I do not own a "functioning" mainboard with SiS662, so I 
need someone else to test patch.
I do own SiS662 based ABIT SG-95 mainboard, but the integrated graphics never 
worked in the first place, and the mainboard completely stopped working several 
years ago.
I still have not obtained any feedback regarding if the patches work in the 
first place.
The motivation behind SiS662 support is the eventual merging of iMedia 
Embedded Linux derived SiS iMedia DDX's SiS671/672 support code into the 
upstream SiS DDX.

http://www.linuxconsulting.ro/xorg-drivers/

I used SiS iMedia DDX from Arch Linux AUR as a starting point rather than the 
original SiS iMedia DDX code.

https://aur.archlinux.org/packages/xf86-video-sisimedia/

It took about 2 weeks, but I got SiS iMedia DDX from Arch Linux AUR to boot X 
Server 1.20.
For testing I used Dell OptiPlex FX160.
VGA works, but DVI does not work currently.
I have spoken with one person who semi-maintains SiS DDX Arch Linux AUR about 
donating 30+ patches needed to get SiS iMedia DDX from Arch Linux AUR to 
compile on X Serve 1.20.
They need additional work, but I should be able to get them cleaned up in about 
a week.
That being said, merging SiS iMedia DDX's SiS671/672 support code into the 
upstream SiS DDX will require some effort since there is some code deviation 
between the two.
Adam, since you mentioned the existence of other SiS 662/671/672 patches 
for SiS DDX, let me know where I can find them.
I will like to at least take a look at them.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


> Sent: Tuesday, January 07, 2020 at 2:13 PM
> From: "Adam Jackson" 
> To: "Kevin Brace" , xorg-devel@lists.x.org
> Cc: "Kevin Brace" 
> Subject: Re: [RFC PATCH 2/2] Add official support for SiS[M]662[MX] 
> integrated graphics
>
> On Wed, 2019-12-25 at 12:52 -0600, Kevin Brace wrote:
> > From: Kevin Brace 
> >
> > Signed-off-by: Kevin Brace 
>
> What's the provenance of these changes? I've seen some hacked packages
> for additional SiS device support but never got around to merging them
> all up, would be good to know where this came from.
>
> > -#define IS_SIS661741760761 (IS_SIS661 || IS_SIS741 || IS_SIS760 || 
> > IS_SIS761)
> > +#define IS_SIS661662741760761   (IS_SIS661 || IS_SIS662 || IS_SIS741 || 
> > IS_SIS760 || IS_SIS761)
> >  #define IS_SIS650740((SiS_Pr->ChipType >= SIS_650) && 
> > (SiS_Pr->ChipType < SIS_330))
> >  #define IS_SIS550650740 (IS_SIS550 || IS_SIS650740)
> > -#define IS_SIS650740661741760761(IS_SIS650 || IS_SIS740 || 
> > IS_SIS661741760761)
> > -#define IS_SIS550650740661741760761 (IS_SIS550 || IS_SIS650740661741760761)
> > +#define IS_SIS650740661662741760761 (IS_SIS650 || IS_SIS740 || 
> > IS_SIS661662741760761)
> > +#define IS_SIS550650740661662741760761  (IS_SIS550 || 
> > IS_SIS650740661662741760761)
>
> Ew.
>
> - ajax
>
>
___
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


[RFC PATCH 2/2] Add official support for SiS[M]662[MX] integrated graphics

2019-12-25 Thread Kevin Brace
From: Kevin Brace 

Signed-off-by: Kevin Brace 
---
 README   | 14 +++---
 man/sis.man  |  5 +++--
 src/init.c   | 18 +++---
 src/init301.c|  3 ++-
 src/initdef.h|  7 ---
 src/sis.h|  6 +++---
 src/sis_driver.c | 13 +
 src/sis_setup.c  |  6 +++---
 src/sis_video.c  | 16 
 src/sis_video.h  |  6 +++---
 src/vgatypes.h   |  1 +
 11 files changed, 54 insertions(+), 41 deletions(-)

diff --git a/README b/README
index 426bdcc..fabb804 100644
--- a/README
+++ b/README
@@ -31,7 +31,7 @@
   o  300 series: SiS 300/305, 540, 630/730

   o  315 series: SiS 315/E/PRO, 55x, 650, 651, M650, 740,
- [M]661&[F/M/G]X, [M]741[GX]
+ [M]661&[F/M/G]X, [M]662[MX], [M]741[GX]

   o  330 series: SiS 330 ("Xabre"), [M]760[GX], [M]761[GX]

@@ -187,12 +187,12 @@
 output, set this option to false.

  Option
-(For SiS 650, M650, 651, 661, 741, 760 with either SiS 301LV,
-302LV or SiS 301C video bridge only) The argument may be "VGA",
-"LCD" or "OFF".  Specifying LCD will force the driver to use the
-VGA controller's CRT1 channel for driving the LCD while CRT2 is
-free for TV usage. "OFF" is the same as setting the option
-ForceCRT1 to "false". Default is VGA.
+(For SiS 650, M650, 651, 661, 662, 741, 760 with either SiS
+301LV, 302LV or SiS 301C video bridge only) The argument may
+be "VGA", "LCD" or "OFF".  Specifying LCD will force the driver
+to use the VGA controller's CRT1 channel for driving the LCD
+while CRT2 is free for TV usage. "OFF" is the same as setting
+the option ForceCRT1 to "false". Default is VGA.

  Option
 Selects the CRT2 output device type. Valid parameters are "LCD",
diff --git a/man/sis.man b/man/sis.man
index 578bb68..6c3294b 100644
--- a/man/sis.man
+++ b/man/sis.man
@@ -29,8 +29,9 @@ driver supports PCI, AGP and PCIe video cards based on the 
following chipsets:
 .B SiS630/730
 .B SiS315/E/H/PRO
 .B SiS550/551/552
-.B SiS650/651/661/741
+.B SiS650/651
 .B SiS330 (Xabre)
+.B SiS661/662/741
 .B SiS760/761
 .B XGI Volari V3/V5/V8
 .B XGI Volari Z7
@@ -44,7 +45,7 @@ for SiS5597/5598, 530/620 and 6326/AGP/DVD
 for SiS300/305, 540 and 630/730
 .PP
 .B 315/330/340 series
-for SiS315, 55x, 330, 661/741/76x (plus M, FX, MX, GX variants thereof), 340
+for SiS315, 55x, 330, 66x/741/76x (plus M, FX, MX, GX variants thereof), 340
 and all XGI chips.
 .PP
 .SH CONFIGURATION DETAILS
diff --git a/src/init.c b/src/init.c
index 538b662..032489e 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1,7 +1,8 @@
 /*
  * Mode initializing code (CRT1 section) for
  * for SiS 300/305/540/630/730,
- * SiS 315/550/[M]650/651/[M]661[FGM]X/[M]74x[GX]/330/[M]76x[GX],
+ * SiS 315/550/[M]650/651
+ * SiS [M]661[FGM]X/[M]662[MX]/[M]74x[GX]/330/[M]76x[GX],
  * XGI Volari V3XT/V5/V8, Z7
  * (Universal module for Linux kernel framebuffer and X.org/XFree86 4.x)
  *
@@ -256,7 +257,7 @@ InitTo310Pointer(struct SiS_Private *SiS_Pr)
} else if(SiS_Pr->ChipType >= SIS_760) {
   SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_760;  /* 760 */
} else if(SiS_Pr->ChipType >= SIS_661) {
-  SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_660;  /* 661/741 */
+  SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_660;  /* 661/662/741 */
} else if(SiS_Pr->ChipType == SIS_330) {
   SiS_Pr->SiS_MCLKData_0 = SiS310_MCLKData_0_330;  /* 330 */
} else if(SiS_Pr->ChipType > SIS_315PRO) {
@@ -,6 +1112,7 @@ SiSInitPCIetc(struct SiS_Private *SiS_Pr)
case SIS_740:
case SIS_330:
case SIS_661:
+   case SIS_662:
case SIS_741:
case SIS_760:
case SIS_761:
@@ -1192,6 +1194,7 @@ SiSSetLVDSetc(struct SiS_Private *SiS_Pr)
if(temp == 3)   SiS_Pr->SiS_IF_DEF_CH70xx = 2;
break;
case SIS_661:
+   case SIS_662:
case SIS_741:
case SIS_760:
case SIS_761:
@@ -1255,8 +1258,9 @@ SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr)
if(SiS_Pr->ChipType >= XGI_20) {
   /* XGI ROMs don't qualify */
   return FALSE;
-   } else if(SiS_Pr->ChipType >= SIS_761) {
-  /* I very much assume 761, 340 and newer will use new layout */
+   } else if ((SiS_Pr->ChipType >= SIS_761) ||
+  (SiS_Pr->ChipType == SIS_662)) {
+  /* I very much assume 662, 761, 340 and newer will use new layout */
   return TRUE;
} else if(SiS_Pr->ChipType >= SIS_661) {
   if((ROMAddr[0x1a] == 'N') &&
@@ -1735,7 +1739,7 @@ SiS_OpenCRTC(struct SiS_Private *SiS_Pr)
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
   if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-   } else if(IS_SIS661741760761) {
+   } else if(IS_SIS661

[RFC PATCH 1/2] Erase references to SiS 670 and 770 chipsets

2019-12-25 Thread Kevin Brace
From: Kevin Brace 

SiS 670 and 770 chipsets were never released, and were likely renamed
to something else.  The SiS 660 reference in the code refers to SiS
661 / 741 / 760 / 761 chipsets.

Signed-off-by: Kevin Brace 
---
 src/init.c   |  8 +++-
 src/initdef.h|  7 +++
 src/sis.h|  2 +-
 src/sis_dac.c|  2 +-
 src/sis_driver.c | 28 +++-
 src/sis_setup.c  | 10 +-
 src/sis_video.c  |  8 
 src/sis_video.h  |  6 +++---
 src/vgatypes.h   |  6 +-
 9 files changed, 24 insertions(+), 53 deletions(-)

diff --git a/src/init.c b/src/init.c
index 4f84b0c..538b662 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1112,7 +1112,6 @@ SiSInitPCIetc(struct SiS_Private *SiS_Pr)
case SIS_330:
case SIS_661:
case SIS_741:
-   case SIS_660:
case SIS_760:
case SIS_761:
case SIS_340:
@@ -1194,7 +1193,6 @@ SiSSetLVDSetc(struct SiS_Private *SiS_Pr)
break;
case SIS_661:
case SIS_741:
-   case SIS_660:
case SIS_760:
case SIS_761:
case SIS_340:
@@ -1737,7 +1735,7 @@ SiS_OpenCRTC(struct SiS_Private *SiS_Pr)
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
   if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
-   } else if(IS_SIS661741660760) {
+   } else if(IS_SIS661741760761) {
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x61,0xf7);
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
   SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
@@ -1753,7 +1751,7 @@ SiS_CloseCRTC(struct SiS_Private *SiS_Pr)
 #if 0 /* This locks some CRTC registers. We don't want that. */
unsigned short temp1 = 0, temp2 = 0;

-   if(IS_SIS661741660760) {
+   if(IS_SIS661741760761) {
   if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
  temp1 = 0xa0; temp2 = 0x08;
   }
@@ -1954,7 +1952,7 @@ SiS_SetATTRegs(struct SiS_Private *SiS_Pr, unsigned short 
StandTableIndex)
}
 } else if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
if(SiS_Pr->ChipType >= SIS_315H) {
-  if(IS_SIS550650740660) {
+  if(IS_SIS550650740661741760761) {
  /* 315, 330 don't do this */
  if(SiS_Pr->SiS_VBType & VB_SIS30xB) {
 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) ARdata = 0;
diff --git a/src/initdef.h b/src/initdef.h
index 62ec836..d078024 100644
--- a/src/initdef.h
+++ b/src/initdef.h
@@ -60,14 +60,13 @@
 #define IS_SIS65x   (IS_SIS651 || IS_SISM650)   /* Only 
special versions of 65x */
 #define IS_SIS661  (SiS_Pr->ChipType == SIS_661)
 #define IS_SIS741  (SiS_Pr->ChipType == SIS_741)
-#define IS_SIS660  (SiS_Pr->ChipType == SIS_660)
 #define IS_SIS760  (SiS_Pr->ChipType == SIS_760)
 #define IS_SIS761  (SiS_Pr->ChipType == SIS_761)
-#define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || 
IS_SIS760 || IS_SIS761)
+#define IS_SIS661741760761 (IS_SIS661 || IS_SIS741 || IS_SIS760 || 
IS_SIS761)
 #define IS_SIS650740((SiS_Pr->ChipType >= SIS_650) && 
(SiS_Pr->ChipType < SIS_330))
 #define IS_SIS550650740 (IS_SIS550 || IS_SIS650740)
-#define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760)
-#define IS_SIS550650740660  (IS_SIS550 || IS_SIS650740660)
+#define IS_SIS650740661741760761(IS_SIS650 || IS_SIS740 || 
IS_SIS661741760761)
+#define IS_SIS550650740661741760761 (IS_SIS550 || IS_SIS650740661741760761)

 #define SISGETROMW(x)  (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8))

diff --git a/src/sis.h b/src/sis.h
index 70a961b..bb5ae9c 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -572,7 +572,7 @@ typedef unsigned char  UChar;
 #define SIS_530_VGA 1
 #define SIS_OLD_VGA 2
 #define SIS_300_VGA 3
-#define SIS_315_VGA 4   /* Includes 330/660/661/741/760/340/761 and M versions 
thereof, XGI */
+#define SIS_315_VGA 4   /* Includes 330/661/741/760/761/340 and M versions 
thereof, XGI */

 /* pSiS->oldChipset */
 #define OC_UNKNOWN   0
diff --git a/src/sis_dac.c b/src/sis_dac.c
index 04276b6..fa34976 100644
--- a/src/sis_dac.c
+++ b/src/sis_dac.c
@@ -1519,7 +1519,7 @@ int SiSMemBandWidth(ScrnInfoPtr pScrn, Bool IsForCRT2)
max = 68;
break;
case PCI_CHIP_SIS660:
-   if((pSiS->ChipType >= SIS_660) &&
+   if((pSiS->ChipType >= SIS_661) &&
   (pSiS->ChipFlags & SiSCF_760LFB)) {
   magic = magicDED[bus/64];
} else {
diff --git a/src/sis_driver.c b/src/sis_driver.c
index 390f887..aa25a99 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -188,7 +188,7 @@ static SymTabRec SISChipsets[] = {
 { PCI_CHIP_SIS550, "SIS550" },
 { PCI_CHIP_SIS650,  "SIS650/M650/651/740" 

[RFC PATCH 0/2] Someone, please test these patches on SiS[M]662[MX]!

2019-12-25 Thread Kevin Brace
From: Kevin Brace 

I do not own a functioning mainboard with SiS[M]662[MX] chipset, so
these patches are untested.
If someone can test the patches on SiS[M]662[MX] integrated graphics,
that will be appreciated.
Arguably, the most famous SiS662 chipset based mainboard is Intel
D201GLY and D201GLY2. (and they do not support ACPI S3 State, so I
took a pass a few years ago)
The patches apply against SiS DDX Version 0.12.1.
If the patches work properly with SiS[M]662[MX], I will likely release
them with SiS DDX Version 0.13.0 soon.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com

--
Kevin Brace (2):
  Erase references to SiS 670 and 770 chipsets
  Add official support for SiS[M]662[MX] integrated graphics

 README   | 14 +++---
 man/sis.man  |  5 +++--
 src/init.c   | 20 +++-
 src/init301.c|  3 ++-
 src/initdef.h|  8 
 src/sis.h|  6 +++---
 src/sis_dac.c|  2 +-
 src/sis_driver.c | 33 -
 src/sis_setup.c  | 12 ++--
 src/sis_video.c  | 22 +++---
 src/sis_video.h  | 12 ++--
 src/vgatypes.h   |  7 ++-
 12 files changed, 64 insertions(+), 80 deletions(-)

--
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-sis 0/6] Minor clean up patches for SiS DDX Version 0.12.1

2019-12-16 Thread Kevin Brace
From: Kevin Brace 

Nothing really changes the functionality of the code.

--

Kevin Brace (6):
  Use unsigned long when performing PCI read / write
  Fix type mismatch compilation warnings when TWDEBUG macro is defined
  Remove unnecessary SiS PCI Device IDs
  Remove a reference to _XF86_PCIINFO_H
  Clean up SiS PCI Device IDs
  Clean up XGI Technology PCI Device IDs

 src/sis.h| 77 ++--
 src/sis_driver.c | 10 
 src/sis_setup.c  | 10 
 3 files changed, 34 insertions(+), 63 deletions(-)

--
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-sis 5/6] Clean up SiS PCI Device IDs

2019-12-16 Thread Kevin Brace
From: Kevin Brace 

Define newer (?) SiS PCI Device IDs without the use of #ifndef.

Signed-off-by: Kevin Brace 
---
 src/sis.h | 32 +---
 1 file changed, 5 insertions(+), 27 deletions(-)

diff --git a/src/sis.h b/src/sis.h
index 321a2bd..2d691a5 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -322,38 +322,16 @@
 #define PCI_CHIP_SIS6326   0x6326
 #define PCI_CHIP_SIS3000x0300
 #define PCI_CHIP_SIS315H   0x0310
+#define PCI_CHIP_SIS3150x0315
 #define PCI_CHIP_SIS315PRO 0x0325
 #define PCI_CHIP_SIS3300x0330
-#define PCI_CHIP_SIS6300x6300
 #define PCI_CHIP_SIS5400x5300
+#define PCI_CHIP_SIS6300x6300
 #define PCI_CHIP_SIS5500x5315
 #define PCI_CHIP_SIS6500x6325
-
-/* For SiS315/550/650/740/330/660 - these should be moved elsewhere! */
-#ifndef PCI_CHIP_SIS315H
-#define PCI_CHIP_SIS315H   0x0310
-#endif
-#ifndef PCI_CHIP_SIS315
-#define PCI_CHIP_SIS3150x0315
-#endif
-#ifndef PCI_CHIP_SIS315PRO
-#define PCI_CHIP_SIS315PRO 0x0325
-#endif
-#ifndef PCI_CHIP_SIS550
-#define PCI_CHIP_SIS5500x5315  /* 550_VGA */
-#endif
-#ifndef PCI_CHIP_SIS650
-#define PCI_CHIP_SIS6500x6325  /* 650_VGA and 740_VGA */
-#endif
-#ifndef PCI_CHIP_SIS330
-#define PCI_CHIP_SIS3300x0330
-#endif
-#ifndef PCI_CHIP_SIS660
-#define PCI_CHIP_SIS6600x6330  /* 661_VGA, 741_VGA, 760_VGA, 
761_VGA */
-#endif
-#ifndef PCI_CHIP_SIS340
-#define PCI_CHIP_SIS3400x0340
-#endif
+#define PCI_CHIP_SIS3300x0330
+#define PCI_CHIP_SIS6600x6330
+#define PCI_CHIP_SIS3400x0340

 #ifndef PCI_VENDOR_XGI
 #define PCI_VENDOR_XGI 0x18ca
--
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-sis 2/6] Fix type mismatch compilation warnings when TWDEBUG macro is defined

2019-12-16 Thread Kevin Brace
From: Kevin Brace 

Signed-off-by: Kevin Brace 
---
 src/sis_driver.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 51c9660..390f887 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -7722,7 +7722,7 @@ SISModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 SiSPostSetMode(pScrn, >ModeReg);

 #ifdef TWDEBUG
-xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VBFlags %lx\n", 
pSiS->VBFlags);
+xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VBFlags %x\n", 
pSiS->VBFlags);
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"REAL REGISTER CONTENTS AFTER SETMODE:\n");
  (*pSiS->ModeInit)(pScrn, mode);
@@ -9752,7 +9752,7 @@ SISAdjustFrame(ADJUST_FRAME_ARGS_DECL)
 base += (pSiS->dhmOffset/4);

 #ifdef TWDEBUG
-xf86DrvMsg(0, 0, "AdjustFrame: x %d y %d bpp %d dw %d base %d, dhmOffset 
%d\n",
+xf86DrvMsg(0, 0, "AdjustFrame: x %d y %d bpp %d dw %d base %lx, dhmOffset 
%d\n",
x, y, pSiS->CurrentLayout.bitsPerPixel, 
pSiS->CurrentLayout.displayWidth, base, pSiS->dhmOffset);
 #endif

@@ -10291,7 +10291,7 @@ SiSEnableTurboQueue(ScrnInfoPtr pScrn)
  pSiS->cmdQueueBase = (unsigned int *)temp;
  outSISIDXREG(SISCR, 0x55, tempCR55);
 #ifdef TWDEBUG
- xf86DrvMsg(0, 0, "CmdQueueOffs 0x%x, CmdQueueAdd %p, shwrp 0x%x, 
status %x, base %p\n",
+ xf86DrvMsg(0, 0, "CmdQueueOffs 0x%x, CmdQueueAdd %p, shwrp 0x%x, 
status %lx, base %p\n",
pSiS->cmdQueueOffset, pSiS->cmdQueueBase, 
*(pSiS->cmdQ_SharedWritePort),
SIS_MMIO_IN32(pSiS->IOBase, 0x85cc), (ULong *)temp);
 #endif
@@ -12999,7 +12999,7 @@ SiSPostSetMode(ScrnInfoPtr pScrn, SISRegPtr sisReg)
NoOverlay ? "no" : ((pSiS->MiscFlags & 
MISC_SIS760ONEOVERLAY) ? "one" : "two"));

 #ifdef TWDEBUG
-  xf86DrvMsg(0, 0, "SiS760: Memclock %d, c1 %d/%d c2 %d/%d, sum %d 
/ %x\n",
+  xf86DrvMsg(0, 0, "SiS760: Memclock %d, c1 %d/%d c2 %d/%d, sum %d 
/ %lx\n",
pSiS->MemClock, myclock1, mycoldepth1,
myclock2, mycoldepth2, dotclocksum, 
pSiS->SiS_SD2_Flags);
 #endif
@@ -13733,7 +13733,7 @@ SiS_CheckModeCRT2(ScrnInfoPtr pScrn, DisplayModePtr 
mode, unsigned int VBFlags,
intj;

 #ifdef TWDEBUG
-   xf86DrvMsg(0, X_INFO, "Inside CheckCalcModeIndex (VBFlags %lx, mode 
%dx%d)\n",
+   xf86DrvMsg(0, X_INFO, "Inside CheckCalcModeIndex (VBFlags %x, mode 
%dx%d)\n",
VBFlags,mode->HDisplay, mode->VDisplay);
 #endif

--
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-sis 1/6] Use unsigned long when performing PCI read / write

2019-12-16 Thread Kevin Brace
From: Kevin Brace 

When thinking about 64-bit ISA environment, 32-bit PCI read / write
should be performed as a unsigned long type.

Signed-off-by: Kevin Brace 
---
 src/sis.h   |  8 
 src/sis_setup.c | 10 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/sis.h b/src/sis.h
index 789b1d6..6861e8e 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -807,7 +807,7 @@ typedef struct {
 UShort ch70xx[64];
 unsigned int sisMMIO85C0;
 UChar  sis6326tv[0x46];
-unsigned int sisRegsPCI50, sisRegsPCIA0;
+unsigned long sisRegsPCI50, sisRegsPCIA0;
 UChar  BIOSModeSave;
 } SISRegRec, *SISRegPtr;

@@ -1621,12 +1621,12 @@ extern int   SiS_GetTVyscale(ScrnInfoPtr pScrn);
 extern int   SiS_GetSISCRT1SaturationGain(ScrnInfoPtr pScrn);
 extern void  SiS_SetSISCRT1SaturationGain(ScrnInfoPtr pScrn, int val);

-extern unsigned int sis_pci_read_device_u32(int device, int offset);
+extern unsigned long sis_pci_read_device_u32(int device, int offset);
 extern unsigned char sis_pci_read_device_u8(int device, int offset);
-extern unsigned int sis_pci_read_host_bridge_u32(int offset);
+extern unsigned long sis_pci_read_host_bridge_u32(int offset);
 extern unsigned char sis_pci_read_host_bridge_u8(int offset);
 extern void sis_pci_write_host_bridge_u8(int offset, unsigned char value);
-extern void sis_pci_write_host_bridge_u32(int offset, unsigned int value);
+extern void sis_pci_write_host_bridge_u32(int offset, unsigned long value);
 #endif  /* _SIS_H_ */


diff --git a/src/sis_setup.c b/src/sis_setup.c
index 355c5ac..562f28d 100644
--- a/src/sis_setup.c
+++ b/src/sis_setup.c
@@ -113,7 +113,7 @@ sis_get_device (int device)
 return bridge;
 }

-unsigned int
+unsigned long
 sis_pci_read_device_u32(int device, int offset)
 {
 struct pci_device *host_bridge = sis_get_device(device);
@@ -134,7 +134,7 @@ sis_pci_read_device_u8(int device, int offset)
 }

 void
-sis_pci_write_host_bridge_u32(int offset, unsigned int value)
+sis_pci_write_host_bridge_u32(int offset, unsigned long value)
 {
 struct pci_device *host_bridge = sis_get_device(0);
 pci_device_cfg_write_u32(host_bridge, value, offset);
@@ -148,7 +148,7 @@ sis_pci_write_host_bridge_u8(int offset, unsigned char 
value)
 }

 #else
-unsigned int
+unsigned long
 sis_pci_read_device_u32(int device, int offset)
 {
 PCITAG tag = pciTag(0, device, 0);
@@ -163,7 +163,7 @@ sis_pci_read_device_u8(int device, int offset)
 }

 void
-sis_pci_write_host_bridge_u32(int offset, unsigned int value)
+sis_pci_write_host_bridge_u32(int offset, unsigned long value)
 {
 pciWriteLong(0x, offset, value);
 }
@@ -177,7 +177,7 @@ sis_pci_write_host_bridge_u8(int offset, unsigned char 
value)

 #endif

-unsigned int
+unsigned long
 sis_pci_read_host_bridge_u32(int offset)
 {
 return sis_pci_read_device_u32(0, offset);
--
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-sis 6/6] Clean up XGI Technology PCI Device IDs

2019-12-16 Thread Kevin Brace
From: Kevin Brace 

Signed-off-by: Kevin Brace 
---
 src/sis.h | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/sis.h b/src/sis.h
index 2d691a5..70a961b 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -333,17 +333,18 @@
 #define PCI_CHIP_SIS6600x6330
 #define PCI_CHIP_SIS3400x0340

-#ifndef PCI_VENDOR_XGI
-#define PCI_VENDOR_XGI 0x18ca
-#endif

-#ifndef PCI_CHIP_XGIXG20
-#define PCI_CHIP_XGIXG20   0x0020
-#endif
+/*
+ * XGI Technology PCI Vendor ID
+ */
+#define PCI_VENDOR_XGI 0x18CA

-#ifndef PCI_CHIP_XGIXG40
+/*
+ * XGI Technology PCI Device ID
+ */
+#define PCI_CHIP_XGIXG20   0x0020
 #define PCI_CHIP_XGIXG40   0x0040
-#endif
+

 /* pSiS->Flags (old series only) */
 #define SYNCDRAM   0x0001
--
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-sis 4/6] Remove a reference to _XF86_PCIINFO_H

2019-12-16 Thread Kevin Brace
From: Kevin Brace 

xf86PciInfo.h was removed long time ago by commit
f6d49466ca538c65fa8c66352e421c2624e204f1.

Signed-off-by: Kevin Brace 
---
 src/sis.h | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/sis.h b/src/sis.h
index c7edfd3..321a2bd 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -302,9 +302,14 @@
 #define SISVERBLEVEL 4
 #endif

-#ifndef _XF86_PCIINFO_H
+/*
+ * SiS PCI Vendor ID
+ */
 #define PCI_VENDOR_SIS 0x1039
-/* SiS */
+
+/*
+ * SiS PCI Device ID
+ */
 #define PCI_CHIP_SG86C201  0x0001
 #define PCI_CHIP_SG86C202  0x0002
 #define PCI_CHIP_SIS5597   0x0200
@@ -324,8 +329,6 @@
 #define PCI_CHIP_SIS5500x5315
 #define PCI_CHIP_SIS6500x6325

-#endif
-
 /* For SiS315/550/650/740/330/660 - these should be moved elsewhere! */
 #ifndef PCI_CHIP_SIS315H
 #define PCI_CHIP_SIS315H   0x0310
--
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


[ANNOUNCE] xf86-video-sis 0.12.0

2019-12-04 Thread Kevin Brace
This release is a maintenance release to support X.Org X Server 1.20.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com

---
Kevin Brace (4):
  Do not call xf86DisableRandR() for X Server 1.20
  Fix for xf86InterceptSigIll() discontinuation in X Server 1.20
  Enable SISGAMMARAMP macro on X.Org X Server
  Version bumped to 0.12.0

git tag: xf86-video-sis-0.12.0

https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.bz2
MD5:  b8ec9c21758043b1480f11baec296f5d  xf86-video-sis-0.12.0.tar.bz2
SHA1: d22f0d0081e222a62f9e788f5e73246c6d339f80  xf86-video-sis-0.12.0.tar.bz2
SHA256: 119d3f17d53c862ec4bf891ed696a6f1d32cdf8bd11d944a9f0ad24625333a5b  
xf86-video-sis-0.12.0.tar.bz2
SHA512: 
5aa101e5217f15667f2c94f7a76f4afcf47717b61f5d206ce65efe35dc3f674ca294f98ca8586971c6467f31decdd94d8255ebfc7dc220fac0179afc61995952
  xf86-video-sis-0.12.0.tar.bz2
PGP:  https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.bz2.sig

https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.gz
MD5:  52d2d74982393c32a0a9c3d5d3ce99a3  xf86-video-sis-0.12.0.tar.gz
SHA1: 1e4dfd77d36973a4218b8d0076d5bef2a0576a16  xf86-video-sis-0.12.0.tar.gz
SHA256: 9bcc3b649001e99eb9b7f64437ee8fd65863d84bd812978fe0269180b2884702  
xf86-video-sis-0.12.0.tar.gz
SHA512: 
ddf83452ec4c1f79f4d926c0b9bb78b0cc6df4a5473b1da00fa4eb28f159491b240205d19d6d82f33169b50539d8982a529020e0d935cdeee8f37dd6bd1ece65
  xf86-video-sis-0.12.0.tar.gz
PGP:  https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.gz.sig

___
xorg-announce mailing list
xorg-announce@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-announce

[ANNOUNCE] xf86-video-sis 0.12.0

2019-12-03 Thread Kevin Brace
This release is a maintenance release to support X.Org X Server 1.20.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com

---
Kevin Brace (4):
  Do not call xf86DisableRandR() for X Server 1.20
  Fix for xf86InterceptSigIll() discontinuation in X Server 1.20
  Enable SISGAMMARAMP macro on X.Org X Server
  Version bumped to 0.12.0

git tag: xf86-video-sis-0.12.0

https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.bz2
MD5:  b8ec9c21758043b1480f11baec296f5d  xf86-video-sis-0.12.0.tar.bz2
SHA1: d22f0d0081e222a62f9e788f5e73246c6d339f80  xf86-video-sis-0.12.0.tar.bz2
SHA256: 119d3f17d53c862ec4bf891ed696a6f1d32cdf8bd11d944a9f0ad24625333a5b  
xf86-video-sis-0.12.0.tar.bz2
SHA512: 
5aa101e5217f15667f2c94f7a76f4afcf47717b61f5d206ce65efe35dc3f674ca294f98ca8586971c6467f31decdd94d8255ebfc7dc220fac0179afc61995952
  xf86-video-sis-0.12.0.tar.bz2
PGP:  https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.bz2.sig

https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.gz
MD5:  52d2d74982393c32a0a9c3d5d3ce99a3  xf86-video-sis-0.12.0.tar.gz
SHA1: 1e4dfd77d36973a4218b8d0076d5bef2a0576a16  xf86-video-sis-0.12.0.tar.gz
SHA256: 9bcc3b649001e99eb9b7f64437ee8fd65863d84bd812978fe0269180b2884702  
xf86-video-sis-0.12.0.tar.gz
SHA512: 
ddf83452ec4c1f79f4d926c0b9bb78b0cc6df4a5473b1da00fa4eb28f159491b240205d19d6d82f33169b50539d8982a529020e0d935cdeee8f37dd6bd1ece65
  xf86-video-sis-0.12.0.tar.gz
PGP:  https://x.org/archive/individual/driver/xf86-video-sis-0.12.0.tar.gz.sig

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

[PATCH xf86-video-sis 2/3] Fix for xf86InterceptSigIll() discontinuation in X Server 1.20

2019-11-26 Thread Kevin Brace
xf86InterceptSigIll() will still be used on X.Org X Server 1.19 or
older.

Signed-off-by: Kevin Brace 
---
 src/sis.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sis.h b/src/sis.h
index b30f7a8..c2da9e1 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -270,7 +270,7 @@

 #undef SISCHECKOSSSE
 #ifdef XORG_VERSION_CURRENT
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)
+#if (XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)) || 
(XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,99,1,0))
 #define SISCHECKOSSSE  /* Automatic check OS for SSE; requires SigIll 
facility */
 #endif
 #endif
--
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-sis 1/3] Do not call xf86DisableRandR() for X Server 1.20

2019-11-26 Thread Kevin Brace
From: Kevin Brace 

This is needed for X Server 1.20 support.

Signed-off-by: Kevin Brace 
---
 src/sis_driver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 8a62572..51c9660 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -8985,7 +8985,7 @@ SISScreenInit(SCREEN_INIT_ARGS_DECL)
 case 24: refreshArea = SISRefreshArea24; break;
 case 32: refreshArea = SISRefreshArea32; break;
  }
-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
+#if (XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)) && 
(GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 24)
  xf86DisableRandR();
  xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Driver rotation enabled, disabling RandR\n");
@@ -8998,7 +8998,7 @@ SISScreenInit(SCREEN_INIT_ARGS_DECL)
  if(!pSiS->PointerMoved) pSiS->PointerMoved = pScrn->PointerMoved;
 pScrn->PointerMoved = SISPointerMovedReflect;
 refreshArea = SISRefreshAreaReflect;
-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
+#if (XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)) && 
(GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 24)
 xf86DisableRandR();
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
  "Driver reflection enabled, disabling RandR\n");
@@ -9109,7 +9109,7 @@ SISScreenInit(SCREEN_INIT_ARGS_DECL)
pSiS->Rotate = 0;
pSiS->Reflect = 0;
pSiS->ShadowFB = FALSE;
-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
+#if (XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)) && 
(GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 24)
if(pSiS->CRT1XOffs || pSiS->CRT1YOffs || pSiS->CRT2XOffs || 
pSiS->CRT2YOffs) {
  xf86DisableRandR();
  xf86DrvMsg(pScrn->scrnIndex, X_INFO,
--
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-sis 3/3] Enable SISGAMMARAMP macro on X.Org X Server

2019-11-26 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/sis.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sis.h b/src/sis.h
index c2da9e1..789b1d6 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -277,7 +277,7 @@

 #undef SISGAMMARAMP
 #ifdef XORG_VERSION_CURRENT
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)
+#if (XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)) || 
(XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,0,0,0,0))
 #define SISGAMMARAMP   /* Driver can set gamma ramp; requires 
additional symbols in xf86sym.h */
 #endif
 #endif
--
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-cirrus v2 0/1] Save and restore RIF Control and RAC Control registers

2019-08-02 Thread Kevin Brace
v2: Removed one white space when declaring RIFCtrl and RACCtrl.

--
Kevin Brace (1):
  Save and restore RIF Control and RAC Control registers

 src/lg.h| 1 +
 src/lg_driver.c | 9 +
 2 files changed, 10 insertions(+)

--
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-cirrus v2 1/1] Save and restore RIF Control and RAC Control registers

2019-08-02 Thread Kevin Brace
While the standby resume from ACPI S3 State still fails (i.e., hard
system freeze), saving and restoring Rambus RIF (Rambus Interface)
Control and RAC (Rambus ASIC Cell) Control registers prevents weird
artifacts from being displayed after standby resume (i.e., merely a
blank screen after standby resume).

Signed-off-by: Kevin Brace 
---
 src/lg.h| 1 +
 src/lg_driver.c | 9 +
 2 files changed, 10 insertions(+)

diff --git a/src/lg.h b/src/lg.h
index 3f5dcdf..4c1ea7b 100644
--- a/src/lg.h
+++ b/src/lg.h
@@ -44,6 +44,7 @@ typedef struct {
/* Laguna regs */
CARD8 TILE, BCLK;
CARD16 FORMAT, DTTC, TileCtrl, CONTROL;
+   CARD16 RIFCtrl, RACCtrl;
CARD32 VSC;
 } LgRegRec, *LgRegPtr;

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 3af8432..f6d721a 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -1081,6 +1081,12 @@ LgSave(ScrnInfoPtr pScrn)

 pCir->chip.lg->ModeReg.CONTROL =
 pCir->chip.lg->SavedReg.CONTROL = memrw(0x402);
+
+pCir->chip.lg->ModeReg.RIFCtrl =
+pCir->chip.lg->SavedReg.RIFCtrl = memrw(0x200);
+
+pCir->chip.lg->ModeReg.RACCtrl =
+pCir->chip.lg->SavedReg.RACCtrl = memrw(0x202);
 }

 /*
@@ -1549,6 +1555,9 @@ LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg)
 memwb(0x8C, lgReg->BCLK);

 memww(0x402, lgReg->CONTROL);
+
+memww(0x200, lgReg->RIFCtrl);
+memww(0x202, lgReg->RACCtrl);
 }

 /*
--
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-cirrus] Save and restore RIF Control and RAC Control registers

2019-07-30 Thread Kevin Brace
While the standby resume from ACPI S3 State still fails (i.e., hard
system freeze), saving and restoring Rambus RIF (Rambus Interface)
Control and RAC (Rambus ASIC Cell) Control registers prevents weird
artifacts from being displayed after standby resume (i.e., merely a
blank screen after standby resume).

Signed-off-by: Kevin Brace 
---
 src/lg.h| 1 +
 src/lg_driver.c | 9 +
 2 files changed, 10 insertions(+)

diff --git a/src/lg.h b/src/lg.h
index 3f5dcdf..42add0c 100644
--- a/src/lg.h
+++ b/src/lg.h
@@ -44,6 +44,7 @@ typedef struct {
/* Laguna regs */
CARD8 TILE, BCLK;
CARD16 FORMAT, DTTC, TileCtrl, CONTROL;
+   CARD16  RIFCtrl, RACCtrl;
CARD32 VSC;
 } LgRegRec, *LgRegPtr;

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 3af8432..f6d721a 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -1081,6 +1081,12 @@ LgSave(ScrnInfoPtr pScrn)

 pCir->chip.lg->ModeReg.CONTROL =
 pCir->chip.lg->SavedReg.CONTROL = memrw(0x402);
+
+pCir->chip.lg->ModeReg.RIFCtrl =
+pCir->chip.lg->SavedReg.RIFCtrl = memrw(0x200);
+
+pCir->chip.lg->ModeReg.RACCtrl =
+pCir->chip.lg->SavedReg.RACCtrl = memrw(0x202);
 }

 /*
@@ -1549,6 +1555,9 @@ LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg)
 memwb(0x8C, lgReg->BCLK);

 memww(0x402, lgReg->CONTROL);
+
+memww(0x200, lgReg->RIFCtrl);
+memww(0x202, lgReg->RACCtrl);
 }

 /*
--
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-cirrus] Stop accessing SR12 and SR13

2019-07-30 Thread Kevin Brace
The access to these extended VGA sequencer registers appears to come
from the code for Cirrus Logic Alpine family.  Laguna family does not
use these registers according to Laguna VisualMedia Accelerators Family
CL-GD546X Software Technical Reference Manual, Second Edition.

Signed-off-by: Kevin Brace 
---
 src/lg.h| 2 --
 src/lg_driver.c | 6 --
 2 files changed, 8 deletions(-)

diff --git a/src/lg.h b/src/lg.h
index fa716d6..3f5dcdf 100644
--- a/src/lg.h
+++ b/src/lg.h
@@ -31,8 +31,6 @@ enum {
/* SR regs */
SR07,
SR0E,
-   SR12,
-   SR13,
SR1E,
/* Must be last! */
LG_LAST_REG
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 95886b0..3af8432 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -1052,10 +1052,6 @@ LgSave(ScrnInfoPtr pScrn)
 pCir->chip.lg->SavedReg.ExtVga[SR07] = hwp->readSeq(hwp, 0x07);
 pCir->chip.lg->ModeReg.ExtVga[SR0E] =
 pCir->chip.lg->SavedReg.ExtVga[SR0E] = hwp->readSeq(hwp, 0x0E);
-pCir->chip.lg->ModeReg.ExtVga[SR12] =
-pCir->chip.lg->SavedReg.ExtVga[SR12] = hwp->readSeq(hwp, 0x12);
-pCir->chip.lg->ModeReg.ExtVga[SR13] =
-pCir->chip.lg->SavedReg.ExtVga[SR13] = hwp->readSeq(hwp, 0x13);
 pCir->chip.lg->ModeReg.ExtVga[SR1E] =
 pCir->chip.lg->SavedReg.ExtVga[SR1E] = hwp->readSeq(hwp, 0x1E);

@@ -1530,8 +1526,6 @@ LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg)

 hwp->writeSeq(hwp, 0x07, lgReg->ExtVga[SR07]);
 hwp->writeSeq(hwp, 0x0E, lgReg->ExtVga[SR0E]);
-hwp->writeSeq(hwp, 0x12, lgReg->ExtVga[SR12]);
-hwp->writeSeq(hwp, 0x13, lgReg->ExtVga[SR13]);
 hwp->writeSeq(hwp, 0x1E, lgReg->ExtVga[SR1E]);
 memww(0xC0, lgReg->FORMAT);

--
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

[ANNOUNCE] xf86-video-sis 0.11.0

2019-07-26 Thread Kevin Brace
This is a maintenance release of SiS DDX for X.Org X Server.
There are still about 4 more compilation warnings with the code, but fixing 
them will require some effort that I am not willing to invest at this time.
The remaining compilation warnings are all "const char*" to "char*" type 
warnings involving text strings.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com

--
Adam Jackson (1):
  Remove reference to ->virtualFrom

Alan Coopersmith (4):
  configure: Drop AM_MAINTAINER_MODE
  autogen.sh: Honor NOCONFIGURE=1
  Remove obsolete B16 & B32 tags in struct definitions
  Update configure.ac bug URL for gitlab migration

Emil Velikov (2):
  autogen.sh: use quoted string variables
  xf86-video-sis: remove the GlxSetVisualConfigs stub and friends

Fabrice Fontaine (1):
  configure.ac: fix cross-compilation

Kevin Brace (10):
  Minor adjustment to the compilation order
  Add conditional compilation directives to suppress compilation warnings
  Elimination of many "variable set but not used" compilation warnings
  Eliminate set but not used variable compilation warnings
  Suppress logical operation and parenthesis related compilation warnings
  Eliminate swap macro related unused variable compilation warnings
  Eliminate constant related compilation warnings for native functions
  Convert EXA support preprocessor macro to USE_EXA
  Convert text format specifier type to unsigned short
  Version bumped to 0.11.0

Mihail Konev (1):
  autogen: add default patch prefix

Peter Hutterer (1):
  autogen.sh: use exec instead of waiting for configure to finish

git tag: xf86-video-sis-0.11.0

https://xorg.freedesktop.org/archive/individual/driver/xf86-video-sis-0.11.0.tar.bz2
MD5:  b4ad0e572bffa609f75df787ea7b3d11  xf86-video-sis-0.11.0.tar.bz2
SHA1: 3e6b22a1c8061fb7efc7bf7012ca47fbf9f64722  xf86-video-sis-0.11.0.tar.bz2
SHA256: 2177901a21a980552f8be429f063388e4c5d5f2e24e8b0ce72d65bd93ccc3b6b  
xf86-video-sis-0.11.0.tar.bz2
SHA512: 
b8ad05b3faa24c6df65d825b576ddb8e2ce44705ce8b55d8cf0d9f37aa47a429ab43765d8daea57ff35c4cffed056fbec6dfe8ce95efcd6269cc775ea09c
  xf86-video-sis-0.11.0.tar.bz2
PGP:  
https://xorg.freedesktop.org/archive/individual/driver/xf86-video-sis-0.11.0.tar.bz2.sig

https://xorg.freedesktop.org/archive/individual/driver/xf86-video-sis-0.11.0.tar.gz
MD5:  21404c0717bf05a6ff5d013b4c22db02  xf86-video-sis-0.11.0.tar.gz
SHA1: b4b3e2fda89df09379df109c3456233ffcc59e43  xf86-video-sis-0.11.0.tar.gz
SHA256: 552e7474b95cb2a64e45479be887d2ded65fd8dc6de94a36c827c1102de7fb06  
xf86-video-sis-0.11.0.tar.gz
SHA512: 
fecc4115f7df39797b3acd640501c08e05c6ef2602f8349b26145ef7fdffed45fbd4baa100261df882d798d8a85f74488ac039ea8fa67423bbb17c448b287520
  xf86-video-sis-0.11.0.tar.gz
PGP:  
https://xorg.freedesktop.org/archive/individual/driver/xf86-video-sis-0.11.0.tar.gz.sig


___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

[ANNOUNCE] xf86-video-s3 0.7.0

2019-07-25 Thread Kevin Brace
This is a maintenance release of S3 DDX for X.Org X Server.
The DDX compiles cleanly without compilation warnings on X Server 1.19.6.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com

--
Alan Coopersmith (7):
  When checking malloc for success, it helps to use == NULL, instead of =
  s3_bios.c: Simplify code for choosing between 16000 & 16000 for RefClock
  Remove unused BIOS size & address macros
  configure: Drop AM_MAINTAINER_MODE
  autogen.sh: Honor NOCONFIGURE=1
  Update README for gitlab migration
  Update configure.ac bug URL for gitlab migration

Emil Velikov (1):
  autogen.sh: use quoted string variables

Eric S. Raymond (1):
  Fix malformed list syntax.

Gaetan Nadon (1):
  Remove mibstore.h

Kevin Brace (5):
  Discontinue the use of xf86PciInfo.h
  Use const char for xf86GetOptValString return type
  Eliminate set but not used variable compilation warnings
  Eliminate unused variable compilation warning
  Version bumped to 0.7.0

Mihail Konev (1):
  autogen: add default patch prefix

Peter Hutterer (1):
  autogen.sh: use exec instead of waiting for configure to finish

git tag: xf86-video-s3-0.7.0

https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.bz2
MD5:  8fa9c68b6f9c0fc21f3ba3eeab61e85c  xf86-video-s3-0.7.0.tar.bz2
SHA1: ddcd103a8e955b30f09c0336623fe1341f92ff12  xf86-video-s3-0.7.0.tar.bz2
SHA256: cf12541557d88107364895273e384f97836b428eeb1e54ed66511d69639562c8  
xf86-video-s3-0.7.0.tar.bz2
PGP:  
https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.bz2.sig

https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.gz
MD5:  4823c8b0739b2368de90caba5d61671b  xf86-video-s3-0.7.0.tar.gz
SHA1: 0c27fc1ae09bb6b2628bc546196187a00a720731  xf86-video-s3-0.7.0.tar.gz
SHA256: 4b0fb8008a64b3b5da9e36750361e9032d69439b47145b9f2efd3e3cd9178074  
xf86-video-s3-0.7.0.tar.gz
PGP:  
https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.gz.sig


___
xorg-announce mailing list
xorg-announce@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-announce

[ANNOUNCE] xf86-video-s3 0.7.0

2019-07-25 Thread Kevin Brace
This is a maintenance release of S3 DDX for X.Org X Server.
The DDX compiles cleanly without compilation warnings on X Server 1.19.6.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com

--
Alan Coopersmith (7):
  When checking malloc for success, it helps to use == NULL, instead of =
  s3_bios.c: Simplify code for choosing between 16000 & 16000 for RefClock
  Remove unused BIOS size & address macros
  configure: Drop AM_MAINTAINER_MODE
  autogen.sh: Honor NOCONFIGURE=1
  Update README for gitlab migration
  Update configure.ac bug URL for gitlab migration

Emil Velikov (1):
  autogen.sh: use quoted string variables

Eric S. Raymond (1):
  Fix malformed list syntax.

Gaetan Nadon (1):
  Remove mibstore.h

Kevin Brace (5):
  Discontinue the use of xf86PciInfo.h
  Use const char for xf86GetOptValString return type
  Eliminate set but not used variable compilation warnings
  Eliminate unused variable compilation warning
  Version bumped to 0.7.0

Mihail Konev (1):
  autogen: add default patch prefix

Peter Hutterer (1):
  autogen.sh: use exec instead of waiting for configure to finish

git tag: xf86-video-s3-0.7.0

https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.bz2
MD5:  8fa9c68b6f9c0fc21f3ba3eeab61e85c  xf86-video-s3-0.7.0.tar.bz2
SHA1: ddcd103a8e955b30f09c0336623fe1341f92ff12  xf86-video-s3-0.7.0.tar.bz2
SHA256: cf12541557d88107364895273e384f97836b428eeb1e54ed66511d69639562c8  
xf86-video-s3-0.7.0.tar.bz2
PGP:  
https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.bz2.sig

https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.gz
MD5:  4823c8b0739b2368de90caba5d61671b  xf86-video-s3-0.7.0.tar.gz
SHA1: 0c27fc1ae09bb6b2628bc546196187a00a720731  xf86-video-s3-0.7.0.tar.gz
SHA256: 4b0fb8008a64b3b5da9e36750361e9032d69439b47145b9f2efd3e3cd9178074  
xf86-video-s3-0.7.0.tar.gz
PGP:  
https://www.x.org/releases/individual/driver/xf86-video-s3-0.7.0.tar.gz.sig


___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: [PATCH xf86-video-cirrus] Declare an I2C bus name string as a static type for alp_i2c.c (walter harms)

2019-07-18 Thread Kevin Brace
Hi Walter,

I am attempting to eliminate compilation warnings from the code.
The previous code causes "const char*" to "char*" compilation warnings.
That's all.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


> Date: Thu, 18 Jul 2019 09:02:52 +0200
> From: walter harms 
> To: xorg-devel@lists.x.org
> Subject: Re: [PATCH xf86-video-cirrus] Declare an I2C bus name string
>   as a static type for alp_i2c.c
> Message-ID: <5d30199c.6060...@bfs.de>
> Content-Type: text/plain; charset=UTF-8
>
> HI,
> thx for your patch,
> would you like to explain why ?
> what problem do you try to solve ?
>
>
> re,
>  wh
>
> Am 18.07.2019 04:55, schrieb Kevin Brace:
> > Signed-off-by: Kevin Brace 
> > ---
> >  src/alp_i2c.c | 9 +++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/alp_i2c.c b/src/alp_i2c.c
> > index 9341543..b52f2c8 100644
> > --- a/src/alp_i2c.c
> > +++ b/src/alp_i2c.c
> > @@ -16,6 +16,11 @@
> >  #define _ALP_PRIVATE_
> >  #include "alp.h"
> >
> > +
> > +static char strI2CBus1[]   = "I2C bus 1";
> > +static char strI2CBus2[]   = "I2C bus 2";
> > +
> > +
> >  /*
> >   * Switch between internal I2C bus and external (DDC) bus.
> >   * There is one I2C port controlled bu SR08 and the programmable
> > @@ -99,7 +104,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> >
> > pCir->I2CPtr1 = I2CPtr;
> >
> > -   I2CPtr->BusName= "I2C bus 1";
> > +   I2CPtr->BusName= strI2CBus1;
> > I2CPtr->scrnIndex  = pScrn->scrnIndex;
> > I2CPtr->I2CPutBits = AlpI2CPutBits;
> > I2CPtr->I2CGetBits = AlpI2CGetBits;
> > @@ -113,7 +118,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> >
> > pCir->I2CPtr2 = I2CPtr;
> >
> > -   I2CPtr->BusName= "I2C bus 2";
> > +   I2CPtr->BusName= strI2CBus2;
> > I2CPtr->scrnIndex  = pScrn->scrnIndex;
> > I2CPtr->I2CPutBits = AlpI2CPutBits;
> > I2CPtr->I2CGetBits = AlpI2CGetBits;
> > --
> > 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
>
>
> --
>
> Subject: Digest Footer
>
> ___
> xorg-devel mailing list
> xorg-devel@lists.x.org
> https://lists.x.org/mailman/listinfo/xorg-devel
>
> --
>
> End of xorg-devel Digest, Vol 126, Issue 8
> **
>
___
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-sis] Convert text format specifier type to unsigned short

2019-07-18 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/initextx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/initextx.c b/src/initextx.c
index 1e84d0f..d6cd049 100644
--- a/src/initextx.c
+++ b/src/initextx.c
@@ -252,7 +252,7 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN 
includelcdmodes, BOOLEAN isfo

   current = new;

-  sprintf(current->name, "%dx%d", pSiS->SiS_Pr->SiS_RefIndex[i].XRes,
+  sprintf(current->name, "%hu%hu", pSiS->SiS_Pr->SiS_RefIndex[i].XRes,
  pSiS->SiS_Pr->SiS_RefIndex[i].YRes);

   current->status = MODE_OK;
--
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-cirrus] Declare an I2C bus name string as a static type for alp_i2c.c

2019-07-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/alp_i2c.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/alp_i2c.c b/src/alp_i2c.c
index 9341543..b52f2c8 100644
--- a/src/alp_i2c.c
+++ b/src/alp_i2c.c
@@ -16,6 +16,11 @@
 #define _ALP_PRIVATE_
 #include "alp.h"

+
+static char strI2CBus1[]   = "I2C bus 1";
+static char strI2CBus2[]   = "I2C bus 2";
+
+
 /*
  * Switch between internal I2C bus and external (DDC) bus.
  * There is one I2C port controlled bu SR08 and the programmable
@@ -99,7 +104,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)

pCir->I2CPtr1 = I2CPtr;

-   I2CPtr->BusName= "I2C bus 1";
+   I2CPtr->BusName= strI2CBus1;
I2CPtr->scrnIndex  = pScrn->scrnIndex;
I2CPtr->I2CPutBits = AlpI2CPutBits;
I2CPtr->I2CGetBits = AlpI2CGetBits;
@@ -113,7 +118,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)

pCir->I2CPtr2 = I2CPtr;

-   I2CPtr->BusName= "I2C bus 2";
+   I2CPtr->BusName= strI2CBus2;
I2CPtr->scrnIndex  = pScrn->scrnIndex;
I2CPtr->I2CPutBits = AlpI2CPutBits;
I2CPtr->I2CGetBits = AlpI2CGetBits;
--
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-cirrus] Declare an I2C bus name string as a static type for lg_i2c.c

2019-07-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/lg_i2c.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lg_i2c.c b/src/lg_i2c.c
index f4894bd..44387ff 100644
--- a/src/lg_i2c.c
+++ b/src/lg_i2c.c
@@ -16,6 +16,11 @@
 #define _LG_PRIVATE_
 #include "lg.h"

+
+static char strI2CBus1[]= "I2C bus 1";
+static char strI2CBus2[]= "I2C bus 2";
+
+
 static void
 LgI2CPutBits(I2CBusPtr b, int clock, int data)
 {
@@ -75,7 +80,7 @@ LgI2CInit(ScrnInfoPtr pScrn)

 pCir->I2CPtr1 = I2CPtr;

-I2CPtr->BusName = "I2C bus 1";
+I2CPtr->BusName = strI2CBus1;
 I2CPtr->scrnIndex   = pScrn->scrnIndex;
 I2CPtr->I2CPutBits  = LgI2CPutBits;
 I2CPtr->I2CGetBits  = LgI2CGetBits;
@@ -90,7 +95,7 @@ LgI2CInit(ScrnInfoPtr pScrn)

 pCir->I2CPtr2 = I2CPtr;

-I2CPtr->BusName = "I2C bus 2";
+I2CPtr->BusName = strI2CBus2;
 I2CPtr->scrnIndex   = pScrn->scrnIndex;
 I2CPtr->I2CPutBits  = LgI2CPutBits;
 I2CPtr->I2CGetBits  = LgI2CGetBits;
--
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/2] Rename tridentpcirename.h to trident_pci_rename.h

2019-05-10 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am  | 2 +-
 src/trident.h| 2 +-
 src/{tridentpcirename.h => trident_pci_rename.h} | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename src/{tridentpcirename.h => trident_pci_rename.h} (98%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 63f0dfd..0bced97 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,13 +40,13 @@ trident_drv_la_SOURCES = \
 trident_dga.c \
 trident_driver.c \
 trident_i2c.c \
+trident_pci_rename.h \
 trident_pll.c \
 trident_regs.h \
 trident_shadow.c \
 trident_tv.c \
 trident_video.c \
 trident.h \
-tridentpcirename.h \
 tvga_dac.c \
 xp_xaa.c \
 xp4_exa.c \
diff --git a/src/trident.h b/src/trident.h
index 081ede0..6f2ddc5 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -30,7 +30,7 @@
 #include 
 #include 

-#include "tridentpcirename.h"
+#include "trident_pci_rename.h"

 #include "exa.h"
 #include "xf86Cursor.h"
diff --git a/src/tridentpcirename.h b/src/trident_pci_rename.h
similarity index 98%
rename from src/tridentpcirename.h
rename to src/trident_pci_rename.h
index c93988a..991273b 100644
--- a/src/tridentpcirename.h
+++ b/src/trident_pci_rename.h
@@ -26,8 +26,8 @@
  * library. The main purpose being to facilitate source code compatibility.
  */

-#ifndef TRIDENTPCIRENAME_H
-#define TRIDENTPCIRENAME_H
+#ifndef TRIDENT_PCI_RENAME_H
+#define TRIDENT_PCI_RENAME_H

 enum region_type {
 REGION_MEM,
@@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr;

 #endif /* XSERVER_LIBPCIACCESS */

-#endif /* TRIDENTPCIRENAME_H */
+#endif /* TRIDENT_PCI_RENAME_H */
--
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/2] Rename trident_pci_rename.h to pci_rename.h

2019-05-10 Thread Kevin Brace
PCI rename header file appears to be generic, so trident_ prefix
should be dropped.

Signed-off-by: Kevin Brace 
---
 src/{trident_pci_rename.h => pci_rename.h} | 6 +++---
 src/trident.h  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename src/{trident_pci_rename.h => pci_rename.h} (98%)

diff --git a/src/trident_pci_rename.h b/src/pci_rename.h
similarity index 98%
rename from src/trident_pci_rename.h
rename to src/pci_rename.h
index 991273b..c8ebed7 100644
--- a/src/trident_pci_rename.h
+++ b/src/pci_rename.h
@@ -26,8 +26,8 @@
  * library. The main purpose being to facilitate source code compatibility.
  */

-#ifndef TRIDENT_PCI_RENAME_H
-#define TRIDENT_PCI_RENAME_H
+#ifndef PCI_RENAME_H
+#define PCI_RENAME_H

 enum region_type {
 REGION_MEM,
@@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr;

 #endif /* XSERVER_LIBPCIACCESS */

-#endif /* TRIDENT_PCI_RENAME_H */
+#endif /* PCI_RENAME_H */
diff --git a/src/trident.h b/src/trident.h
index 6f2ddc5..5cadf52 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -30,7 +30,7 @@
 #include 
 #include 

-#include "trident_pci_rename.h"
+#include "pci_rename.h"

 #include "exa.h"
 #include "xf86Cursor.h"
--
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/2] Rename tridentpcirename.h to pci_rename.h

2019-05-10 Thread Kevin Brace
--
Kevin Brace (2):
  Rename tridentpcirename.h to trident_pci_rename.h
  Rename trident_pci_rename.h to pci_rename.h

 src/Makefile.am  | 2 +-
 src/{tridentpcirename.h => pci_rename.h} | 6 +++---
 src/trident.h| 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename src/{tridentpcirename.h => pci_rename.h} (98%)

--
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 0/2] Rename tridentpcirename.h to pci_rename$

2019-05-10 Thread Kevin Brace
--
Kevin Brace (2):
  Rename tridentpcirename.h to trident_pci_rename.h
  Rename trident_pci_rename.h to pci_rename.h

 src/Makefile.am  | 2 +-
 src/{tridentpcirename.h => pci_rename.h} | 6 +++---
 src/trident.h| 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename src/{tridentpcirename.h => pci_rename.h} (98%)

--
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 1/2] Rename tridentpcirename.h to trident_pci_rename.h

2019-05-10 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am  | 2 +-
 src/trident.h| 2 +-
 src/{tridentpcirename.h => trident_pci_rename.h} | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename src/{tridentpcirename.h => trident_pci_rename.h} (98%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 63f0dfd..0bced97 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,13 +40,13 @@ trident_drv_la_SOURCES = \
 trident_dga.c \
 trident_driver.c \
 trident_i2c.c \
+trident_pci_rename.h \
 trident_pll.c \
 trident_regs.h \
 trident_shadow.c \
 trident_tv.c \
 trident_video.c \
 trident.h \
-tridentpcirename.h \
 tvga_dac.c \
 xp_xaa.c \
 xp4_exa.c \
diff --git a/src/trident.h b/src/trident.h
index 081ede0..6f2ddc5 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -30,7 +30,7 @@
 #include 
 #include 

-#include "tridentpcirename.h"
+#include "trident_pci_rename.h"

 #include "exa.h"
 #include "xf86Cursor.h"
diff --git a/src/tridentpcirename.h b/src/trident_pci_rename.h
similarity index 98%
rename from src/tridentpcirename.h
rename to src/trident_pci_rename.h
index c93988a..991273b 100644
--- a/src/tridentpcirename.h
+++ b/src/trident_pci_rename.h
@@ -26,8 +26,8 @@
  * library. The main purpose being to facilitate source code compatibility.
  */

-#ifndef TRIDENTPCIRENAME_H
-#define TRIDENTPCIRENAME_H
+#ifndef TRIDENT_PCI_RENAME_H
+#define TRIDENT_PCI_RENAME_H

 enum region_type {
 REGION_MEM,
@@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr;

 #endif /* XSERVER_LIBPCIACCESS */

-#endif /* TRIDENTPCIRENAME_H */
+#endif /* TRIDENT_PCI_RENAME_H */
--
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/2] Rename trident_pci_rename.h to pci_rename.h

2019-05-10 Thread Kevin Brace
PCI rename header file appears to be generic, so trident_ prefix
should be dropped.

Signed-off-by: Kevin Brace 
---
 src/{trident_pci_rename.h => pci_rename.h} | 6 +++---
 src/trident.h  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename src/{trident_pci_rename.h => pci_rename.h} (98%)

diff --git a/src/trident_pci_rename.h b/src/pci_rename.h
similarity index 98%
rename from src/trident_pci_rename.h
rename to src/pci_rename.h
index 991273b..c8ebed7 100644
--- a/src/trident_pci_rename.h
+++ b/src/pci_rename.h
@@ -26,8 +26,8 @@
  * library. The main purpose being to facilitate source code compatibility.
  */

-#ifndef TRIDENT_PCI_RENAME_H
-#define TRIDENT_PCI_RENAME_H
+#ifndef PCI_RENAME_H
+#define PCI_RENAME_H

 enum region_type {
 REGION_MEM,
@@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr;

 #endif /* XSERVER_LIBPCIACCESS */

-#endif /* TRIDENT_PCI_RENAME_H */
+#endif /* PCI_RENAME_H */
diff --git a/src/trident.h b/src/trident.h
index 6f2ddc5..5cadf52 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -30,7 +30,7 @@
 #include 
 #include 

-#include "trident_pci_rename.h"
+#include "pci_rename.h"

 #include "exa.h"
 #include "xf86Cursor.h"
--
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] A minor adjustment to src/Makefile.am

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

diff --git a/src/Makefile.am b/src/Makefile.am
index ffc2062..63f0dfd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,14 +39,14 @@ trident_drv_la_SOURCES = \
 trident_dac.c \
 trident_dga.c \
 trident_driver.c \
-trident.h \
-tridentpcirename.h \
 trident_i2c.c \
 trident_pll.c \
 trident_regs.h \
 trident_shadow.c \
 trident_tv.c \
 trident_video.c \
+trident.h \
+tridentpcirename.h \
 tvga_dac.c \
 xp_xaa.c \
 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 2/2] Move IsClearTV function location inside trident_pll.c

2019-05-10 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/trident_pll.c | 35 +--
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/src/trident_pll.c b/src/trident_pll.c
index 1301daf..cf32a0a 100644
--- a/src/trident_pll.c
+++ b/src/trident_pll.c
@@ -37,7 +37,23 @@
 #include "trident.h"
 #include "trident_regs.h"

-static void IsClearTV(ScrnInfoPtr pScrn);
+
+static void
+IsClearTV(ScrnInfoPtr pScrn)
+{
+int vgaIOBase = VGAHWPTR(pScrn)->IOBase;
+TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+CARD8 temp;
+
+if (pTrident->frequency != 0) return;
+
+OUTB(vgaIOBase + 4, 0xC0);
+temp = INB(vgaIOBase + 5);
+if (temp & 0x80)
+pTrident->frequency = PAL;
+else
+pTrident->frequency = NTSC;
+}

 void
 TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
@@ -123,23 +139,6 @@ TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 
*b)
clock/1000., p, q, r);
 }

-static void
-IsClearTV(ScrnInfoPtr pScrn)
-{
-int vgaIOBase = VGAHWPTR(pScrn)->IOBase;
-TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-CARD8 temp;
-
-if (pTrident->frequency != 0) return;
-
-OUTB(vgaIOBase + 4, 0xC0);
-temp = INB(vgaIOBase + 5);
-if (temp & 0x80)
-pTrident->frequency = PAL;
-else
-pTrident->frequency = NTSC;
-}
-
 void
 TridentFindClock(ScrnInfoPtr pScrn, int clock)
 {
--
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 0/2] Minor adjustments to trident_pll.c

2019-05-10 Thread Kevin Brace
--
Kevin Brace (2):
  Add braces to two for loops that lack them
  Move IsClearTV function location inside trident_pll.c

 src/trident_pll.c | 41 +
 1 file changed, 21 insertions(+), 20 deletions(-)

--
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 1/2] Add braces to two for loops that lack them

2019-05-10 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/trident_pll.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/trident_pll.c b/src/trident_pll.c
index f94268e..1301daf 100644
--- a/src/trident_pll.c
+++ b/src/trident_pll.c
@@ -71,8 +71,8 @@ TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)

 freq = clock;

-for (k = startk; k <= endk; k++)
-for (n = 0; n <= endn; n++)
+for (k = startk; k <= endk; k++) {
+for (n = 0; n <= endn; n++) {
 for (m = 1; m <= endm; m++) {
 ffreq = n + 8) * pTrident->frequency) /
 ((m + 2) * powerup[k])) * 1000);
@@ -97,6 +97,8 @@ TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
 #endif
 }
 }
+}
+}

 if (s == 0) {
 FatalError("Unable to set programmable clock.\n"
--
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/4] Fix indentation of tridenthelper.c

2019-05-10 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/tridenthelper.c | 156 ++--
 1 file changed, 77 insertions(+), 79 deletions(-)

diff --git a/src/tridenthelper.c b/src/tridenthelper.c
index c0ca069..f94268e 100644
--- a/src/tridenthelper.c
+++ b/src/tridenthelper.c
@@ -1,23 +1,25 @@
 /*
  * 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.
  *
  * Author:  Alan Hourihane, al...@fairlite.demon.co.uk
  */
@@ -41,7 +43,7 @@ void
 TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
 {
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-int powerup[4] = { 1,2,4,8 };
+int powerup[4] = { 1, 2, 4, 8 };
 int clock_diff = 750;
 int freq, ffreq;
 int m, n, k;
@@ -52,17 +54,14 @@ TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 
*b)

 IsClearTV(pScrn);

-if (pTrident->NewClockCode)
-{
+if (pTrident->NewClockCode) {
 endn = 255;
 endm = 63;
 endk = 2;
 if (clock >= 10) startk = 0; else
 if (clock >=  5) startk = 1; else
 startk = 2;
-}
-else
-{
+} else {
 endn = 121;
 endm = 31;
 endk = 1;
@@ -72,22 +71,26 @@ TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 
*b)

 freq = clock;

-for (k=startk;k<=endk;k++)
-for (n=0;n<=endn;n++)
-for (m=1;m<=endm;m++)
-{
-ffreq = ( ( ((n + 8) * pTrident->frequency) / ((m + 2) * 
powerup[k]) ) * 1000);
-if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff))
-{
+for (k = startk; k <= endk; k++)
+for (n = 0; n <= endn; n++)
+for (m = 1; m <= endm; m++) {
+ffreq = n + 8) * pTrident->frequency) /
+((m + 2) * powerup[k])) * 1000);
+if ((ffreq > freq - clock_diff) &&
+(ffreq < freq + clock_diff)) {
 /*
- * It seems that the 9440 docs have this STRICT 
limitation, although
- * most 9440 boards seem to cope. 96xx/Cyber chips don't 
need this limit
- * so, I'm gonna remove it and it allows lower clocks < 
25.175 too !
+ * It seems that the 9440 docs have this STRICT
+ * limitation, although most 9440 boards seem to
+ * cope. 96xx/Cyber chips don't need this limit
+ * so, I'm gonna remove it and it allows lower
+ * clocks < 25.175 too!
  */
 #ifdef STRICT
-if ( (n+8)*100/(m+2) < 978 

[PATCH xf86-video-trident 2/4] Tab to spaces conversion for tridenthelper.c

2019-05-10 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/tridenthelper.c | 398 ++--
 1 file changed, 199 insertions(+), 199 deletions(-)

diff --git a/src/tridenthelper.c b/src/tridenthelper.c
index 2237db9..c0ca069 100644
--- a/src/tridenthelper.c
+++ b/src/tridenthelper.c
@@ -41,89 +41,89 @@ void
 TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
 {
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-   int powerup[4] = { 1,2,4,8 };
-   int clock_diff = 750;
-   int freq, ffreq;
-   int m, n, k;
-   int p, q, r, s;
-   int endn, endm, endk, startk;
+int powerup[4] = { 1,2,4,8 };
+int clock_diff = 750;
+int freq, ffreq;
+int m, n, k;
+int p, q, r, s;
+int endn, endm, endk, startk;

-   p = q = r = s = 0;
+p = q = r = s = 0;

-IsClearTV(pScrn);
+IsClearTV(pScrn);

-   if (pTrident->NewClockCode)
-   {
-   endn = 255;
-   endm = 63;
-   endk = 2;
-   if (clock >= 10) startk = 0; else
-   if (clock >=  5) startk = 1; else
-startk = 2;
-   }
-   else
-   {
-   endn = 121;
-   endm = 31;
-   endk = 1;
-   if (clock > 5) startk = 1; else
-  startk = 0;
-   }
-
-   freq = clock;
-
-   for (k=startk;k<=endk;k++)
- for (n=0;n<=endn;n++)
-   for (m=1;m<=endm;m++)
-   {
-   ffreq = ( ( ((n + 8) * pTrident->frequency) / ((m + 2) * 
powerup[k]) ) * 1000);
-   if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff))
-   {
-/*
- * It seems that the 9440 docs have this STRICT limitation, although
- * most 9440 boards seem to cope. 96xx/Cyber chips don't need this limit
- * so, I'm gonna remove it and it allows lower clocks < 25.175 too !
- */
+if (pTrident->NewClockCode)
+{
+endn = 255;
+endm = 63;
+endk = 2;
+if (clock >= 10) startk = 0; else
+if (clock >=  5) startk = 1; else
+startk = 2;
+}
+else
+{
+endn = 121;
+endm = 31;
+endk = 1;
+if (clock > 5) startk = 1; else
+startk = 0;
+}
+
+freq = clock;
+
+for (k=startk;k<=endk;k++)
+for (n=0;n<=endn;n++)
+for (m=1;m<=endm;m++)
+{
+ffreq = ( ( ((n + 8) * pTrident->frequency) / ((m + 2) * 
powerup[k]) ) * 1000);
+if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff))
+{
+/*
+ * It seems that the 9440 docs have this STRICT 
limitation, although
+ * most 9440 boards seem to cope. 96xx/Cyber chips don't 
need this limit
+ * so, I'm gonna remove it and it allows lower clocks < 
25.175 too !
+ */
 #ifdef STRICT
-   if ( (n+8)*100/(m+2) < 978 && (n+8)*100/(m+2) > 349 ) {
+if ( (n+8)*100/(m+2) < 978 && (n+8)*100/(m+2) > 349 ) {
 #endif
-   clock_diff = (freq > ffreq) ? freq - ffreq : 
ffreq - freq;
-   p = n; q = m; r = k; s = ffreq;
+clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - 
freq;
+p = n; q = m; r = k; s = ffreq;
 #ifdef STRICT
-   }
+}
 #endif
-   }
-   }
-
-   if (s == 0)
-   {
-   FatalError("Unable to set programmable clock.\n"
-  "Frequency %d is not a valid clock.\n"
-  "Please modify XF86Config for a new clock.\n",
-  freq);
-   }
-
-   if (pTrident->NewClockCode)
-   {
-   /* N is all 8bits */
-   *a = p;
-   /* M is first 6bits, with K last 2bits */
-   *b = (q & 0x3F) | (r << 6);
-   }
-   else
-   {
-   /* N is first 7bits, first M bit is 8th bit */
-   *a = ((1 & q) << 7) | p;
-   /* first 4bits are rest of M, 1bit for K value */
-   *b = (((q & 0xFE) >> 1) | (r << 4));
-   }
-   xf86DrvMsgVerb(pScrn->scrnIndex,X_INFO,3,"Found Clock %6.2f n=%i m=%i"
-  " k=%i\n",clock/1000.,p,q,r);
+}
+}
+
+if (s == 0)
+{
+FatalError("Unable to set programmable clock.\n"
+"Frequency %d is not a valid clock.\n"
+"Please modify XF86Config for a new clock.\n",
+freq);
+}
+
+if (pTri

[PATCH xf86-video-trident 0/4] Clean up and rename tridenthelper.c

2019-05-10 Thread Kevin Brace
--
Kevin Brace (4):
  Add braces to for loops inside tridenthelper.c
  Tab to spaces conversion for tridenthelper.c
  Fix indentation of tridenthelper.c
  Rename tridenthelper.c to trident_pll.c

 src/Makefile.am |   2 +-
 src/trident_pll.c   | 343 +++
 src/tridenthelper.c | 344 
 3 files changed, 344 insertions(+), 345 deletions(-)
 create mode 100644 src/trident_pll.c
 delete mode 100644 src/tridenthelper.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 4/4] Rename tridenthelper.c to trident_pll.c

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

diff --git a/src/Makefile.am b/src/Makefile.am
index e2f2bd6..ffc2062 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,9 +40,9 @@ trident_drv_la_SOURCES = \
 trident_dga.c \
 trident_driver.c \
 trident.h \
-tridenthelper.c \
 tridentpcirename.h \
 trident_i2c.c \
+trident_pll.c \
 trident_regs.h \
 trident_shadow.c \
 trident_tv.c \
diff --git a/src/tridenthelper.c b/src/trident_pll.c
similarity index 100%
rename from src/tridenthelper.c
rename to src/trident_pll.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 1/4] Add braces to for loops inside tridenthelper.c

2019-05-10 Thread Kevin Brace
Newer versions of gcc give warnings, so this fix suppresses the
warnings.

Signed-off-by: Kevin Brace 
---
 src/tridenthelper.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/tridenthelper.c b/src/tridenthelper.c
index b1fc739..2237db9 100644
--- a/src/tridenthelper.c
+++ b/src/tridenthelper.c
@@ -303,16 +303,17 @@ TGUISetMCLK(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 
*b)
 freq = clock;

 if (!pTrident->HasSGRAM) {
-  for (k=0;k<=endk;k++)
-for (n=startn;n<=endn;n++)
+  for (k=0;k<=endk;k++) {
+for (n=startn;n<=endn;n++) {
   for (m=1;m<=endm;m++) {
ffreq = n+8)*pTrident->frequency)/((m+2)*powerup[k]))*1000);
-   if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff))
-   {
+   if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) 
{
clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq;
p = n; q = m; r = k; s = ffreq;
-   }
-   }
+   }
+  }
+}
+  }

if (s == 0)
{
--
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-cirrus] Fix indentation of lg_i2c.c

2019-05-06 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/lg_i2c.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lg_i2c.c b/src/lg_i2c.c
index b6fcc28..f4894bd 100644
--- a/src/lg_i2c.c
+++ b/src/lg_i2c.c
@@ -34,7 +34,9 @@ LgI2CPutBits(I2CBusPtr b, int clock, int data)
 if (data)
 regval |= 0x0001;
 memww(regno, regval);
-/* ErrorF("LgI2CPutBits: %d %d\n", clock, data); */
+/*
+ErrorF("LgI2CPutBits: %d %d\n", clock, data);
+*/
 }

 static void
@@ -52,7 +54,9 @@ LgI2CGetBits(I2CBusPtr b, int *clock, int *data)
 regval = memrw(regno);
 *clock = (regval & 0x8000) != 0;
 *data = (regval & 0x0100) != 0;
-/* ErrorF("LgI2CGetBits: %d %d\n", *clock, *data); */
+/*
+ErrorF("LgI2CGetBits: %d %d\n", *clock, *data);
+*/
 }

 Bool
--
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-cirrus] Tab to spaces conversion for lg_i2c.c

2019-05-02 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/lg_i2c.c | 108 ++-
 1 file changed, 56 insertions(+), 52 deletions(-)

diff --git a/src/lg_i2c.c b/src/lg_i2c.c
index 3e8c962..b6fcc28 100644
--- a/src/lg_i2c.c
+++ b/src/lg_i2c.c
@@ -17,80 +17,84 @@
 #include "lg.h"

 static void
-LgI2CPutBits(I2CBusPtr b, int clock,  int data)
+LgI2CPutBits(I2CBusPtr b, int clock, int data)
 {
-   unsigned int regval, regno;
-   CirPtr pCir = ((CirPtr)b->DriverPrivate.ptr);
-   if (b == pCir->I2CPtr1)
-   regno = 0x280;
-   else if (b == pCir->I2CPtr2)
-   regno = 0x282;
-   else
-   return;
-
-   regval = 0xff7e;
-   if (clock) regval |= 0x0080;
-   if (data)  regval |= 0x0001;
-   memww(regno, regval);
-   /* ErrorF("LgI2CPutBits: %d %d\n", clock, data); */
+unsigned int regval, regno;
+CirPtr pCir = ((CirPtr) b->DriverPrivate.ptr);
+if (b == pCir->I2CPtr1)
+regno = 0x280;
+else if (b == pCir->I2CPtr2)
+regno = 0x282;
+else
+return;
+
+regval = 0xff7e;
+if (clock)
+regval |= 0x0080;
+if (data)
+regval |= 0x0001;
+memww(regno, regval);
+/* ErrorF("LgI2CPutBits: %d %d\n", clock, data); */
 }

 static void
 LgI2CGetBits(I2CBusPtr b, int *clock, int *data)
 {
-   unsigned int regval, regno;
-   CirPtr pCir = ((CirPtr)b->DriverPrivate.ptr);
-   if (b == pCir->I2CPtr1)
-   regno = 0x280;
-   else if (b == pCir->I2CPtr2)
-   regno = 0x282;
-   else
-   return;
-
-   regval = memrw(regno);
-   *clock = (regval & 0x8000) != 0;
-   *data  = (regval & 0x0100) != 0;
-   /* ErrorF("LgI2CGetBits: %d %d\n", *clock, *data); */
+unsigned int regval, regno;
+CirPtr pCir = ((CirPtr) b->DriverPrivate.ptr);
+if (b == pCir->I2CPtr1)
+regno = 0x280;
+else if (b == pCir->I2CPtr2)
+regno = 0x282;
+else
+return;
+
+regval = memrw(regno);
+*clock = (regval & 0x8000) != 0;
+*data = (regval & 0x0100) != 0;
+/* ErrorF("LgI2CGetBits: %d %d\n", *clock, *data); */
 }

 Bool
 LgI2CInit(ScrnInfoPtr pScrn)
 {
-   CirPtr pCir = CIRPTR(pScrn);
-   I2CBusPtr I2CPtr;
+CirPtr pCir = CIRPTR(pScrn);
+I2CBusPtr I2CPtr;

 #ifdef LG_DEBUG
-   ErrorF("LgI2CInit\n");
+ErrorF("LgI2CInit\n");
 #endif

-   I2CPtr = xf86CreateI2CBusRec();
-   if (!I2CPtr) return FALSE;
+I2CPtr = xf86CreateI2CBusRec();
+if (!I2CPtr)
+return FALSE;

-   pCir->I2CPtr1 = I2CPtr;
+pCir->I2CPtr1 = I2CPtr;

-   I2CPtr->BusName = "I2C bus 1";
-   I2CPtr->scrnIndex   = pScrn->scrnIndex;
-   I2CPtr->I2CPutBits  = LgI2CPutBits;
-   I2CPtr->I2CGetBits  = LgI2CGetBits;
-   I2CPtr->DriverPrivate.ptr   = pCir;
+I2CPtr->BusName = "I2C bus 1";
+I2CPtr->scrnIndex   = pScrn->scrnIndex;
+I2CPtr->I2CPutBits  = LgI2CPutBits;
+I2CPtr->I2CGetBits  = LgI2CGetBits;
+I2CPtr->DriverPrivate.ptr   = pCir;

-   if (!xf86I2CBusInit(I2CPtr))
-   return FALSE;
+if (!xf86I2CBusInit(I2CPtr))
+return FALSE;

-   I2CPtr = xf86CreateI2CBusRec();
-   if (!I2CPtr) return FALSE;
+I2CPtr = xf86CreateI2CBusRec();
+if (!I2CPtr)
+return FALSE;

-   pCir->I2CPtr2 = I2CPtr;
+pCir->I2CPtr2 = I2CPtr;

-   I2CPtr->BusName = "I2C bus 2";
-   I2CPtr->scrnIndex   = pScrn->scrnIndex;
-   I2CPtr->I2CPutBits  = LgI2CPutBits;
-   I2CPtr->I2CGetBits  = LgI2CGetBits;
-   I2CPtr->DriverPrivate.ptr   = pCir;
+I2CPtr->BusName = "I2C bus 2";
+I2CPtr->scrnIndex   = pScrn->scrnIndex;
+I2CPtr->I2CPutBits  = LgI2CPutBits;
+I2CPtr->I2CGetBits  = LgI2CGetBits;
+I2CPtr->DriverPrivate.ptr   = pCir;

-   if (!xf86I2CBusInit(I2CPtr))
-   return FALSE;
+if (!xf86I2CBusInit(I2CPtr))
+return FALSE;

-   return TRUE;
+return TRUE;
 }

--
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-cirrus 1/3] Fix for Laguna I2C bus code compilation error

2019-04-17 Thread Kevin Brace
When commit 9a5e19597be4f5ee4c1030e4a716207789e78668 (cirrus: convert
to compat server API.) updated the code, it did not update Laguna I2C
bus code to handle newer X Servers.

Signed-off-by: Kevin Brace 
---
 src/lg_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lg_driver.c b/src/lg_driver.c
index daaf4f9..be8963a 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -359,7 +359,7 @@ LgDoDDC(ScrnInfoPtr pScrn)
 /*
  * Read and output monitor info using DDC2 over I2C bus.
  */
-MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pCir->I2CPtr1);
+MonInfo = xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn), pCir->I2CPtr1);
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "I2C Monitor info: %p\n", (void *)MonInfo);
 xf86PrintEDID(MonInfo);
--
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-cirrus 2/3] Check for a successful transmission of EDID for Laguna I2C bus code

2019-04-17 Thread Kevin Brace
The existing code can potentially cause a null pointer crash if EDID
was not obtained successfully.

Signed-off-by: Kevin Brace 
---
 src/lg_driver.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lg_driver.c b/src/lg_driver.c
index be8963a..1042030 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -360,6 +360,12 @@ LgDoDDC(ScrnInfoPtr pScrn)
  * Read and output monitor info using DDC2 over I2C bus.
  */
 MonInfo = xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn), pCir->I2CPtr1);
+if (!MonInfo) {
+xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+"Failed to obtain EDID.\n");
+goto unmap_out;
+}
+
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "I2C Monitor info: %p\n", (void *)MonInfo);
 xf86PrintEDID(MonInfo);
--
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-cirrus 3/3] Activate I2C bus for Laguna based devices

2019-04-17 Thread Kevin Brace
There is really no good reason for I2C bus based automatic display
detection to not be turned on by default.

Signed-off-by: Kevin Brace 
---
 src/lg_driver.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 1042030..95886b0 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -349,7 +349,6 @@ LgDoDDC(ScrnInfoPtr pScrn)
 if (!CirMapMem(pCir, pScrn->scrnIndex))
 return FALSE;

-#if LGuseI2C
 if (!LgI2CInit(pScrn)) {
 xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 "I2C initialization failed\n");
@@ -371,13 +370,10 @@ LgDoDDC(ScrnInfoPtr pScrn)
 xf86PrintEDID(MonInfo);
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "end of I2C Monitor info\n\n");
-#endif /* LGuseI2C */

 xf86SetDDCproperties(pScrn, MonInfo);

-#if LGuseI2C
-unmap_out:
-#endif /* LGuseI2C */
+unmap_out:
 CirUnmapMem(pCir, pScrn->scrnIndex);

 return MonInfo;
--
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-cirrus 0/3] Laguna I2C bus fix and activation

2019-04-17 Thread Kevin Brace
--
Kevin Brace (3):
  Fix for Laguna I2C bus code compilation error
  Check for a successful transmission of EDID for Laguna I2C bus code
  Activate I2C bus for Laguna based devices

 src/lg_driver.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

--
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-cirrus 3/3] Make adjustments to code comments of lg_driver.c

2019-04-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/lg_driver.c | 198 
 1 file changed, 97 insertions(+), 101 deletions(-)

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 67815a5..daaf4f9 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -21,28 +21,26 @@
 #define EXPERIMENTAL

 /*
- * All drivers should typically include these
+ * All drivers should typically include these.
  */
 #include "xf86.h"
 #include "xf86_OSproc.h"

 /*
- * All drivers need this
+ * All drivers need this.
  */

 #include "compiler.h"

 /*
- * Drivers that need to access the PCI config space directly need this
+ * Drivers that need to access the PCI config space directly need
+ * this.
  */
 #include "xf86Pci.h"

 /*
- * All drivers using the vgahw module need this
- */
-/*
- * This driver needs to be modified to not use vgaHW for multihead
- * operation
+ * All drivers using the vgahw module need this.  This driver needs
+ * to be modified to not use vgaHW for multihead operation.
  */
 #include "vgaHW.h"

@@ -52,19 +50,19 @@
 #endif

 /*
- * All drivers initialising the SW cursor need this
+ * All drivers initialising the SW cursor need this.
  */
 #include "mipointer.h"

 /*
- * need this for inputInfo
+ * Need this for inputInfo.
  */
 #include "inputstr.h"

 #include "micmap.h"

 /*
- * Needed by the Shadow Framebuffer
+ * Needed by the shadowfb.
  */
 #include "shadowfb.h"

@@ -98,11 +96,11 @@ static Bool LgCloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool LgSaveScreen(ScreenPtr pScreen, Bool mode);

 /*
- * Required if the driver supports mode switching
+ * Required if the driver supports mode switching.
  */
 Bool LgSwitchMode(SWITCH_MODE_ARGS_DECL);
 /*
- * Required if the driver supports moving the viewport
+ * Required if the driver supports moving the viewport.
  */
 void LgAdjustFrame(ADJUST_FRAME_ARGS_DECL);

@@ -114,7 +112,7 @@ ModeStatus LgValidMode(SCRN_ARG_TYPE arg, DisplayModePtr 
mode,
 Bool verbose, int flags);

 /*
- * Internally used functions
+ * Internal functions
  */
 static void LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg);
 static int LgFindLineData(int displayWidth, int bpp);
@@ -159,7 +157,7 @@ static const OptionInfoRec LgOptions[] = {
 };

 /*
- *   1/4bpp   8bpp   15/16bpp  24bpp  32bpp
+ *   1/4 bpp  8 bpp 15/16 bpp 24 bpp  32 bpp
  */
 static int gd5462_MaxClocks[] =
 { 17, 17, 135100, 135100,  85500 };
@@ -170,7 +168,7 @@ static int gd5465_MaxClocks[] =

 /*
  * We're rather use skinny tiles, so put all of them at the head of
- * the table
+ * the table.
  */
 LgLineDataRec LgLineData[] = {
 { 5,  640, 0},
@@ -188,26 +186,26 @@ LgLineDataRec LgLineData[] = {
 {20, 5120, 1},
 {26, 6656, 1},
 /*
- * Sentinal to indicate end of table
+ * Sentinal to indicate end of table.
  */
 {-1, -1,   -1}
 };

 static int LgLinePitches[4][11] = {
 /*
- * 8
+ *  8 bpp
  */
 { 640, 1024, 1280, 1664, 2048, 2560, 3328, 4096, 5120, 6656, 0 },
 /*
- * 16
+ * 16 bpp
  */
 { 320,  512,  640,  832, 1024, 1280, 1664, 2048, 2560, 3328, 0 },
 /*
- * 24
+ * 24 bpp
  */
 { 213,  341,  426,  554,  682,  853, 1109, 1365, 1706, 2218, 0 },
 /*
- * 32
+ * 32 bpp
  */
 { 160,  256,  320,  416,  512,  640,  832, 1024, 1280, 1664, 0 }
 };
@@ -227,7 +225,7 @@ static XF86ModuleVersionInfo lgVersRec =
 XORG_VERSION_CURRENT,
 LG_MAJOR_VERSION, LG_MINOR_VERSION, LG_PATCHLEVEL,
 /*
- * This is a video driver
+ * This is a video driver.
  */
 ABI_CLASS_VIDEODRV,
 ABI_VIDEODRV_VERSION,
@@ -285,7 +283,7 @@ LgGetRec(ScrnInfoPtr pScrn)
 xnfcalloc(sizeof(LgRec), 1);

 /*
- * Initialize it
+ * Initialize it.
  */
 pCir = CIRPTR(pScrn);
 pCir->chip.lg->oldBitmask = 0x;
@@ -319,8 +317,8 @@ LgCountRam(ScrnInfoPtr pScrn)
 vgaHWProtect(pScrn, TRUE);

 /*
- * The ROM BIOS scratchpad registers contain, among other things,
- * the amount of installed RDRAM on the laguna chip.
+ * The ROM BIOS scratch pad registers contain, among other things,
+ * the amount of installed RDRAM for the Laguna chip.
  */
 SR14 = hwp->readSeq(hwp, 0x14);

@@ -346,7 +344,7 @@ LgDoDDC(ScrnInfoPtr pScrn)
 xf86MonPtr MonInfo = NULL;

 /*
- * Map the CIR memory and MMIO areas
+ * Map the CIR memory and MMIO areas.
  */
 if (!CirMapMem(pCir, pScrn->scrnIndex))
 return FALSE;
@@ -359,7 +357,7 @@ LgDoDDC(ScrnInfoPtr pScrn)
 }

 /*
- * Read and output monitor info using DDC2 over I2C bus
+ * Read and output monitor info using DDC2 over I2C bus.
  */
 MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pCir->I2CPtr1);
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -410,13 +408,13 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 re

[PATCH xf86-video-cirrus 2/3] Fix indentation of lg_driver.c

2019-04-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/lg_driver.c | 1451 +++
 1 file changed, 977 insertions(+), 474 deletions(-)

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 6bbbc15..67815a5 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -20,19 +20,30 @@

 #define EXPERIMENTAL

-/* All drivers should typically include these */
+/*
+ * All drivers should typically include these
+ */
 #include "xf86.h"
 #include "xf86_OSproc.h"

-/* All drivers need this */
+/*
+ * All drivers need this
+ */

 #include "compiler.h"

-/* Drivers that need to access the PCI config space directly need this */
+/*
+ * Drivers that need to access the PCI config space directly need this
+ */
 #include "xf86Pci.h"

-/* All drivers using the vgahw module need this */
-/* This driver needs to be modified to not use vgaHW for multihead operation */
+/*
+ * All drivers using the vgahw module need this
+ */
+/*
+ * This driver needs to be modified to not use vgaHW for multihead
+ * operation
+ */
 #include "vgaHW.h"

 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
@@ -40,15 +51,21 @@
 #include "xf86Resources.h"
 #endif

-/* All drivers initialising the SW cursor need this */
+/*
+ * All drivers initialising the SW cursor need this
+ */
 #include "mipointer.h"

-/* need this for inputInfo */
+/*
+ * need this for inputInfo
+ */
 #include "inputstr.h"

 #include "micmap.h"

-/* Needed by the Shadow Framebuffer */
+/*
+ * Needed by the Shadow Framebuffer
+ */
 #include "shadowfb.h"

 #include "xf86int10.h"
@@ -70,7 +87,9 @@
  * Forward definitions for the functions that make up the driver.
  */

-/* Mandatory functions */
+/*
+ * Mandatory functions
+ */
 Bool LgPreInit(ScrnInfoPtr pScrn, int flags);
 Bool LgScreenInit(SCREEN_INIT_ARGS_DECL);
 Bool LgEnterVT(VT_FUNC_ARGS_DECL);
@@ -78,24 +97,33 @@ void LgLeaveVT(VT_FUNC_ARGS_DECL);
 static Bool LgCloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool LgSaveScreen(ScreenPtr pScreen, Bool mode);

-/* Required if the driver supports mode switching */
+/*
+ * Required if the driver supports mode switching
+ */
 Bool LgSwitchMode(SWITCH_MODE_ARGS_DECL);
-/* Required if the driver supports moving the viewport */
+/*
+ * Required if the driver supports moving the viewport
+ */
 void LgAdjustFrame(ADJUST_FRAME_ARGS_DECL);

-/* Optional functions */
+/*
+ * Optional functions
+ */
 void LgFreeScreen(FREE_SCREEN_ARGS_DECL);
 ModeStatus LgValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
 Bool verbose, int flags);

-/* Internally used functions */
+/*
+ * Internally used functions
+ */
 static void LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg);
 static int LgFindLineData(int displayWidth, int bpp);
 static CARD16 LgSetClock(CirPtr pCir, vgaHWPtr hwp, int freq);
 static void lg_vgaHWSetMmioFunc(vgaHWPtr hwp, CARD8 *base);

 static void LgDisplayPowerManagementSet(ScrnInfoPtr pScrn,
-int PowerManagementMode, int flags);
+int PowerManagementMode,
+int flags);

 /*
  * This is intentionally screen-independent.  It indicates the binding
@@ -105,10 +133,10 @@ static int pix24bpp = 0;

 /*
  * This contains the functions needed by the server after loading the
- * driver module.  It must be supplied, and gets added the driver list by
- * the Module Setup funtion in the dynamic case.  In the static case a
- * reference to this is compiled in, and this requires that the name of
- * this DriverRec be an upper-case version of the driver name.
+ * driver module.  It must be supplied, and gets added the driver list
+ * by the Module Setup funtion in the dynamic case.  In the static
+ * case a reference to this is compiled in, and this requires that the
+ * name of this DriverRec be an upper-case version of the driver name.
  */

 typedef enum {
@@ -124,18 +152,29 @@ static const OptionInfoRec LgOptions[] = {
 { OPTION_NOACCEL,   "NoAccel",  OPTV_BOOLEAN,   {0},FALSE },
 { OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN,   {0},FALSE },
 { OPTION_ROTATE,"Rotate",   OPTV_ANYSTR,{0},FALSE },
-/* fifo_conservative/aggressive; fast/med/slow_dram; ... */
+/*
+ * fifo_conservative/aggressive; fast/med/slow_dram; ...
+ */
 { -1,   NULL,   OPTV_NONE,  {0},FALSE }
 };

-/*1/4bpp   8bpp   15/16bpp  24bpp  32bpp */
-static int gd5462_MaxClocks[] = { 17, 17, 135100, 135100,  85500 };
-static int gd5464_MaxClocks[] = { 17, 25, 17, 17, 135100 };
-static int gd5465_MaxClocks[] = { 17, 25, 17, 17, 135100 };
+/*
+ *   1/4bpp   8bpp   15/16bpp  24bpp  32bpp
+ */
+static int gd5462_MaxClocks[] =
+{ 17, 17, 135100, 13510

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

2019-04-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/lg_driver.c | 2712 +++
 1 file changed, 1338 insertions(+), 1374 deletions(-)

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 60280df..6bbbc15 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -9,9 +9,9 @@
  *
  * This driver is derived from the cir_driver.c module.
  * Original authors and contributors list include:
- * Radoslaw Kapitan, Andrew Vanderstock, Dirk Hohndel,
- * David Dawes, Andrew E. Mileski, Leonard N. Zubkoff,
- * Guy DESBIEF, Itai Nahshon.
+ *  Radoslaw Kapitan, Andrew Vanderstock, Dirk Hohndel,
+ *  David Dawes, Andrew E. Mileski, Leonard N. Zubkoff,
+ *  Guy DESBIEF, Itai Nahshon.
  */

 #ifdef HAVE_CONFIG_H
@@ -75,8 +75,8 @@ Bool LgPreInit(ScrnInfoPtr pScrn, int flags);
 Bool LgScreenInit(SCREEN_INIT_ARGS_DECL);
 Bool LgEnterVT(VT_FUNC_ARGS_DECL);
 void LgLeaveVT(VT_FUNC_ARGS_DECL);
-static BoolLgCloseScreen(CLOSE_SCREEN_ARGS_DECL);
-static BoolLgSaveScreen(ScreenPtr pScreen, Bool mode);
+static Bool LgCloseScreen(CLOSE_SCREEN_ARGS_DECL);
+static Bool LgSaveScreen(ScreenPtr pScreen, Bool mode);

 /* Required if the driver supports mode switching */
 Bool LgSwitchMode(SWITCH_MODE_ARGS_DECL);
@@ -86,7 +86,7 @@ void LgAdjustFrame(ADJUST_FRAME_ARGS_DECL);
 /* Optional functions */
 void LgFreeScreen(FREE_SCREEN_ARGS_DECL);
 ModeStatus LgValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
-  Bool verbose, int flags);
+Bool verbose, int flags);

 /* Internally used functions */
 static void LgRestoreLgRegs(ScrnInfoPtr pScrn, LgRegPtr lgReg);
@@ -95,7 +95,7 @@ static CARD16 LgSetClock(CirPtr pCir, vgaHWPtr hwp, int freq);
 static void lg_vgaHWSetMmioFunc(vgaHWPtr hwp, CARD8 *base);

 static void LgDisplayPowerManagementSet(ScrnInfoPtr pScrn,
-   int PowerManagementMode, int flags);
+int PowerManagementMode, int flags);

 /*
  * This is intentionally screen-independent.  It indicates the binding
@@ -112,51 +112,50 @@ static int pix24bpp = 0;
  */

 typedef enum {
-   OPTION_HW_CURSOR,
-   OPTION_PCI_RETRY,
-   OPTION_ROTATE,
-   OPTION_SHADOW_FB,
-   OPTION_NOACCEL
+OPTION_HW_CURSOR,
+OPTION_PCI_RETRY,
+OPTION_ROTATE,
+OPTION_SHADOW_FB,
+OPTION_NOACCEL
 } LgOpts;

 static const OptionInfoRec LgOptions[] = {
-{ OPTION_HW_CURSOR,"HWcursor", OPTV_BOOLEAN,   {0}, 
FALSE },
-{ OPTION_NOACCEL,  "NoAccel",  OPTV_BOOLEAN,   {0}, FALSE },
-{ OPTION_SHADOW_FB, "ShadowFB",OPTV_BOOLEAN,   {0}, FALSE },
-{ OPTION_ROTATE,   "Rotate",   OPTV_ANYSTR,{0}, FALSE },
+{ OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN,   {0},FALSE },
+{ OPTION_NOACCEL,   "NoAccel",  OPTV_BOOLEAN,   {0},FALSE },
+{ OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN,   {0},FALSE },
+{ OPTION_ROTATE,"Rotate",   OPTV_ANYSTR,{0},FALSE },
 /* fifo_conservative/aggressive; fast/med/slow_dram; ... */
-{ -1,  NULL,   OPTV_NONE,  
{0}, FALSE }
+{ -1,   NULL,   OPTV_NONE,  {0},FALSE }
 };

-
 /*1/4bpp   8bpp   15/16bpp  24bpp  32bpp */
 static int gd5462_MaxClocks[] = { 17, 17, 135100, 135100,  85500 };
 static int gd5464_MaxClocks[] = { 17, 25, 17, 17, 135100 };
 static int gd5465_MaxClocks[] = { 17, 25, 17, 17, 135100 };

 LgLineDataRec LgLineData[] = {
-   { 5,  640, 0},  /* We're rather use skinny tiles, so put all of 
*/
-   { 8, 1024, 0},  /* them at the head of the table */
-   {10, 1280, 0},
-   {13, 1664, 0},
-   {16, 2048, 0},
-   {20, 2560, 0},
-   {10, 2560, 1},
-   {26, 3328, 0},
-   { 5, 1280, 1},
-   { 8, 2048, 1},
-   {13, 3328, 1},
-   {16, 4096, 1},
-   {20, 5120, 1},
-   {26, 6656, 1},
-   {-1, -1, -1}/* Sentinal to indicate end of table */
+{ 5,  640, 0},  /* We're rather use skinny tiles, so put all of */
+{ 8, 1024, 0},  /* them at the head of the table */
+{10, 1280, 0},
+{13, 1664, 0},
+{16, 2048, 0},
+{20, 2560, 0},
+{10, 2560, 1},
+{26, 3328, 0},
+{ 5, 1280, 1},
+{ 8, 2048, 1},
+{13, 3328, 1},
+{16, 4096, 1},
+{20, 5120, 1},
+{26, 6656, 1},
+{-1, -1,   -1}  /* Sentinal to indicate end of table */
 };

 static int LgLinePitches[4][11] = {
-   /*  8 */ { 640, 1024, 1280, 1664, 2048, 2560, 3328, 4096, 5120, 6656, 0 
},
-   /* 16 */ { 320,  512,  640,  832, 1024, 1280, 1664, 2048, 2560, 3328, 0 
},
-   /* 24 */ { 213,  341,  426,  554,  682,  853, 1109, 1365, 1706, 2218, 0 
},
-   /* 32 */ { 160,  256,  320,  416,  512,  640,  832, 1024, 1280

[PATCH xf86-video-cirrus 0/3] Clean up lg_driver.c

2019-04-17 Thread Kevin Brace
--

Kevin Brace (3):
  Tab to spaces conversion for lg_driver.c
  Fix indentation of lg_driver.c
  Make adjustments to code comments of lg_driver.c

 src/lg_driver.c | 3259 +++
 1 file changed, 1861 insertions(+), 1398 deletions(-)

--
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-cirrus] Eliminate pointer arithmetic compilation warnings

2019-04-11 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/cir.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cir.h b/src/cir.h
index b117793..dba7b65 100644
--- a/src/cir.h
+++ b/src/cir.h
@@ -39,8 +39,8 @@ typedef struct {
 Bool HasFBitBlt;
 CARD32 IOAddress;
 CARD32 FbAddress;
-void * IOBase;
-void * FbBase;
+unsigned char *IOBase;
+unsigned char *FbBase;
 long FbMapSize;
 long IoMapSize;
 int MinClock;
--
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-cirrus] Tab to spaces conversion for cir.h

2019-04-11 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/cir.h | 92 +++
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/src/cir.h b/src/cir.h
index 84f64b5..b117793 100644
--- a/src/cir.h
+++ b/src/cir.h
@@ -20,60 +20,60 @@ struct lgRec;
 struct alpRec;

 typedef struct {
-   ScrnInfoPtr pScrn;
-   CARD32  properties;
-   pciVideoPtr PciInfo;
+ScrnInfoPtr pScrn;
+CARD32 properties;
+pciVideoPtr PciInfo;
 #ifndef XSERVER_LIBPCIACCESS
-   PCITAG  PciTag;
+PCITAG PciTag;
 #endif
-   unsigned long   PIOReg;
+unsigned long PIOReg;
 union {
-   struct lgRec*lg;
-   struct alpRec   *alp;
+struct lgRec *lg;
+struct alpRec *alp;
 } chip;
-   EntityInfoPtr   pEnt;
-   int Chipset;
-   int ChipRev;
-   int Rounding;
-   int BppShift;
-   BoolHasFBitBlt;
-   CARD32  IOAddress;
-   CARD32  FbAddress;
-   void *  IOBase;
-   void *  FbBase;
-   longFbMapSize;
-   longIoMapSize;
-   int MinClock;
-   int MaxClock;
-   BoolNoAccel;
-   BoolHWCursor;
-   BoolUseMMIO;
+EntityInfoPtr pEnt;
+int Chipset;
+int ChipRev;
+int Rounding;
+int BppShift;
+Bool HasFBitBlt;
+CARD32 IOAddress;
+CARD32 FbAddress;
+void * IOBase;
+void * FbBase;
+long FbMapSize;
+long IoMapSize;
+int MinClock;
+int MaxClock;
+Bool NoAccel;
+Bool HWCursor;
+Bool UseMMIO;
 #ifdef HAVE_XAA_H
-   XAAInfoRecPtr   AccelInfoRec;
+XAAInfoRecPtr AccelInfoRec;
 #endif
-   xf86CursorInfoPtr   CursorInfoRec;
-   int DGAnumModes;
-   DGAModePtr  DGAModes;
-   BoolDGAactive;
-   Bool(*DGAModeInit)(ScrnInfoPtr, DisplayModePtr);
-   int DGAViewportStatus;
-   I2CBusPtr   I2CPtr1;
-   I2CBusPtr   I2CPtr2;
-   CloseScreenProcPtr  CloseScreen;
+xf86CursorInfoPtr CursorInfoRec;
+int DGAnumModes;
+DGAModePtr DGAModes;
+Bool DGAactive;
+Bool (*DGAModeInit)(ScrnInfoPtr, DisplayModePtr);
+int DGAViewportStatus;
+I2CBusPtr I2CPtr1;
+I2CBusPtr I2CPtr2;
+CloseScreenProcPtr CloseScreen;

-   BoolCursorIsSkewed;
-   BoolshadowFB;
-   int rotate;
-   int ShadowPitch;
-   unsigned char * ShadowPtr;
-   void(*PointerMoved)(SCRN_ARG_TYPE arg, int x, int 
y);
-   int pitch;
+Bool CursorIsSkewed;
+Bool shadowFB;
+int rotate;
+int ShadowPitch;
+unsigned char * ShadowPtr;
+void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y);
+int pitch;

-   unsigned char **ScanlineColorExpandBuffers;
-   void(*InitAccel)(ScrnInfoPtr);
-   int offscreen_size;
-   int offscreen_offset;
-   OptionInfoPtr   Options;
+unsigned char ** ScanlineColorExpandBuffers;
+void (*InitAccel)(ScrnInfoPtr);
+int offscreen_size;
+int offscreen_offset;
+OptionInfoPtr Options;
 } CirRec, *CirPtr;

 /* CirrusClk.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: Radeonhd repo not migrated to gitlab.

2019-03-13 Thread Kevin Brace
Hi Daniel,

I am not here to side with either one of you (i.e., Luc or you), but I have 
been wondering why some of the older, neglected (I use the word "underserved" 
to describe it) DDXs in general have weird git and ssh clone addresses.
For example, Number Nine Imagine 128 DDX.

https://cgit.freedesktop.org/xorg/driver/xf86-video-i128/

--
Clone
https://gitlab.freedesktop.org/xorg/driver/xf86-video-i128
git://anongit.freedesktop.org/xorg/xserver-test
ssh://git.freedesktop.org/git/xorg/xserver-test
https://anongit.freedesktop.org/git/xorg/driver/xf86-video-i128.git
--

Why do I see this xorg/xserver-test for xorg/driver/xf86-video-i128?
Another example will be S3 ViRGE DDX.

https://cgit.freedesktop.org/xorg/driver/xf86-video-s3virge/

--
Clone
https://gitlab.freedesktop.org/xorg/driver/xf86-video-s3virge
git://anongit.freedesktop.org/xorg/driver/xf86-video-p690
ssh://git.freedesktop.org/git/xorg/driver/xf86-video-p690
https://anongit.freedesktop.org/git/xorg/driver/xf86-video-s3virge.git
--

This time I see xorg/driver/xf86-video-p690.
I probably should not get into the conspiracy theory territory, but for 
some of the underserved DDXs some months ago, the git and ssh cloning addresses 
were definitely pointing to xorg/driver/xf86-video-radeonhd.
It was about roughly when you were working on GitLab migration.
Considering that the history between you and Luc, is there a good explanation 
for why the cloning addresses for git and ssh were pointing to 
xorg/driver/xf86-video-radeonhd back then?
I have been wondering if this was some kind of a prank considering the history 
of xf86-video-radeonhd.
I do not have a personal stake in what happened between you and Luc some years 
ago, but if you can try to correct the wrong git and ssh cloning address issue, 
that will be appreciated.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


> Date: Fri, 8 Mar 2019 06:37:21 +0900
> From: Daniel Stone 
> To: Adam Jackson 
> Cc: Luc Verhaegen , xorg-devel
>   
> Subject: Re: Radeonhd repo not migrated to gitlab.
> Message-ID:
>   
> Content-Type: text/plain; charset="UTF-8"
> 
> On Fri, 8 Mar 2019 at 04:35, Adam Jackson  wrote:
> > On Wed, 2019-03-06 at 17:04 +0100, Luc Verhaegen wrote:
> > > Is there a reason why, of _all_ drivers listed in
> > >
> > > https://cgit.freedesktop.org/xorg/driver
> > >
> > > the Radeonhd repository at
> > >
> > > https://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/
> > >
> > > has not been mirrored?
> >
> > Pretty sure I came up with the list of modules to migrate from the set
> > I happened to have cloned locally, but it's been months. I've added a
> > note to the migration ticket:
> >
> > https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/40
> 
> ... and I've migrated it.
> 
> FWIW, It was unique amongst all Xorg repos in that it didn't have a
> .git suffix on the directory (i.e. its path was
> /srv/git.freedesktop.org/git/xorg/driver/xf86-video-radeonhd/ rather
> than .../xf86-video-radeonhd.git/), which might explain it if you were
> pattern-matching to list all the repos. Certainly it broke the
> migration script so I had to rename it by hand first. Anyway, it's
> migrated now.
> 
> Cheers,
> Daniel
> 
> 

___
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/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);

[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, P

[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) <&

[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(ScrnInf

[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,
+un

[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);
 TRIDE

[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

[ANNOUNCE] xorg-server 1.19.7

2019-03-03 Thread Kevin Brace
This is a maintenance release for X.Org X Server 1.19 series.
My personal motivation for this release is to fix EXA 24 bpp crash 
bug that affects SiS 6326 based graphics card, but there are other 
small fixes of the code contributed by other people.
If your OS distribution uses X Server 1.19, please contact the vendor 
to let them know that upgraded code is now available.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


--
Adam Jackson (5):
  animcur: Use fixed-size screen private
  animcur: Return the next interval directly from the timer callback
  animcur: Run the timer from the device, not the screen
  animcur: Fix transitions between animated cursors
  os: Fix a type error in the IPv6 XDMCP code

Alex Goins (1):
  randr: Fix rotation check in ProcRRSetScreenSize()

Corentin Rossignon (1):
  glamor: Specify GLSL version for xv shader

Helmut Grohne (1):
  build: guess availability of monotonic clock for cross compilation

Jeff Smith (4):
  glamor: fix repeat-reflect case in linear gradient shader
  glamor: fix no-reflect case for gradients
  glamor: remove unused variables in linear gradient shader
  glamor: tidy up some gradient color formulas

Kevin Brace (3):
  Add 24-bit color support to exaGetPixmapFirstPixel
  Update configure.ac bug URL for gitlab migration
  xserver 1.19.7

Lukáš Krejčí (1):
  Xorg.wrap: Ensure correct ordering of post-install hook

Lyude Paul (1):
  xwayland: Don't process cursor warping without an xwl_seat

Mario Kleiner (1):
  glx: Only assign 8 bpc fbconfigs for composite visuals.

Martin Wilck (1):
  xfree86: add default modes for 16:9 and 16:10

Michal Srb (1):
  os/inputthread: Force unlock when stopping thread.

Michel Dänzer (2):
  Revert "present: Only send PresentCompleteNotify events to the presenting 
client"
  xf86XvMCScreenInit: Clear pScreenPriv->dixinfo when freeing pAdapt

Olivier Fourdan (2):
  xwayland: avoid race condition on new keymap
  xwayland: remove dirty window unconditionally on unrealize

Peter Harris (1):
  composite: Propagate damagedDescendants when reparented

Peter Hutterer (1):
  config: fix NULL value detection for ID_INPUT being unset

Tapani Pälli (1):
  glx: do not pick sRGB config for 32-bit RGBA visual

git tag: xorg-server-1.19.7

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.bz2
MD5:  350b0a3a9e758fef3168c9ff5daba243  xorg-server-1.19.7.tar.bz2
SHA1: 70c06a92a531aa3bf49d9d3de66e9a97c9f1191c  xorg-server-1.19.7.tar.bz2
SHA256: 7112f7128a4f5b06ceb8bba1bdc5e5c9e0fae682a42d35218bc12ba693f4c80c  
xorg-server-1.19.7.tar.bz2
PGP:  
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.bz2.sig

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.gz
MD5:  13c8cebe5bdac0fe5d888e02c57ddab7  xorg-server-1.19.7.tar.gz
SHA1: 82c699eced463ebe718515d6d334c063f467fe92  xorg-server-1.19.7.tar.gz
SHA256: 5f6d3da0d1e341f27a7706779a24a5fa7174d5f161b5f8530f103753f0152de7  
xorg-server-1.19.7.tar.gz
PGP:  
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.gz.sig

___
xorg-announce mailing list
xorg-announce@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-announce

[ANNOUNCE] xorg-server 1.19.7

2019-03-02 Thread Kevin Brace
This is a maintenance release for X.Org X Server 1.19 series.
My personal motivation for this release is to fix EXA 24 bpp crash 
bug that affects SiS 6326 based graphics card, but there are other 
small fixes of the code contributed by other people.
If your OS distribution uses X Server 1.19, please contact the vendor 
to let them know that upgraded code is now available.

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


--
Adam Jackson (5):
  animcur: Use fixed-size screen private
  animcur: Return the next interval directly from the timer callback
  animcur: Run the timer from the device, not the screen
  animcur: Fix transitions between animated cursors
  os: Fix a type error in the IPv6 XDMCP code

Alex Goins (1):
  randr: Fix rotation check in ProcRRSetScreenSize()

Corentin Rossignon (1):
  glamor: Specify GLSL version for xv shader

Helmut Grohne (1):
  build: guess availability of monotonic clock for cross compilation

Jeff Smith (4):
  glamor: fix repeat-reflect case in linear gradient shader
  glamor: fix no-reflect case for gradients
  glamor: remove unused variables in linear gradient shader
  glamor: tidy up some gradient color formulas

Kevin Brace (3):
  Add 24-bit color support to exaGetPixmapFirstPixel
  Update configure.ac bug URL for gitlab migration
  xserver 1.19.7

Lukáš Krejčí (1):
  Xorg.wrap: Ensure correct ordering of post-install hook

Lyude Paul (1):
  xwayland: Don't process cursor warping without an xwl_seat

Mario Kleiner (1):
  glx: Only assign 8 bpc fbconfigs for composite visuals.

Martin Wilck (1):
  xfree86: add default modes for 16:9 and 16:10

Michal Srb (1):
  os/inputthread: Force unlock when stopping thread.

Michel Dänzer (2):
  Revert "present: Only send PresentCompleteNotify events to the presenting 
client"
  xf86XvMCScreenInit: Clear pScreenPriv->dixinfo when freeing pAdapt

Olivier Fourdan (2):
  xwayland: avoid race condition on new keymap
  xwayland: remove dirty window unconditionally on unrealize

Peter Harris (1):
  composite: Propagate damagedDescendants when reparented

Peter Hutterer (1):
  config: fix NULL value detection for ID_INPUT being unset

Tapani Pälli (1):
  glx: do not pick sRGB config for 32-bit RGBA visual

git tag: xorg-server-1.19.7

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.bz2
MD5:  350b0a3a9e758fef3168c9ff5daba243  xorg-server-1.19.7.tar.bz2
SHA1: 70c06a92a531aa3bf49d9d3de66e9a97c9f1191c  xorg-server-1.19.7.tar.bz2
SHA256: 7112f7128a4f5b06ceb8bba1bdc5e5c9e0fae682a42d35218bc12ba693f4c80c  
xorg-server-1.19.7.tar.bz2
PGP:  
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.bz2.sig

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.gz
MD5:  13c8cebe5bdac0fe5d888e02c57ddab7  xorg-server-1.19.7.tar.gz
SHA1: 82c699eced463ebe718515d6d334c063f467fe92  xorg-server-1.19.7.tar.gz
SHA256: 5f6d3da0d1e341f27a7706779a24a5fa7174d5f161b5f8530f103753f0152de7  
xorg-server-1.19.7.tar.gz
PGP:  
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.19.7.tar.gz.sig

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

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

2019-02-26 Thread Kevin Brace
Hi René,

The reasons I am renaming the files are to unify the naming convention of 
certain files and to make them consistent across many DDXs.
Regarding the character spacing issue, it is pretty annoying to have tabs and 
white spaces mixed up when working on the code.
Furthermore, I am trying to align the code with the X.Org coding guideline.
Speaking of working on the code, there will be a fix for xf86-video-trident 
for TGUI family of devices eventually (I have not posted the patch yet), and I 
am currently analyzing why Cirrus Logic Laguna based devices do not work on X 
Server 1.19, unless acceleration is explicitly turned off.
While I will not explicitly commit to it at this point, I will likely 
modernize the old, neglected DDXs when I have more time in the years ahead.
I am trying to clean up the code before that happens.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


> Sent: Tuesday, February 26, 2019 at 11:08 AM
> From: "René Rebe" 
> To: "Kevin Brace" 
> Cc: xorg-devel@lists.x.org
> Subject: Re: [PATCH xf86-video-trident 0/3] Convert xp4_accel_exa.c to 
> xp4_exa.c
>
> Hi,
> ed 
> On 26 Feb 2019, at 00:41, Kevin Brace  wrote:
> 
> > --
> > 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%)
> 
> 
> While I in general appreciate your work, I do not quite understand why you 
> need
> to rename files and re-space files. IMHO this does not make maintaining and
> especially historical code comparison, re-diffing, cherry-picking and bug 
> hunting
> easier, ..? :-/
> 
>   René
> 
> -- 
>  ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
>  http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
> http://t2-project.org | http://rene.rebe.de
> 
>
___
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 xp4_accel_exa.c

2019-02-25 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, P

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

2019-02-25 Thread Kevin Brace
--
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 3/3] Rename xp4_accel_exa.c to xp4_exa.c

2019-02-25 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 50b2a73..12e3d2e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,5 +49,5 @@ trident_drv_la_SOURCES = \
  trident_video.c \
  tvga_dac.c \
  xp_accel.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 2/3] Fix indentation of xp4_accel_exa.c

2019-02-25 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);

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

2019-02-25 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 9e65055..50b2a73 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,5 +49,5 @@ trident_drv_la_SOURCES = \
  trident_video.c \
  tvga_dac.c \
  xp_accel.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 3/4] Suppress unused function compilation warnings for XP4 XAA functions

2019-02-25 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 2/4] Fix indentation of xp4_accel.c

2019-02-25 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(ScrnInf

[PATCH xf86-video-trident 0/4] Convert xp4_accel.c to xp4_xaa.c

2019-02-25 Thread Kevin Brace
--
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 1/4] Tab to spaces conversion for xp4_accel.c

2019-02-25 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) <&

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

2019-02-22 Thread Kevin Brace
Hi Walter,

I am keeping the dead code for reference purpose only.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


> Sent: Thursday, February 21, 2019 at 12:15 PM
> From: "Walter Harms" 
> To: "Kevin Brace" , xorg-devel@lists.x.org
> Subject: 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(ScrnIn

[PATCH xf86-video-trident 2/3] Fix indentation of blade_accel_exa.c

2019-02-21 Thread Kevin Brace
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-&

[PATCH xf86-video-trident 3/3] Rename blade_accel_exa.c to blade_exa.c

2019-02-21 Thread Kevin Brace
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,
-i

[PATCH xf86-video-trident 0/3] Convert blade_accel_exa.c to blade_exa.c

2019-02-21 Thread Kevin Brace
--
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

2019-02-21 Thread Kevin Brace
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 << 

[PATCH xf86-video-trident 2/3] Fix indentation for blade_accel.c

2019-02-21 Thread Kevin Brace
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

[PATCH xf86-video-trident 3/3] Rename blade_accel.c to blade_xaa.c

2019-02-21 Thread Kevin Brace
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,
-i

[PATCH xf86-video-trident 0/3] Convert blade_accel.c to blade_xaa.c

2019-02-21 Thread Kevin Brace
--
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

2019-02-21 Thread Kevin Brace
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

[PATCH xf86-video-cirrus] XAA compilation fix

2019-02-20 Thread Kevin Brace
One line fix for commit 27f85fc523102f89c3fc1546ae500816ccbffc8a 
(Don't build split alpine and laguna support) when compiling files that 
use XAA.

--
Kevin Brace (1):
  Fix for a compilation error when compiling XAA related files

 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
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-cirrus] Fix for a compilation error when compiling XAA related files

2019-02-20 Thread Kevin Brace
When commit 27f85fc523102f89c3fc1546ae500816ccbffc8a (Don't build
split alpine and laguna support) merged Alpine and Laguna support,
it missed a backslash ('\') to denote the next line for XAA related
files.

Signed-off-by: Kevin Brace 
---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 2ceb828..bc8732d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,7 @@ cirrus_drv_la_SOURCES = \
 if XAA
 cirrus_drv_la_SOURCES += \
  alp_xaa.c \
- alp_xaam.c
+ alp_xaam.c \
  lg_xaa.c \
  lg_xaa.h
 endif
-- 
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 v3 3/3] Rename trident_accel.c to tgui_xaa.c

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am |   2 +-
 src/tgui_xaa.c  | 738 
 src/trident_accel.c | 738 
 3 files changed, 739 insertions(+), 739 deletions(-)
 create mode 100644 src/tgui_xaa.c
 delete mode 100644 src/trident_accel.c

diff --git a/src/Makefile.am b/src/Makefile.am
index 9e65055..6c230ed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,7 +34,7 @@ trident_drv_la_SOURCES = \
  blade_accel_exa.c \
  compat-api.h \
  image_accel.c \
- trident_accel.c \
+ tgui_xaa.c \
  trident_bank.c \
  trident_dac.c \
  trident_dga.c \
diff --git a/src/tgui_xaa.c b/src/tgui_xaa.c
new file mode 100644
index 000..8b38543
--- /dev/null
+++ b/src/tgui_xaa.c
@@ -0,0 +1,738 @@
+/*
+ * 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
+ * "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 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 "xaalocal.h"
+#include "xaarop.h"
+
+static void TridentSync(ScrnInfoPtr pScrn);
+static void TridentSetupForDashedLine(ScrnInfoPtr pScrn,
+int fg, int bg,
+int rop,
+unsigned int planemask,
+int length,
+unsigned char *pattern);
+static void TridentSubsequentDashedBresenhamLine(ScrnInfoPtr pScrn,
+int x, int y,
+int dmaj, int dmin,
+int e, int len,
+int octant,
+int phase);
+static void TridentSetupForSolidLine(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int planemask);
+static void TridentSubsequentSolidBresenhamLine(ScrnInfoPtr pScrn,
+int x, int y,
+int dmaj, int dmin,
+int e, int len,
+int octant);
+static void TridentSubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
+int x, int y,
+int len, int dir);
+static void TridentSetupForFillRectSolid(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int planemask);
+static void TridentSubsequentFillRectSolid(ScrnInfoPtr pScrn,
+int x, int y,
+int w, int h);
+static void TridentSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
+int x1, int y1,
+int x2, int y2,
+int w, int h);
+static void TridentSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
+int xdir, int ydir,
+int rop,
+   

[PATCH xf86-video-trident v3 0/3] Convert trident_accel.c to tgui_xaa.c

2019-02-19 Thread Kevin Brace
v2: Refresh the patches
v3: Fix for a compilation error at line 593

--
Kevin Brace (3):
  Tab to spaces conversion for trident_accel.c
  Fix indentation for trident_accel.c
  Rename trident_accel.c to tgui_xaa.c

 src/Makefile.am |   2 +-
 src/tgui_xaa.c  | 738 
 src/trident_accel.c | 671 ---
 3 files changed, 739 insertions(+), 672 deletions(-)
 create mode 100644 src/tgui_xaa.c
 delete mode 100644 src/trident_accel.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 v3 1/3] Tab to spaces conversion for trident_accel.c

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/trident_accel.c | 540 ++--
 1 file changed, 268 insertions(+), 272 deletions(-)

diff --git a/src/trident_accel.c b/src/trident_accel.c
index f47fab4..329cc7a 100644
--- a/src/trident_accel.c
+++ b/src/trident_accel.c
@@ -43,56 +43,55 @@
 #include "xaarop.h"
 
 static void TridentSync(ScrnInfoPtr pScrn);
-static void TridentSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, 
-   int rop, unsigned int planemask, int length,
-   unsigned char *pattern);
+static void TridentSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
+int rop, unsigned int planemask, int length,
+unsigned char *pattern);
 static void TridentSubsequentDashedBresenhamLine(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 TridentSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void TridentSubsequentSolidBresenhamLine(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 TridentSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y,
-   int len, int dir);
+int len, int dir);
 static void TridentSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void TridentSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-   int y, int w, int h);
+int y, int w, int h);
 static void TridentSubsequentScreenToScreenCopy(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 TridentSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-   int xdir, int ydir, int rop, 
-unsigned int planemask,
-   int transparency_color);
-static void TridentSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, int fg, int bg, 
-   int rop, unsigned int planemask);
-static void TridentSubsequentMono8x8PatternFillRect(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 TridentSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
+int patternx, int patterny, int fg, int bg,
+int rop, unsigned int planemask);
+static void TridentSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
+int patternx, int patterny, int x, int y,
+int w, int h);
 #if 0
-static void TridentSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, 
-   int rop, unsigned int planemask, int trans_col);
-static void TridentSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, int x, int y, 
-   int w, int h);
+static void TridentSetupForColor8x8PatternFill(ScrnInfoPtr pScrn,
+int patternx, int patterny,
+int rop, unsigned int planemask, int trans_col);
+static void TridentSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn,
+int patternx, int patterny, int x, int y,
+int w, int h);
 #endif
 #if 0
 static void TridentSetupForScanlineCPUToScreenColorExpandFill(
-   ScrnInfoPtr pScrn,
-   int fg, int bg, int rop, 
-   unsigned int planemask);
+ScrnInfoPtr pScrn,
+int fg, int bg, int rop,
+unsigned int planemask);
 static void TridentSubsequentScanlineCPUToScreenColorExpandFill(
-   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 TridentSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
 #endif
 
-
 static void
 TridentInitializeAccelerator(ScrnInfoPtr pScrn)
 {
@@ -104,9 +103,9 @@ TridentInitializeAccelerator(ScrnInfoPtr pScrn)
 CHECKCLIPPING;
 
 if ( (pTrident->Chipset == PROVIDIA9682) ||
- (pTrident->Chip

[PATCH xf86-video-trident v3 2/3] Fix indentation for trident_accel.c

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/trident_accel.c | 477 ++--
 1 file changed, 274 insertions(+), 203 deletions(-)

diff --git a/src/trident_accel.c b/src/trident_accel.c
index 329cc7a..8b38543 100644
--- a/src/trident_accel.c
+++ b/src/trident_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, 
- * 
+ *
  * Trident accelerated options.
  */
 
@@ -43,55 +45,86 @@
 #include "xaarop.h"
 
 static void TridentSync(ScrnInfoPtr pScrn);
-static void TridentSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
-int rop, unsigned int planemask, int length,
-unsigned char *pattern);
+static void TridentSetupForDashedLine(ScrnInfoPtr pScrn,
+int fg, int bg,
+int rop,
+unsigned int planemask,
+int length,
+unsigned char *pattern);
 static void TridentSubsequentDashedBresenhamLine(ScrnInfoPtr pScrn,
-int x, int y, int dmaj, int dmin, int e,
-int len, int octant, int phase);
-static void TridentSetupForSolidLine(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 TridentSetupForSolidLine(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int planemask);
 static void TridentSubsequentSolidBresenhamLine(ScrnInfoPtr pScrn,
-int x, int y, int dmaj, int dmin, int e,
-int len, int octant);
-static void TridentSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y,
-int len, int dir);
-static void TridentSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-int rop, unsigned int planemask);
-static void TridentSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-int y, int w, int h);
+int x, int y,
+int dmaj, int dmin,
+int e, int len,
+int octant);
+static void TridentSubsequentSolidHorVertLine(ScrnInfoPtr pScrn,
+

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

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/image_accel.c | 456 +++---
 1 file changed, 228 insertions(+), 228 deletions(-)

diff --git a/src/image_accel.c b/src/image_accel.c
index 4dc13ff..1ed074e 100644
--- a/src/image_accel.c
+++ b/src/image_accel.c
@@ -46,52 +46,52 @@ static void ImageSync(ScrnInfoPtr pScrn);
 static void ImageSyncClip(ScrnInfoPtr pScrn);
 #if 0
 static void ImageSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void ImageSubsequentSolidBresenhamLine(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 ImageSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void ImageSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-   int y, int w, int h);
+int y, int w, int h);
 static void ImageSubsequentScreenToScreenCopy(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 ImageSetupForScreenToScreenCopy(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 ImageSetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1, 
-   int x2, int y2);
+int x2, int y2);
 static void ImageDisableClipping(ScrnInfoPtr pScrn);
 static void ImageSetupForMono8x8PatternFill(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 ImageSubsequentMono8x8PatternFillRect(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);
 #if 0
 static void ImageSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, 
-   int rop, unsigned int planemask, int trans_col);
+int patternx, int patterny,
+int rop, unsigned int planemask, int trans_col);
 static void ImageSubsequentColor8x8PatternFillRect(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);
 #endif
 static void ImageSetupForScanlineImageWrite(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 ImageSubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn, int x,
-   int y, int w, int h, int skipleft);
+int y, int w, int h, int skipleft);
 static void ImageSubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno);
 static void ImageSetupForScanlineCPUToScreenColorExpandFill(
-   ScrnInfoPtr pScrn,
-   int fg, int bg, int rop, 
-   unsigned int planemask);
+ScrnInfoPtr pScrn,
+int fg, int bg, int rop,
+unsigned int planemask);
 static void ImageSubsequentScanlineCPUToScreenColorExpandFill(
-   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 ImageSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
 
 
@@ -101,18 +101,18 @@ ImageInitializeAccelerator(ScrnInfoPtr pScrn)
 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
 switch (pScrn->depth) {
-   case 8:
-   pTrident->EngineOperation = 0;
-   break;
-   case 15:
-   pTrident->EngineOperation = 5;
-   break;
-   case 16:
-   pTrident->EngineOperation = 1;
-   break;
-   case 24:
-   pTrident->EngineOperation = 2;
-   break;
+case 8:
+pTrident->EngineOperation = 0;
+break;
+case 15:
+pTrident->EngineOperation = 5;
+   

[PATCH xf86-video-trident 3/3] Rename image_accel.c to image_xaa.c

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/Makefile.am   |   2 +-
 src/image_accel.c | 788 --
 src/image_xaa.c   | 788 ++
 3 files changed, 789 insertions(+), 789 deletions(-)
 delete mode 100644 src/image_accel.c
 create mode 100644 src/image_xaa.c

diff --git a/src/Makefile.am b/src/Makefile.am
index 6c230ed..f2dc14c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,7 @@ trident_drv_la_SOURCES = \
  blade_accel.c \
  blade_accel_exa.c \
  compat-api.h \
- image_accel.c \
+ image_xaa.c \
  tgui_xaa.c \
  trident_bank.c \
  trident_dac.c \
diff --git a/src/image_accel.c b/src/image_accel.c
deleted file mode 100644
index b90e0d3..000
--- a/src/image_accel.c
+++ /dev/null
@@ -1,788 +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 3DImage' 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 ImageSync(ScrnInfoPtr pScrn);
-static void ImageSyncClip(ScrnInfoPtr pScrn);
-#if 0
-static void ImageSetupForSolidLine(ScrnInfoPtr pScrn,
-int color,
-int rop,
-unsigned int planemask);
-static void ImageSubsequentSolidBresenhamLine(ScrnInfoPtr pScrn,
-int x, int y,
-int dmaj, int dmin,
-int e, int len,
-int octant);
-#endif
-static void ImageSetupForFillRectSolid(ScrnInfoPtr pScrn,
-int color,
-int rop,
-unsigned int planemask);
-static void ImageSubsequentFillRectSolid(ScrnInfoPtr pScrn,
-int x, int y,
-int w, int h);
-static void ImageSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
-int x1, int y1,
-int x2, int y2,
-int w, int h);
-static void ImageSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-int xdir, int ydir,
-int rop,
-unsigned int planemask,
-int transparency_color);
-static void ImageSetClippingRectangle(ScrnInfoPtr pScrn,
-int x1, int y1,
-int x2, int y2);
-static void ImageDisableClipping(ScrnInfoPtr pScrn);
-static void ImageSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
-int patternx,
-int patterny,
-int fg, int bg,
-int rop,
-unsigned int planemask);
-static void ImageSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
-int patternx,
-   

[PATCH xf86-video-trident 2/3] Fix indentation for image_accel.c

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/image_accel.c | 561 ++
 1 file changed, 351 insertions(+), 210 deletions(-)

diff --git a/src/image_accel.c b/src/image_accel.c
index 1ed074e..b90e0d3 100644
--- a/src/image_accel.c
+++ b/src/image_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 3DImage' accelerated options.
  */
 
@@ -42,57 +44,88 @@
 #include "xaarop.h"
 #include "xaalocal.h"
 
+
 static void ImageSync(ScrnInfoPtr pScrn);
 static void ImageSyncClip(ScrnInfoPtr pScrn);
 #if 0
-static void ImageSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-int rop, unsigned int planemask);
+static void ImageSetupForSolidLine(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int planemask);
 static void ImageSubsequentSolidBresenhamLine(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 ImageSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-int rop, unsigned int planemask);
-static void ImageSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-int y, int w, int h);
+static void ImageSetupForFillRectSolid(ScrnInfoPtr pScrn,
+int color,
+int rop,
+unsigned int planemask);
+static void ImageSubsequentFillRectSolid(ScrnInfoPtr pScrn,
+int x, int y,
+int w, int h);
 static void ImageSubsequentScreenToScreenCopy(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 ImageSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-int xdir, int ydir, int rop,
-unsigned int planemask,
-int transparency_color);
-static void ImageSetClippingRectangle(ScrnInfoPtr pScrn, int x1, int y1, 
-int x2, int y2);
+int xdir, int ydir,
+int rop,
+  

[PATCH xf86-video-trident 0/3] Convert image_accel.c to image_xaa.c

2019-02-19 Thread Kevin Brace
--
Kevin Brace (3):
  Tab to spaces conversion for image_accel.c
  Fix indentation for image_accel.c
  Rename image_accel.c to image_xaa.c

 src/Makefile.am   |   2 +-
 src/image_accel.c | 647 
 src/image_xaa.c   | 788 ++
 3 files changed, 789 insertions(+), 648 deletions(-)
 delete mode 100644 src/image_accel.c
 create mode 100644 src/image_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 v2 1/3] Tab to spaces conversion for trident_accel.c

2019-02-19 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/trident_accel.c | 540 ++--
 1 file changed, 268 insertions(+), 272 deletions(-)

diff --git a/src/trident_accel.c b/src/trident_accel.c
index f47fab4..329cc7a 100644
--- a/src/trident_accel.c
+++ b/src/trident_accel.c
@@ -43,56 +43,55 @@
 #include "xaarop.h"
 
 static void TridentSync(ScrnInfoPtr pScrn);
-static void TridentSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, 
-   int rop, unsigned int planemask, int length,
-   unsigned char *pattern);
+static void TridentSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg,
+int rop, unsigned int planemask, int length,
+unsigned char *pattern);
 static void TridentSubsequentDashedBresenhamLine(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 TridentSetupForSolidLine(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void TridentSubsequentSolidBresenhamLine(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 TridentSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, int x, int y,
-   int len, int dir);
+int len, int dir);
 static void TridentSetupForFillRectSolid(ScrnInfoPtr pScrn, int color,
-   int rop, unsigned int planemask);
+int rop, unsigned int planemask);
 static void TridentSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x,
-   int y, int w, int h);
+int y, int w, int h);
 static void TridentSubsequentScreenToScreenCopy(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 TridentSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-   int xdir, int ydir, int rop, 
-unsigned int planemask,
-   int transparency_color);
-static void TridentSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, int fg, int bg, 
-   int rop, unsigned int planemask);
-static void TridentSubsequentMono8x8PatternFillRect(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 TridentSetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
+int patternx, int patterny, int fg, int bg,
+int rop, unsigned int planemask);
+static void TridentSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
+int patternx, int patterny, int x, int y,
+int w, int h);
 #if 0
-static void TridentSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, 
-   int rop, unsigned int planemask, int trans_col);
-static void TridentSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, 
-   int patternx, int patterny, int x, int y, 
-   int w, int h);
+static void TridentSetupForColor8x8PatternFill(ScrnInfoPtr pScrn,
+int patternx, int patterny,
+int rop, unsigned int planemask, int trans_col);
+static void TridentSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn,
+int patternx, int patterny, int x, int y,
+int w, int h);
 #endif
 #if 0
 static void TridentSetupForScanlineCPUToScreenColorExpandFill(
-   ScrnInfoPtr pScrn,
-   int fg, int bg, int rop, 
-   unsigned int planemask);
+ScrnInfoPtr pScrn,
+int fg, int bg, int rop,
+unsigned int planemask);
 static void TridentSubsequentScanlineCPUToScreenColorExpandFill(
-   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 TridentSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
 #endif
 
-
 static void
 TridentInitializeAccelerator(ScrnInfoPtr pScrn)
 {
@@ -104,9 +103,9 @@ TridentInitializeAccelerator(ScrnInfoPtr pScrn)
 CHECKCLIPPING;
 
 if ( (pTrident->Chipset == PROVIDIA9682) ||
- (pTrident->Chip

  1   2   3   >