Source-Changes-HG archive

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

[xsrc/trunk]: xsrc/external/mit/xorg-server/dist merge xorg-server 1.20.6.



details:   https://anonhg.NetBSD.org/xsrc/rev/64e51dc15405
branches:  trunk
changeset: 10464:64e51dc15405
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Feb 23 10:26:21 2020 +0000

description:
merge xorg-server 1.20.6.

diffstat:

 external/mit/xorg-server/dist/Xext/shm.c                               |   77 +++-
 external/mit/xorg-server/dist/Xext/sync.c                              |   50 +-
 external/mit/xorg-server/dist/configure                                |  130 +++-----
 external/mit/xorg-server/dist/configure.ac                             |   57 +---
 external/mit/xorg-server/dist/dix/dispatch.c                           |    5 +-
 external/mit/xorg-server/dist/dix/events.c                             |    2 +
 external/mit/xorg-server/dist/glx/glxcmds.c                            |    4 +-
 external/mit/xorg-server/dist/hw/xfree86/common/compiler.h             |   30 --
 external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/driver.h  |    1 +
 external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/present.c |    3 +-
 external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/vblank.c  |  148 +++++++++-
 external/mit/xorg-server/dist/hw/xfree86/modes/xf86RandR12.c           |    5 +
 external/mit/xorg-server/dist/include/dix-config.h.in                  |    9 +-
 external/mit/xorg-server/dist/mi/miscrinit.c                           |    8 +-
 external/mit/xorg-server/dist/os/connection.c                          |    8 +
 external/mit/xorg-server/dist/render/render.c                          |    5 +
 external/mit/xorg-server/dist/xkb/xkb.c                                |    9 +
 17 files changed, 332 insertions(+), 219 deletions(-)

diffs (truncated from 1087 to 300 lines):

diff -r 1a6e2ff66681 -r 64e51dc15405 external/mit/xorg-server/dist/Xext/shm.c
--- a/external/mit/xorg-server/dist/Xext/shm.c  Sun Feb 23 10:17:32 2020 +0000
+++ b/external/mit/xorg-server/dist/Xext/shm.c  Sun Feb 23 10:26:21 2020 +0000
@@ -35,6 +35,9 @@
 #include <sys/types.h>
 #include <sys/ipc.h>
 #include <sys/shm.h>
+#ifdef HAVE_MEMFD_CREATE
+#include <sys/mman.h>
+#endif
 #include <unistd.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -652,6 +655,9 @@
         visual = wVisual(((WindowPtr) pDraw));
         if (pDraw->type == DRAWABLE_WINDOW)
             pVisibleRegion = &((WindowPtr) pDraw)->borderClip;
+        pDraw->pScreen->SourceValidate(pDraw, stuff->x, stuff->y,
+                                       stuff->width, stuff->height,
+                                       IncludeInferiors);
     }
     else {
         if (stuff->x < 0 ||
@@ -860,6 +866,12 @@
             return rc;
         }
     }
+    FOR_NSCREENS_FORWARD(i) {
+        drawables[i]->pScreen->SourceValidate(drawables[i], 0, 0,
+                                              drawables[i]->width,
+                                              drawables[i]->height,
+                                              IncludeInferiors);
+    }
 
     xgi = (xShmGetImageReply) {
         .type = X_Reply,
@@ -1194,36 +1206,55 @@
 static int
 shm_tmpfile(void)
 {
-#ifdef SHMDIR
-       int     fd;
-       char    template[] = SHMDIR "/shmfd-XXXXXX";
+    const char *shmdirs[] = {
+        "/run/shm",
+        "/var/tmp",
+        "/tmp",
+    };
+    int        fd;
+
+#ifdef HAVE_MEMFD_CREATE
+    fd = memfd_create("xorg", MFD_CLOEXEC|MFD_ALLOW_SEALING);
+    if (fd != -1) {
+        fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK);
+        DebugF ("Using memfd_create\n");
+        return fd;
+    }
+#endif
+
 #ifdef O_TMPFILE
-       fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666);
-       if (fd >= 0) {
-               DebugF ("Using O_TMPFILE\n");
-               return fd;
-       }
-       ErrorF ("Not using O_TMPFILE\n");
+    for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) {
+        fd = open(shmdirs[i], O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666);
+        if (fd >= 0) {
+            DebugF ("Using O_TMPFILE\n");
+            return fd;
+        }
+    }
+    ErrorF ("Not using O_TMPFILE\n");
 #endif
+
+    for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) {
+        char template[PATH_MAX];
+        snprintf(template, ARRAY_SIZE(template), "%s/shmfd-XXXXXX", shmdirs[i]);
 #ifdef HAVE_MKOSTEMP
-       fd = mkostemp(template, O_CLOEXEC);
+        fd = mkostemp(template, O_CLOEXEC);
 #else
-       fd = mkstemp(template);
+        fd = mkstemp(template);
 #endif
-       if (fd < 0)
-               return -1;
-       unlink(template);
+        if (fd < 0)
+            continue;
+        unlink(template);
 #ifndef HAVE_MKOSTEMP
-       int flags = fcntl(fd, F_GETFD);
-       if (flags != -1) {
-               flags |= FD_CLOEXEC;
-               (void) fcntl(fd, F_SETFD, &flags);
-       }
+        int flags = fcntl(fd, F_GETFD);
+        if (flags != -1) {
+            flags |= FD_CLOEXEC;
+            (void) fcntl(fd, F_SETFD, &flags);
+        }
 #endif
-       return fd;
-#else
-        return -1;
-#endif
+        return fd;
+    }
+
+    return -1;
 }
 
 static int
diff -r 1a6e2ff66681 -r 64e51dc15405 external/mit/xorg-server/dist/Xext/sync.c
--- a/external/mit/xorg-server/dist/Xext/sync.c Sun Feb 23 10:17:32 2020 +0000
+++ b/external/mit/xorg-server/dist/Xext/sync.c Sun Feb 23 10:26:21 2020 +0000
@@ -881,18 +881,21 @@
     return Success;
 }
 
-static SyncObject *
+SyncObject *
 SyncCreate(ClientPtr client, XID id, unsigned char type)
 {
     SyncObject *pSync;
+    RESTYPE resType;
 
     switch (type) {
     case SYNC_COUNTER:
         pSync = malloc(sizeof(SyncCounter));
+        resType = RTCounter;
         break;
     case SYNC_FENCE:
         pSync = (SyncObject *) dixAllocateObjectWithPrivates(SyncFence,
                                                              PRIVATE_SYNC_FENCE);
+        resType = RTFence;
         break;
     default:
         return NULL;
@@ -901,6 +904,11 @@
     if (!pSync)
         return NULL;
 
+    pSync->initialized = FALSE;
+
+    if (!AddResource(id, resType, (void *) pSync))
+        return NULL;
+
     pSync->client = client;
     pSync->id = id;
     pSync->pTriglist = NULL;
@@ -923,13 +931,10 @@
 
     status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered);
     if (status != Success) {
-        dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE);
+        FreeResource(pFence->sync.id, RT_NONE);
         return status;
     }
 
-    if (!AddResource(id, RTFence, (void *) pFence))
-        return BadAlloc;
-
     return Success;
 #else
     return BadImplementation;
@@ -957,8 +962,7 @@
     pCounter->value = initialvalue;
     pCounter->pSysCounterInfo = NULL;
 
-    if (!AddResource(id, RTCounter, (void *) pCounter))
-        return NULL;
+    pCounter->sync.initialized = TRUE;
 
     return pCounter;
 }
@@ -1137,21 +1141,26 @@
 FreeCounter(void *env, XID id)
 {
     SyncCounter *pCounter = (SyncCounter *) env;
-    SyncTriggerList *ptl, *pnext;
 
     pCounter->sync.beingDestroyed = TRUE;
-    /* tell all the counter's triggers that the counter has been destroyed */
-    for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
-        (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
-        pnext = ptl->next;
-        free(ptl);              /* destroy the trigger list as we go */
+
+    if (pCounter->sync.initialized) {
+        SyncTriggerList *ptl, *pnext;
+
+        /* tell all the counter's triggers that counter has been destroyed */
+        for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
+            (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+            pnext = ptl->next;
+            free(ptl); /* destroy the trigger list as we go */
+        }
+        if (IsSystemCounter(pCounter)) {
+            xorg_list_del(&pCounter->pSysCounterInfo->entry);
+            free(pCounter->pSysCounterInfo->name);
+            free(pCounter->pSysCounterInfo->private);
+            free(pCounter->pSysCounterInfo);
+        }
     }
-    if (IsSystemCounter(pCounter)) {
-        xorg_list_del(&pCounter->pSysCounterInfo->entry);
-        free(pCounter->pSysCounterInfo->name);
-        free(pCounter->pSysCounterInfo->private);
-        free(pCounter->pSysCounterInfo);
-    }
+
     free(pCounter);
     return Success;
 }
@@ -1889,9 +1898,6 @@
 
     miSyncInitFence(pDraw->pScreen, pFence, stuff->initially_triggered);
 
-    if (!AddResource(stuff->fid, RTFence, (void *) pFence))
-        return BadAlloc;
-
     return Success;
 }
 
diff -r 1a6e2ff66681 -r 64e51dc15405 external/mit/xorg-server/dist/configure
--- a/external/mit/xorg-server/dist/configure   Sun Feb 23 10:17:32 2020 +0000
+++ b/external/mit/xorg-server/dist/configure   Sun Feb 23 10:26:21 2020 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xorg-server 1.20.5.
+# Generated by GNU Autoconf 2.69 for xorg-server 1.20.6.
 #
 # Report bugs to <https://gitlab.freedesktop.org/xorg/xserver/issues>.
 #
@@ -651,8 +651,8 @@
 # Identity of this package.
 PACKAGE_NAME='xorg-server'
 PACKAGE_TARNAME='xorg-server'
-PACKAGE_VERSION='1.20.5'
-PACKAGE_STRING='xorg-server 1.20.5'
+PACKAGE_VERSION='1.20.6'
+PACKAGE_STRING='xorg-server 1.20.6'
 PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues'
 PACKAGE_URL=''
 
@@ -1383,7 +1383,6 @@
 enable_secure_rpc
 enable_input_thread
 with_systemd_daemon
-with_shared_memory_dir
 enable_xtrans_send_fds
 with_xkb_bin_directory
 with_sha1
@@ -2033,7 +2032,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xorg-server 1.20.5 to adapt to many kinds of systems.
+\`configure' configures xorg-server 1.20.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2103,7 +2102,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xorg-server 1.20.5:";;
+     short | recursive ) echo "Configuration of xorg-server 1.20.6:";;
    esac
   cat <<\_ACEOF
 
@@ -2294,10 +2293,10 @@
                           org.x)
   --with-bundle-version=VERSION
                           Version to use for X11.app's CFBundleVersion
-                          (default: 1.20.5)
+                          (default: 1.20.6)
   --with-bundle-version-string=VERSION
                           Version to use for X11.app's
-                          CFBundleShortVersionString (default: 1.20.5)
+                          CFBundleShortVersionString (default: 1.20.6)
   --with-sparkle-feed-url=URL
                           URL for the Sparkle feed (default:
                           https://www.xquartz.org/releases/sparkle/release.xml)
@@ -2305,10 +2304,6 @@
                           Path to Khronos OpenGL registry database files
                           (default: auto)
   --with-systemd-daemon   support systemd socket activation (default: auto)
-  --with-shared-memory-dir=PATH
-                          Path to directory in a world-writable temporary
-                          directory for anonymous shared memory (default:
-                          auto)
   --with-xkb-bin-directory=DIR
                           Directory containing xkbcomp program (default: auto)
   --with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI
@@ -2558,7 +2553,7 @@



Home | Main Index | Thread Index | Old Index