Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit updates for xorg-server 1.20:



details:   https://anonhg.NetBSD.org/xsrc/rev/99f7229754a2
branches:  trunk
changeset: 10060:99f7229754a2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Dec 31 12:01:31 2018 +0000

description:
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)

diffstat:

 external/mit/xf86-input-mouse/dist/src/mouse.c       |  11 +++----
 external/mit/xf86-video-ati/dist/src/radeon_driver.c |   8 +++++-
 external/mit/xf86-video-igs/dist/src/igs_driver.c    |  27 +++++++++++--------
 external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c  |  23 ++++++++--------
 4 files changed, 39 insertions(+), 30 deletions(-)

diffs (170 lines):

diff -r 070b823d42ca -r 99f7229754a2 external/mit/xf86-input-mouse/dist/src/mouse.c
--- a/external/mit/xf86-input-mouse/dist/src/mouse.c    Mon Dec 31 11:14:40 2018 +0000
+++ b/external/mit/xf86-input-mouse/dist/src/mouse.c    Mon Dec 31 12:01:31 2018 +0000
@@ -794,7 +794,6 @@
 {
     int classes;
     int i;
-    const char *osname = NULL;
 
     if (osInfo)
         return TRUE;
@@ -820,12 +819,12 @@
                 !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;
 }
diff -r 070b823d42ca -r 99f7229754a2 external/mit/xf86-video-ati/dist/src/radeon_driver.c
--- a/external/mit/xf86-video-ati/dist/src/radeon_driver.c      Mon Dec 31 11:14:40 2018 +0000
+++ b/external/mit/xf86-video-ati/dist/src/radeon_driver.c      Mon Dec 31 12:01:31 2018 +0000
@@ -227,6 +227,12 @@
 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 @@
    if (info->r600_shadow_fb) {
        pixmap = pScreen->GetScreenPixmap(pScreen);
 
-       if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(),
+       if (!shadowAdd(pScreen, pixmap, radeonUpdatePacked,
                      radeonShadowWindow, 0, NULL))
           return FALSE;
    }
diff -r 070b823d42ca -r 99f7229754a2 external/mit/xf86-video-igs/dist/src/igs_driver.c
--- a/external/mit/xf86-video-igs/dist/src/igs_driver.c Mon Dec 31 11:14:40 2018 +0000
+++ b/external/mit/xf86-video-igs/dist/src/igs_driver.c Mon Dec 31 12:01:31 2018 +0000
@@ -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 @@
        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 @@
        return TRUE;
 }
 
+static void
+IgsUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+    shadowUpdatePacked(pScreen, pBuf);
+}
+
 static Bool
 IgsCreateScreenResources(ScreenPtr pScreen)
 {
@@ -611,7 +616,7 @@
 
        pPixmap = pScreen->GetScreenPixmap(pScreen);
 
-       if (!shadowAdd(pScreen, pPixmap, shadowUpdatePackedWeak(),
+       if (!shadowAdd(pScreen, pPixmap, IgsUpdatePacked,
                IgsWindowLinear, FALSE, NULL)) {
                return FALSE;
        }
diff -r 070b823d42ca -r 99f7229754a2 external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c
--- a/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c       Mon Dec 31 11:14:40 2018 +0000
+++ b/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c       Mon Dec 31 12:01:31 2018 +0000
@@ -243,18 +243,15 @@
 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 @@
                    "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 @@
 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 @@
 {
     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);



Home | Main Index | Thread Index | Old Index