[PATCH xf86-video-sis] Convert EXA support preprocessor macro to USE_EXA

2018-12-17 Thread Kevin Brace
All the other DDXs do it this way.

Signed-off-by: Kevin Brace 
---
 configure.ac | 2 +-
 src/sis.h| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index d74e197..1caa528 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,7 @@ AM_CONDITIONAL(XAA, test "x$XAA" = xyes)
 AC_MSG_RESULT([$XAA])
 
 # technically this should be a configure flag.  meh.
-AC_DEFINE(XF86EXA, 1, [Build support for Exa])
+AC_DEFINE(USE_EXA, 1, [Build support for EXA])
 
 SAVE_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
diff --git a/src/sis.h b/src/sis.h
index 2b764cb..b30f7a8 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -230,7 +230,7 @@
 
 #ifdef SISVRAMQ
 #ifdef XORG_VERSION_CURRENT
-#if defined(SIS_HAVE_EXA) || (defined(XF86EXA) && (XF86EXA != 0))
+#if defined(SIS_HAVE_EXA) || (defined(USE_EXA) && (USE_EXA != 0))
 #if 1
 #define SIS_USE_EXA/* Include code for EXA */
 #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

Re: Will like to see some action on ScreenWakeupHandlerProcPtr related patch

2018-12-17 Thread Alan Coopersmith

On 12/17/18 03:09 PM, Kevin Brace wrote:

Hi,

I posted a small patch related to ScreenWakeupHandlerProcPtr several days ago.

https://lists.x.org/archives/xorg-devel/2018-December/057793.html
https://patchwork.freedesktop.org/patch/268118/

I usually limit my work to DDXs, so this is the first time I generated a patch 
for X Server itself.
I believe this patch applies to X Server 1.19 and 1.20.
In particular, I will like to see the patch backported to the future X Server 
1.19.7 maintenance release since it affects S3 Savage DDX.
Furthermore, is X Server 1.19.7 going to be released soon?
I hope the patch gets incorporated into that release.


Isn't that an ABI break which will break every other driver?  (At least on 
64-bit systems where unsigned long is twice the size of int.)


We don't do those in stable releases like 1.19.x.

--
-Alan Coopersmith-   alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/alanc
___
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

Will like to see some action on ScreenWakeupHandlerProcPtr related patch

2018-12-17 Thread Kevin Brace
Hi,

I posted a small patch related to ScreenWakeupHandlerProcPtr several days ago.

https://lists.x.org/archives/xorg-devel/2018-December/057793.html
https://patchwork.freedesktop.org/patch/268118/

I usually limit my work to DDXs, so this is the first time I generated a patch 
for X Server itself.
I believe this patch applies to X Server 1.19 and 1.20.
In particular, I will like to see the patch backported to the future X Server 
1.19.7 maintenance release since it affects S3 Savage DDX.
Furthermore, is X Server 1.19.7 going to be released soon?
I hope the patch gets incorporated into that release.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] Add 24-bit color support to exaGetPixmapFirstPixel

2018-12-17 Thread Kevin Brace
Hi Adam,

Not that it matters, but I am actually writing this e-mail from a computer that 
has SiS6326 in it.
It is an Intel Celeron 2.0A GHz (Pentium 4 based) computer along with a 
mainboard support for "legacy" (i.e., 3.3 V signaling) AGP cards.
The mainboard even has support for ACPI S3 State (Suspend to RAM), and while 
the SiS DDX UMS code for SiS6326 is not perfect, I can get the desktop back 
after standby resume if I cycle through VT and back to desktop.
Actually, many, many PCI and AGP cards of that era will go nuts when the 
computer comes out of standby (i.e., RAGE 128), so this is pretty good.
The particular card I have uses really cheap looking 2 layer PCB . . . (i.e., 
no power and ground inner conducting layer to reduce noise like 4 layer PCB 
has), but the graphics card appears to work fine somehow. (the picture is okay)
No crashes for the past 4 days I have been doing DDX related cleanup work. 
(i.e., SiS, Trident, and Alliance Semiconductor DDX patches I just posted)
Not bad as far as I am concerned considering how lousy looking the card's 
construction is.
Anyway, the only way I can use such an old AGP graphics card with Xubuntu 
16.04.5 (X Server 1.19 and Xfce) is because I limit the color bits per pixel 
(bpp) to 16 bit.
I have to use xorg.conf for this where I rather not.
If I were to explain the situation in more details, if I do not use 
xorg.conf, it can display Xubuntu login screen, but as soon as it gets to the 
desktop, the X Server will crash.
It is precisely crashing at exaGetPixmapFirstPixel.
I will assume that when Xfce tries to display the desktop icons, it crashes the 
X Server due to the lack of 24 bpp support inside exaGetPixmapFirstPixel.
The rendering is fine for the login screen as far as I am concerned, so I would 
imagine that EXA can theoretically support 24 bpp, but no one really tried 
since by the time EXA was developed, every new graphics had 32 bpp support, and 
developers "forgot" to support 24 bpp only graphics cards.
I do not see any particular harm backporting that one line inside the still 
supported X Servers. (1.16 through 1.20)

Regards,

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


> Sent: Monday, December 17, 2018 at 1:52 PM
> From: "Adam Jackson" 
> To: "Kevin Brace" , xorg-devel@lists.x.org
> Subject: Re: [PATCH] Add 24-bit color support to exaGetPixmapFirstPixel
>
> On Thu, 2018-12-13 at 22:32 -0600, Kevin Brace wrote:
> > It appears that people who developed EXA forgot that there used to be
> > graphics devices that used 24-bits (3 bytes) instead of 32-bits (4 bytes)
> > in order to display one pixel. The lack of 24-bit color support inside
> > exaGetPixmapFirstPixel causes SiS 6326 to crash when running Xfce since
> > SiS 6326 does not support 32-bit color.
> 
> fb doesn't support 24bpp anymore, so this patch isn't going to do
> anything useful I don't think.
> 
> - 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

[PATCH xf86-video-trident 1/2] Use const char for xf86GetOptValString return type

2018-12-17 Thread Kevin Brace
Apparently, xf86GetOptValString changed their return type from char
to const char between X Server 1.15 and 1.16. In particular, X Server
commit e1e01d2e33c632e395d7e396f73fba8ae606b15a made the change. This
commit will suppress the compilation warning.

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

diff --git a/src/trident_driver.c b/src/trident_driver.c
index 5771311..d958268 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -1010,7 +1010,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
 ClockRangePtr clockRanges;
 Bool ddcLoaded = FALSE;
 xf86MonPtr pMon = NULL;
-char *s;
+const char *s;
 Bool tmp_bool;
 
 /* Allocate the TRIDENTRec driverPrivate */
-- 
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-apm 4/4] Use libpciaccess for newer X Servers when unmapping video RAM

2018-12-17 Thread Kevin Brace
Commit d1e29902483a82e86b07cd30d41d411e71b776ea missed using
XSERVER_LIBPCIACCESS conditional compilation keyword when unmapping
video RAM. This meant that the code was not getting compiled correctly
for newer X Servers due to the missing xf86UnMapVidMem.

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

diff --git a/src/apm_driver.c b/src/apm_driver.c
index 4be81de..3c41b1c 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -752,7 +752,11 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
LinMap[0xFFECDB] = db;
LinMap[0xFFECD9] = d9;
/*pciWriteLong(pApm->PciTag, PCI_CMD_STAT_REG, save);*/
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)LinMap, pApm->LinMapSize);
+#else
+   pci_device_unmap_range(pApm->PciInfo, (pointer)LinMap, 
pApm->LinMapSize);
+#endif
from = X_PROBED;
 }
 else {
@@ -1135,11 +1139,19 @@ ApmUnmapMem(ScrnInfoPtr pScrn)
WRXB(0xDB, pApm->db);
}
WRXB(0xC9, pApm->c9);
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, 
pApm->LinMapSize);
+#else
+   pci_device_unmap_range(pApm->PciInfo, (pointer)pApm->LinMap, 
pApm->LinMapSize);
+#endif
pApm->LinMap = NULL;
 }
 else if (pApm->FbBase)
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, 0x1);
+#else
+   pci_device_unmap_range(pApm->PciInfo, (pointer)pApm->LinMap, 0x1);
+#endif
 
 return TRUE;
 }
-- 
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-apm 3/4] Eliminate unused variable compilation warnings

2018-12-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/apm_dga.c| 1 -
 src/apm_driver.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/apm_dga.c b/src/apm_dga.c
index 6e92123..a2ff48e 100644
--- a/src/apm_dga.c
+++ b/src/apm_dga.c
@@ -236,7 +236,6 @@ ApmDGAInit(ScreenPtr pScreen)
 static Bool
 ApmSetMode(ScrnInfoPtr pScrn, DGAModePtr pMode)
 {
-intindex = pScrn->pScreen->myNum;
 APMDECL(pScrn);
 
 if (!pMode) { /* restore the original mode */
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 92da51c..4be81de 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -355,7 +355,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 EntityInfoPtr  pEnt;
 vgaHWPtr   hwp;
 MessageTypefrom;
-char   *mod = NULL, *req = NULL;
+char   *mod = NULL;
 const char *s;
 ClockRangePtr  clockRanges;
 inti;
-- 
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-apm 2/4] Use const char for xf86GetOptValString return type

2018-12-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/apm_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/apm_driver.c b/src/apm_driver.c
index ece599e..92da51c 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -355,7 +355,8 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 EntityInfoPtr  pEnt;
 vgaHWPtr   hwp;
 MessageTypefrom;
-char   *mod = NULL, *req = NULL, *s;
+char   *mod = NULL, *req = NULL;
+const char *s;
 ClockRangePtr  clockRanges;
 inti;
 xf86MonPtr MonInfo = NULL;
-- 
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-apm 1/4] Remove miInitializeBackingStore

2018-12-17 Thread Kevin Brace
Apparently, it is no longer available.

Signed-off-by: Kevin Brace 
---
 src/apm_driver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/apm_driver.c b/src/apm_driver.c
index e40e1c2..ece599e 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -1784,7 +1784,6 @@ ApmScreenInit(SCREEN_INIT_ARGS_DECL)
 }
 #endif
 
-miInitializeBackingStore(pScreen);
 xf86SetBackingStore(pScreen);
 xf86SetSilkenMouse(pScreen);
 
-- 
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/4] Eliminate constant related compilation warnings for native functions

2018-12-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/sis_driver.c  | 2 +-
 src/sis_utility.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 8e86c06..8a62572 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -1305,7 +1305,7 @@ SiSCopyModeNLink(ScrnInfoPtr pScrn, DisplayModePtr dest,
  * (Code base taken from mga driver)
  */
 static DisplayModePtr
-SiSGetModeFromName(char* str, DisplayModePtr i)
+SiSGetModeFromName(const char* str, DisplayModePtr i)
 {
 DisplayModePtr c = i;
 if(!i) return NULL;
diff --git a/src/sis_utility.c b/src/sis_utility.c
index 1617922..22f3d7e 100644
--- a/src/sis_utility.c
+++ b/src/sis_utility.c
@@ -850,7 +850,7 @@ SISGetMergedModeDetails(ScrnInfoPtr pScrn,
  ***/
 
 static void
-sisutil_prepare_string(xSiSCtrlCommandReply *sdcbuf, char *mystring)
+sisutil_prepare_string(xSiSCtrlCommandReply *sdcbuf, const char *mystring)
 {
int slen = 0;
sdcbuf->sdc_buffer[0] = 0;
-- 
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 3/4] Eliminate swap macro related unused variable compilation warnings

2018-12-17 Thread Kevin Brace
Unfortunately, commit c530ebb5d4ad0663838a0132e3610d713eaaa640 did not
the check for ABI_VIDEODRV_VERSION where the swap macros are actually
used in the code. Checking for ABI_VIDEODRV_VERSION suppresses unused
variable compilation warnings for newer versions of the X Server.

Signed-off-by: Kevin Brace 
---
 src/sis_driver.c  | 26 ++
 src/sis_utility.c |  8 
 2 files changed, 34 insertions(+)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index d5ba1bd..8e86c06 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -2148,7 +2148,9 @@ int
 SiSProcXineramaQueryVersion(ClientPtr client)
 {
 xPanoramiXQueryVersionReply  rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 
 REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
 rep.type = X_Reply;
@@ -2172,7 +2174,9 @@ SiSProcXineramaGetState(ClientPtr client)
 REQUEST(xPanoramiXGetStateReq);
 WindowPtr  pWin;
 xPanoramiXGetStateReplyrep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int   n;
+#endif
 intrc;
 
 REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
@@ -2198,7 +2202,9 @@ SiSProcXineramaGetScreenCount(ClientPtr client)
 REQUEST(xPanoramiXGetScreenCountReq);
 WindowPtr  pWin;
 xPanoramiXGetScreenCountReply  rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int   n;
+#endif
 intrc;
 
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
@@ -2224,7 +2230,9 @@ SiSProcXineramaGetScreenSize(ClientPtr client)
 REQUEST(xPanoramiXGetScreenSizeReq);
 WindowPtr  pWin;
 xPanoramiXGetScreenSizeReply   rep;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int   n;
+#endif
 intrc;
 
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
@@ -2259,7 +2267,9 @@ SiSProcXineramaIsActive(ClientPtr client)
 rep.sequenceNumber = client->sequence;
 rep.state = !SiSnoPanoramiXExtension;
 if(client->swapped) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
register int n;
+#endif
_swaps(, n);
_swapl(, n);
_swapl(, n);
@@ -2280,7 +2290,9 @@ SiSProcXineramaQueryScreens(ClientPtr client)
 rep.number = (SiSnoPanoramiXExtension) ? 0 : SiSXineramaNumScreens;
 rep.length = rep.number * sz_XineramaScreenInfo >> 2;
 if(client->swapped) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
register int n;
+#endif
_swaps(, n);
_swapl(, n);
_swapl(, n);
@@ -2297,7 +2309,9 @@ SiSProcXineramaQueryScreens(ClientPtr client)
  scratch.width  = SiSXineramadataPtr[i].width;
  scratch.height = SiSXineramadataPtr[i].height;
  if(client->swapped) {
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps(_org, n);
 _swaps(_org, n);
 _swaps(, n);
@@ -2337,7 +2351,9 @@ static int
 SiSSProcXineramaQueryVersion (ClientPtr client)
 {
 REQUEST(xPanoramiXQueryVersionReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps(>length,n);
 REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
 return SiSProcXineramaQueryVersion(client);
@@ -2347,7 +2363,9 @@ static int
 SiSSProcXineramaGetState(ClientPtr client)
 {
 REQUEST(xPanoramiXGetStateReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
 return SiSProcXineramaGetState(client);
@@ -2357,7 +2375,9 @@ static int
 SiSSProcXineramaGetScreenCount(ClientPtr client)
 {
 REQUEST(xPanoramiXGetScreenCountReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
 return SiSProcXineramaGetScreenCount(client);
@@ -2367,7 +2387,9 @@ static int
 SiSSProcXineramaGetScreenSize(ClientPtr client)
 {
 REQUEST(xPanoramiXGetScreenSizeReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
 return SiSProcXineramaGetScreenSize(client);
@@ -2377,7 +2399,9 @@ static int
 SiSSProcXineramaIsActive(ClientPtr client)
 {
 REQUEST(xXineramaIsActiveReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
 return SiSProcXineramaIsActive(client);
@@ -2387,7 +2411,9 @@ static int
 SiSSProcXineramaQueryScreens(ClientPtr client)
 {
 REQUEST(xXineramaQueryScreensReq);
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 register int n;
+#endif
 _swaps (>length, n);
 REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
 return 

[PATCH xf86-video-sis 1/4] Eliminate set but not used variable compilation warnings

2018-12-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/sis_driver.c | 18 ++
 src/sis_video.c  | 12 
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 31a7ada..d5ba1bd 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -6192,7 +6192,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
   Bool acceptcustommodes = TRUE;  /* Accept user modelines */
  Bool includelcdmodes   = TRUE;  /* Include modes reported by DDC */
  Bool isfordvi  = FALSE; /* Is for digital DVI output */
- Bool fakecrt2modes = FALSE; /* Fake some modes for CRT2 */
  Bool IsForCRT2 = FALSE;
  if(pSiS->UseVESA) {
 acceptcustommodes = FALSE;
@@ -6210,15 +6209,11 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
  if(pSiS->VBFlags & (CRT2_TV|CRT2_LCD)) {
 acceptcustommodes = FALSE;
 includelcdmodes   = FALSE;
-fakecrt2modes = TRUE;
  }
   }
} else {
   acceptcustommodes = FALSE;
   includelcdmodes   = FALSE;
-  if(pSiS->VBFlags & (CRT2_TV|CRT2_LCD)) {
- fakecrt2modes = TRUE;
-  }
}
clockRanges->interlaceAllowed = FALSE;
IsForCRT2 = TRUE;
@@ -6227,7 +6222,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
   if(!(pSiS->VBFlags2 & VB2_SISTMDSLCDABRIDGE)) {
  acceptcustommodes = FALSE;
  includelcdmodes   = FALSE;
- fakecrt2modes = TRUE;
  /* Will handle i-lace in mode-switching code */
   } else {
  isfordvi = TRUE;
@@ -6246,7 +6240,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
if(!(pSiS->VBFlags2 & VB2_SISTMDSLCDABRIDGE)) {
   acceptcustommodes = FALSE;
   includelcdmodes   = FALSE;
-  fakecrt2modes = TRUE;
   /* Will handle i-lace in mode-switching code */
} else {
   isfordvi = TRUE;
@@ -6282,7 +6275,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
   acceptcustommodes = FALSE;
   includelcdmodes   = FALSE;
   if(!(pSiS->VBFlags & DISPTYPE_CRT1)) {
- fakecrt2modes = TRUE;
  IsForCRT2 = TRUE;
   }
}
@@ -6291,7 +6283,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 acceptcustommodes = FALSE;
 includelcdmodes   = FALSE;
 if((pSiS->VBFlags & CRT1_LCDA) || (!(pSiS->VBFlags & 
DISPTYPE_CRT1))) {
-   fakecrt2modes = TRUE;
IsForCRT2 = TRUE;
 }
  } else {
@@ -6301,7 +6292,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 
  pSiS->HaveCustomModes = FALSE;
  if(SiSMakeOwnModeList(pScrn, acceptcustommodes, includelcdmodes,
-   isfordvi, >HaveCustomModes, FALSE 
/*fakecrt2modes*/, IsForCRT2)) {
+   isfordvi, >HaveCustomModes, FALSE, IsForCRT2)) {
 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 "Replaced %s mode list with built-in modes\n",
 pSiS->HaveCustomModes ? "default" : "entire");
@@ -6621,7 +6612,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
Bool acceptcustommodes = TRUE;
Bool includelcdmodes   = TRUE;
Bool isfordvi  = FALSE;
-   Bool fakecrt2modes = FALSE;
 
xf86DrvMsg(pScrn->scrnIndex, X_INFO, crtsetupstr, 2);
 
@@ -6649,20 +6639,16 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 if(pSiS->VBFlags & (CRT2_LCD|CRT2_TV)) {
includelcdmodes   = FALSE;
acceptcustommodes = FALSE;
-   fakecrt2modes = TRUE;
 }
  }
} else {
  includelcdmodes   = FALSE;
  acceptcustommodes = FALSE;
- if(pSiS->VBFlags & (CRT2_LCD|CRT2_TV)) {
-fakecrt2modes = TRUE;
- }
}
 
pSiS->HaveCustomModes2 = FALSE;
if(!SiSMakeOwnModeList(pSiS->CRT2pScrn, acceptcustommodes, 
includelcdmodes,
-   isfordvi, >HaveCustomModes2, FALSE /* 
fakecrt2modes */, TRUE )) {
+   isfordvi, >HaveCustomModes2, FALSE, TRUE 
)) {
 
  SISErrorLog(pScrn, "Building list of built-in modes for CRT2 failed, 
%s\n",
mergeddisstr);
diff --git a/src/sis_video.c b/src/sis_video.c
index 9428426..3eeda5e 100644
--- a/src/sis_video.c
+++ b/src/sis_video.c
@@ -4212,7 +4212,11 @@ SISPutImageBlit(
UChar  *ybased, *uvbased, packed;
CARD16 *myuvbased;
SiS_Packet12_YUV MyPacket;
+#if 0
+#ifdef SISMERGED
Bool first;
+#endif
+#endif
 
if(index >= NUM_BLIT_PORTS) return BadMatch;
 
@@ 

[PATCH xf86-video-sis 2/4] Suppress logical operation and parenthesis related compilation warnings

2018-12-17 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/sis_cursor.c  | 2 +-
 src/sis_utility.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sis_cursor.c b/src/sis_cursor.c
index 32dcd9d..76a04b4 100644
--- a/src/sis_cursor.c
+++ b/src/sis_cursor.c
@@ -759,7 +759,7 @@ SiS300LoadCursorImage(ScrnInfoPtr pScrn, UChar *src)
 }
 
 if(pSiS->VBFlags & CRT2_ENABLE) {
-   if((pSiS->UseHWARGBCursor) && (!pSiS->VBFlags & DISPTYPE_CRT1)) {
+   if((pSiS->UseHWARGBCursor) && (!(pSiS->VBFlags & DISPTYPE_CRT1))) {
  status2 = sis301GetCursorStatus;
  sis301DisableHWCursor()
  SISWaitRetraceCRT2(pScrn);
diff --git a/src/sis_utility.c b/src/sis_utility.c
index 80bd672..c86bdbe 100644
--- a/src/sis_utility.c
+++ b/src/sis_utility.c
@@ -523,7 +523,7 @@ SISSwitchCRT2Type(ScrnInfoPtr pScrn, ULong newvbflags, Bool 
quiet)
 }
 #endif
 
-if((!(newvbflags & CRT2_ENABLE)) && (!newvbflags & DISPTYPE_CRT1)) {
+if((!(newvbflags & CRT2_ENABLE)) && (!(newvbflags & DISPTYPE_CRT1))) {
if(!quiet) {
   xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
  "CRT2 can't be switched off while CRT1 is off\n");
-- 
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

Re: [PATCH] Add 24-bit color support to exaGetPixmapFirstPixel

2018-12-17 Thread Adam Jackson
On Thu, 2018-12-13 at 22:32 -0600, Kevin Brace wrote:
> It appears that people who developed EXA forgot that there used to be
> graphics devices that used 24-bits (3 bytes) instead of 32-bits (4 bytes)
> in order to display one pixel. The lack of 24-bit color support inside
> exaGetPixmapFirstPixel causes SiS 6326 to crash when running Xfce since
> SiS 6326 does not support 32-bit color.

fb doesn't support 24bpp anymore, so this patch isn't going to do
anything useful I don't think.

- 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