Module Name:    xsrc
Committed By:   mrg
Date:           Mon Dec 31 12:01:31 UTC 2018

Modified Files:
        xsrc/external/mit/xf86-input-mouse/dist/src: mouse.c
        xsrc/external/mit/xf86-video-ati/dist/src: radeon_driver.c
        xsrc/external/mit/xf86-video-igs/dist/src: igs_driver.c
        xsrc/external/mit/xf86-video-wsfb/dist/src: wsfb_driver.c

Log Message:
updates for xorg-server 1.20:

- xf86GetOS()/LoaderGetOS() have been replaced.  replace them with
  direct platform #ifdefs for now.
- shadowUpdatePackedWeak() is gone, use local thunks.
- xf86DisableRandR() is gone, disable it (should be obsolete)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
    xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c
cvs rdiff -u -r1.14 -r1.15 \
    xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c
cvs rdiff -u -r1.14 -r1.15 \
    xsrc/external/mit/xf86-video-igs/dist/src/igs_driver.c
cvs rdiff -u -r1.30 -r1.31 \
    xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c
diff -u xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.18 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.19
--- xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.18	Sun Mar  5 08:05:23 2017
+++ xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c	Mon Dec 31 12:01:31 2018
@@ -794,7 +794,6 @@ InitProtocols(void)
 {
     int classes;
     int i;
-    const char *osname = NULL;
 
     if (osInfo)
         return TRUE;
@@ -820,12 +819,12 @@ InitProtocols(void)
                 !osInfo->CheckProtocol(mouseProtocols[i].name))
                 mouseProtocols[i].id = PROT_UNSUP;
 
+#ifdef __NetBSD__
     /* NetBSD uses PROT_BM for "PS/2". */
-    xf86GetOS(&osname, NULL, NULL, NULL);
-    if (osname && xf86NameCmp(osname, "netbsd") == 0)
-        for (i = 0; mouseProtocols[i].name; i++)
-            if (mouseProtocols[i].id == PROT_PS2)
-                mouseProtocols[i].id = PROT_BM;
+    for (i = 0; mouseProtocols[i].name; i++)
+        if (mouseProtocols[i].id == PROT_PS2)
+            mouseProtocols[i].id = PROT_BM;
+#endif
 
     return TRUE;
 }

Index: xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c
diff -u xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c:1.14 xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c:1.15
--- xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c:1.14	Tue Aug 16 07:38:15 2016
+++ xsrc/external/mit/xf86-video-ati/dist/src/radeon_driver.c	Mon Dec 31 12:01:31 2018
@@ -227,6 +227,12 @@ struct RADEONInt10Save {
 static Bool RADEONMapMMIO(ScrnInfoPtr pScrn);
 static Bool RADEONUnmapMMIO(ScrnInfoPtr pScrn);
 
+static void
+radeonUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+    shadowUpdatePacked(pScreen, pBuf);
+}
+
 static void *
 radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
 		   CARD32 *size, void *closure)
@@ -255,7 +261,7 @@ RADEONCreateScreenResources (ScreenPtr p
    if (info->r600_shadow_fb) {
        pixmap = pScreen->GetScreenPixmap(pScreen);
 
-       if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(),
+       if (!shadowAdd(pScreen, pixmap, radeonUpdatePacked,
 		      radeonShadowWindow, 0, NULL))
 	   return FALSE;
    }

Index: xsrc/external/mit/xf86-video-igs/dist/src/igs_driver.c
diff -u xsrc/external/mit/xf86-video-igs/dist/src/igs_driver.c:1.14 xsrc/external/mit/xf86-video-igs/dist/src/igs_driver.c:1.15
--- xsrc/external/mit/xf86-video-igs/dist/src/igs_driver.c:1.14	Sat Aug 27 05:15:03 2016
+++ xsrc/external/mit/xf86-video-igs/dist/src/igs_driver.c	Mon Dec 31 12:01:31 2018
@@ -1,5 +1,5 @@
 /* $OpenBSD: wsfb_driver.c,v 1.19 2003/04/27 16:42:32 matthieu Exp $ */
-/* $NetBSD: igs_driver.c,v 1.14 2016/08/27 05:15:03 macallan Exp $ */
+/* $NetBSD: igs_driver.c,v 1.15 2018/12/31 12:01:31 mrg Exp $ */
 /*
  * Copyright (c) 2001 Matthieu Herrb
  *		 2009 Michael Lorenz
@@ -217,16 +217,15 @@ IgsSetup(pointer module, pointer opts, i
 	static Bool setupDone = FALSE;
 	const char *osname;
 
+#if !(defined __NetBSD__ || defined __OpenBSD__)
 	/* Check that we're being loaded on a OpenBSD or NetBSD system */
-	LoaderGetOS(&osname, NULL, NULL, NULL);
-	if (!osname || (strcmp(osname, "openbsd") != 0 &&
-	                strcmp(osname, "netbsd") != 0)) {
-		if (errmaj)
-			*errmaj = LDR_BADOS;
-		if (errmin)
-			*errmin = 0;
-		return NULL;
-	}
+	if (errmaj)
+		*errmaj = LDR_BADOS;
+	if (errmin)
+		*errmin = 0;
+	return NULL;
+#endif
+
 	if (!setupDone) {
 		setupDone = TRUE;
 		xf86AddDriver(&IGS, module, HaveDriverFuncs);
@@ -594,6 +593,12 @@ IgsPreInit(ScrnInfoPtr pScrn, int flags)
 	return TRUE;
 }
 
+static void
+IgsUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+    shadowUpdatePacked(pScreen, pBuf);
+}
+
 static Bool
 IgsCreateScreenResources(ScreenPtr pScreen)
 {
@@ -611,7 +616,7 @@ IgsCreateScreenResources(ScreenPtr pScre
 
 	pPixmap = pScreen->GetScreenPixmap(pScreen);
 
-	if (!shadowAdd(pScreen, pPixmap, shadowUpdatePackedWeak(),
+	if (!shadowAdd(pScreen, pPixmap, IgsUpdatePacked,
 		IgsWindowLinear, FALSE, NULL)) {
 		return FALSE;
 	}

Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.30 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.31
--- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.30	Sun Jul 22 14:54:32 2018
+++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c	Mon Dec 31 12:01:31 2018
@@ -243,18 +243,15 @@ static pointer
 WsfbSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
 	static Bool setupDone = FALSE;
-	const char *osname;
 
+#if !(defined __NetBSD__ || defined __OpenBSD__)
 	/* Check that we're being loaded on a OpenBSD or NetBSD system. */
-	LoaderGetOS(&osname, NULL, NULL, NULL);
-	if (!osname || (strcmp(osname, "openbsd") != 0 &&
-	                strcmp(osname, "netbsd") != 0)) {
-		if (errmaj)
-			*errmaj = LDR_BADOS;
-		if (errmin)
-			*errmin = 0;
-		return NULL;
-	}
+	if (errmaj)
+		*errmaj = LDR_BADOS;
+	if (errmin)
+		*errmin = 0;
+	return NULL;
+#endif
 	if (!setupDone) {
 		setupDone = TRUE;
 		xf86AddDriver(&WSFB, module, HaveDriverFuncs);
@@ -1047,9 +1044,11 @@ WsfbScreenInit(SCREEN_INIT_ARGS_DECL)
 		    "disabling DGA\n");
 #endif
 	if (fPtr->rotate) {
+#if 0
 		xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Enabling Driver Rotation, "
 		    "disabling RandR\n");
 		xf86DisableRandR();
+#endif
 		if (pScrn->bitsPerPixel == 24)
 			xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			    "Rotation might be broken in 24 bpp\n");
@@ -1632,7 +1631,7 @@ memcpy32sw(void *dest, void *src, int le
 void
 WsfbShadowUpdateSwap32(ScreenPtr pScreen, shadowBufPtr pBuf)
 {
-    RegionPtr	damage = shadowDamage (pBuf);
+    RegionPtr	damage = DamageRegion (pBuf->pDamage);
     PixmapPtr	pShadow = pBuf->pPixmap;
     int		nbox = RegionNumRects (damage);
     BoxPtr	pbox = RegionRects (damage);
@@ -1704,7 +1703,7 @@ WsfbShadowUpdateSplit(ScreenPtr pScreen,
 {
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     WsfbPtr 	fPtr = WSFBPTR(pScrn);
-    RegionPtr	damage = shadowDamage (pBuf);
+    RegionPtr	damage = DamageRegion (pBuf->pDamage);
     PixmapPtr	pShadow = pBuf->pPixmap;
     int		nbox = RegionNumRects (damage);
     BoxPtr	pbox = RegionRects (damage);

Reply via email to