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

xorg-server: Changes to 'debian-experimental'



Rebased ref, commits from common ancestor:
commit c83165930e925480c88279334c8c421ce0dafe0c
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Tue Nov 1 22:15:42 2016 +0100

    control: Add wayland-protocols build-dep

diff --git a/debian/changelog b/debian/changelog
index 2958161..d1e079a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ xorg-server (2:1.18.99.902-1) UNRELEASED; urgency=medium
   * New upstream release candidate 2.
   * rules: Drop aiglx enable/disable flags, removed upstream.
   * control: Bump x11proto-core-dev requirement.
+  * control: Add wayland-protocols build-dep on linux for Xwayland.
 
  -- Timo Aaltonen <tjaalton@debian.org>  Wed, 28 Sep 2016 13:47:51 +0300
 
diff --git a/debian/control b/debian/control
index aa13ed0..9e544af 100644
--- a/debian/control
+++ b/debian/control
@@ -97,6 +97,7 @@ Build-Depends:
  libbsd-dev [kfreebsd-any],
 # xwayland
  libwayland-dev [linux-any],
+ wayland-protocols (>= 1.1) [linux-any],
 #logind
   libdbus-1-dev (>= 1.0) [linux-any],
 # systemd-daemon

commit 6b936b2d760878920a26ea9926304ec30aa4d881
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Tue Nov 1 22:14:06 2016 +0100

    control: Bump x11proto-core-dev requirement

diff --git a/debian/changelog b/debian/changelog
index d135906..2958161 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ xorg-server (2:1.18.99.902-1) UNRELEASED; urgency=medium
   [ Emilio Pozuelo Monfort ]
   * New upstream release candidate 2.
   * rules: Drop aiglx enable/disable flags, removed upstream.
+  * control: Bump x11proto-core-dev requirement.
 
  -- Timo Aaltonen <tjaalton@debian.org>  Wed, 28 Sep 2016 13:47:51 +0300
 
diff --git a/debian/control b/debian/control
index 4e80924..aa13ed0 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@ Build-Depends:
  xfonts-utils (>= 1:7.5+1),
  x11proto-bigreqs-dev (>= 1:1.1.0),
  x11proto-composite-dev (>= 1:0.4),
- x11proto-core-dev (>= 7.0.28),
+ x11proto-core-dev (>= 7.0.31),
  x11proto-damage-dev (>= 1.1),
  x11proto-fixes-dev (>= 1:5.0),
  x11proto-fonts-dev (>= 2.1.3),
@@ -197,7 +197,7 @@ Package: xserver-xorg-dev
 Architecture: any
 Depends:
  libpixman-1-dev (>= 0.27.2),
- x11proto-core-dev (>= 7.0.28),
+ x11proto-core-dev (>= 7.0.31),
  x11proto-input-dev (>= 2.3),
  x11proto-xext-dev (>= 7.2.99.901),
  x11proto-video-dev,

commit dfd3105141990efd47e7aa1b2c1ce72c2d05afb7
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Tue Nov 1 22:11:43 2016 +0100

    rules: Drop aiglx enable/disable flags, removed upstream

diff --git a/debian/changelog b/debian/changelog
index 3f733d1..d135906 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ xorg-server (2:1.18.99.902-1) UNRELEASED; urgency=medium
 
   [ Emilio Pozuelo Monfort ]
   * New upstream release candidate 2.
+  * rules: Drop aiglx enable/disable flags, removed upstream.
 
  -- Timo Aaltonen <tjaalton@debian.org>  Wed, 28 Sep 2016 13:47:51 +0300
 
diff --git a/debian/rules b/debian/rules
index 3f76e07..1f8c783 100755
--- a/debian/rules
+++ b/debian/rules
@@ -147,7 +147,6 @@ confflags += \
 
 confflags_main = \
 	--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins" \
-	--enable-aiglx \
 	--enable-composite \
 	--enable-record \
 	--enable-xv \
@@ -181,7 +180,6 @@ confflags_main = \
 
 confflags_udeb = \
 	--with-default-font-path="built-ins" \
-	--disable-aiglx \
 	--disable-composite \
 	--disable-record \
 	--disable-xv \

commit 49cd2937b2c706d0eef8c90088abaeb7a10f3af5
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Tue Nov 1 22:10:58 2016 +0100

    New upstream release candidate

diff --git a/debian/changelog b/debian/changelog
index 0374207..3f733d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
-xorg-server (2:1.18.99.901-1) UNRELEASED; urgency=medium
+xorg-server (2:1.18.99.902-1) UNRELEASED; urgency=medium
 
-  * New upstream release candidate.
+  [ Timo Aaltonen ]
+  * New upstream release candidate 1.
   * control: Bump libxfont-dev build-dependency.
   * patches:
     - refreshed
@@ -9,6 +10,9 @@ xorg-server (2:1.18.99.901-1) UNRELEASED; urgency=medium
   * serverminver: Bumped.
   * watch: Fix a typo.
 
+  [ Emilio Pozuelo Monfort ]
+  * New upstream release candidate 2.
+
  -- Timo Aaltonen <tjaalton@debian.org>  Wed, 28 Sep 2016 13:47:51 +0300
 
 xorg-server (2:1.18.4-2) unstable; urgency=medium

commit 512e75a23b7f6339593c3ae6942f0c420a975fd3
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 09:32:42 2016 -0700

    Bump to 1.18.99.902 (1.19 RC2)
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/configure.ac b/configure.ac
index 25168cc..395df80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,9 +26,9 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.18.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2016-09-19"
-RELEASE_NAME="Brown Turkey Fig"
+AC_INIT([xorg-server], 1.18.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2016-10-28"
+RELEASE_NAME="Shigoku"
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])

commit c85f81825e196e96337347e0ce3a538fb2e38f16
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 09:28:32 2016 -0700

    dix: Bump MAXHASHSIZE for the resource db [v2]
    
    [This was originally a workaround for a client-side resource leak:
    
    http://lists.freedesktop.org/archives/xorg-devel/2012-November/034555.html
    
    Obviously that's a broken app, but the performance problem it
    illustrates - that walking the linked list ends up burning all your CPU
    time - is real enough. - ajax]
    
    v2: Replace with a shorter code sequence which computes the same
        results for all but numBits == 7
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/dix/resource.c b/dix/resource.c
index 68efd24..b6ef99f 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -156,7 +156,7 @@ static void RebuildTable(int    /*client */
 
 #define INITBUCKETS 64
 #define INITHASHSIZE 6
-#define MAXHASHSIZE 11
+#define MAXHASHSIZE 16
 
 typedef struct _Resource {
     struct _Resource *next;
@@ -668,29 +668,14 @@ InitClientResources(ClientPtr client)
 int
 HashResourceID(XID id, int numBits)
 {
-    id &= RESOURCE_ID_MASK;
-    switch (numBits)
-    {
-        case 6:
-            return ((int)(0x03F & (id ^ (id>>6) ^ (id>>12))));
-        case 7:
-            return ((int)(0x07F & (id ^ (id>>7) ^ (id>>13))));
-        case 8:
-            return ((int)(0x0FF & (id ^ (id>>8) ^ (id>>16))));
-        case 9:
-            return ((int)(0x1FF & (id ^ (id>>9))));
-        case 10:
-            return ((int)(0x3FF & (id ^ (id>>10))));
-        case 11:
-            return ((int)(0x7FF & (id ^ (id>>11))));
-    }
-    if (numBits >= 11)
-        return ((int)(0x7FF & (id ^ (id>>11))));
-    else
-    {
-        assert(numBits >= 0);
-        return id & ~((~0) << numBits);
-    }
+    static XID mask;
+
+    if (!mask)
+        mask = RESOURCE_ID_MASK;
+    id &= mask;
+    if (numBits < 9)
+        return (id ^ (id >> numBits) ^ (id >> (numBits<<1))) & ~((~0) << numBits);
+    return (id ^ (id >> numBits)) & ~((~0) << numBits);
 }
 
 static XID

commit 9ed5b263542e5245317927828f0515db6c0a54c8
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 08:04:43 2016 -0700

    os: Recompute whether any clients are ready after ProcessWorkQueue() (bug 98030)
    
    If a work proc wakes up a sleeping client and it is ready to execute,
    we need to re-compute the local 'are_ready' value before deciding
    what timeout value to use in WaitForSomething.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98030
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/os/WaitFor.c b/os/WaitFor.c
index 7d5aa32..ff1c85e 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -204,8 +204,10 @@ WaitForSomething(Bool are_ready)
        crashed connections and the screen saver timeout */
     while (1) {
         /* deal with any blocked jobs */
-        if (workQueue)
+        if (workQueue) {
             ProcessWorkQueue();
+            are_ready = clients_are_ready();
+        }
 
         if (are_ready)
             timeout = 0;

commit 2c91f3235a4e1655e18cb014922529161051ffbb
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Oct 5 09:41:44 2016 -0700

    ephyr: Leave window unmapped for -glamor-skip-present [v2]
    
    If we're never painting anything in the window, we probably don't need
    to map it.
    
    v2: Drop ephyr_glamor_gles2 from hostx.c
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 887f654..fe69f84 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -95,6 +95,7 @@ char *ephyrResName = NULL;
 int ephyrResNameFromCmd = 0;
 char *ephyrTitle = NULL;
 Bool ephyr_glamor = FALSE;
+extern Bool ephyr_glamor_skip_present;
 
 Bool
 hostx_has_extension(xcb_extension_t *extension)
@@ -898,7 +899,10 @@ hostx_screen_init(KdScreenInfo *screen,
                                       &size_hints);
     }
 
-    xcb_map_window(HostX.conn, scrpriv->win);
+#ifdef GLAMOR
+    if (!ephyr_glamor_skip_present)
+#endif
+        xcb_map_window(HostX.conn, scrpriv->win);
 
     /* Set explicit window position if it was informed in
      * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the

commit cba5a10fd93310702cad9dbe1e6d48da99f5552f
Author: Alex Goins <agoins@nvidia.com>
Date:   Wed Oct 26 11:03:49 2016 -0700

    ramdac: Check sPriv != NULL in xf86CheckHWCursor()
    
    xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option
    "SWCursor" is specified, sPriv == NULL. In this case we should assume that HW
    cursors are not supported.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    Reviewed-by: Andy Ritger <aritger@nvidia.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index da2b181..4481320 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -148,6 +148,10 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
             continue;
 
         sPriv = dixLookupPrivate(&pSlave->devPrivates, xf86CursorScreenKey);
+        if (!sPriv) /* NULL if Option "SWCursor", possibly other conditions */
+            return FALSE;
+
+        /* FALSE if HWCursor not supported by slave */
         if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
             return FALSE;
     }

commit 03d99ef729178dd99268f185fb45320a29382091
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Oct 6 22:13:07 2016 +0100

    glx/dri2: Don't build DRI loader if DRI2 isn't enabled
    
    This partially reverts 501d8e2b.
    
    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/glx/Makefile.am b/glx/Makefile.am
index fc0b76a..699de63 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -1,4 +1,8 @@
-noinst_LTLIBRARIES = libglx.la libglxdri.la
+if DRI2
+GLXDRI_LIBRARY = libglxdri.la
+endif
+
+noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY)
 
 AM_CFLAGS = \
 	@DIX_CFLAGS@ \
@@ -16,11 +20,10 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/hw/xfree86/os-support/bus \
 	-I$(top_srcdir)/hw/xfree86/common \
 	-I$(top_srcdir)/hw/xfree86/dri \
+	-I$(top_srcdir)/hw/xfree86/dri2 \
 	-I$(top_srcdir)/mi \
 	-I$(top_srcdir)/present
 
-AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2
-
 indirect_sources =				\
 	indirect_dispatch.c			\
 	indirect_dispatch.h			\
@@ -33,7 +36,9 @@ indirect_sources =				\
 	indirect_table.c
 
 libglxdri_la_SOURCES =
+if DRI2
 libglxdri_la_SOURCES += glxdri2.c
+endif
 
 libglxdri_la_LIBADD = $(DLOPEN_LIBS)
 
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index be43e8f..d534c78 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -29,10 +29,12 @@ libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
 
 libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS)
+if DRI2
 libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la
 if NO_UNDEFINED
 libglx_la_LIBADD += $(LIBDRM_LIBS) $(PIXMAN_LIBS)
 endif
+endif
 libglx_la_SOURCES = glxmodule.c
 
 libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)

commit 5cb328338684d8e5b03913c47475bfcd7acffec4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Oct 26 12:21:16 2016 +0200

    inputthread: On Linux leave the main thread's name as-is
    
    On Linux, setting the main thread's name changes the program name
    (/proc/self/comm). Setting it to MainThread breaks scripts that rely on
    the command name, e.g. ps -C Xorg.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/os/inputthread.c b/os/inputthread.c
index ddafa7f..8e7f2ed 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -431,11 +431,13 @@ InputThreadPreInit(void)
     }
     hotplugPipeWrite = hotplugPipe[1];
 
+#ifndef __linux__ /* Linux does not deal well with renaming the main thread */
 #if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
     pthread_setname_np (pthread_self(), "MainThread");
 #elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID)
     pthread_setname_np ("MainThread");
 #endif
+#endif
 
 }
 

commit 007f8ee61a35ceda36b43e772a9a1074b8e27a06
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Fri Oct 21 10:11:45 2016 +0200

    xwayland: Activate and enable touch devices
    
    On some random condition, a touch event may trigger a crash in Xwayland
    in GetTouchEvents().
    
    The (simplified) backtrace goes as follow:
    
     (gdb) bt
     #0  GetTouchEvents() at getevents.c:1892
     #1  QueueTouchEvents() at getevents.c:1866
     #2  xwl_touch_send_event() at xwayland-input.c:652
     #5  wl_closure_invoke() from libwayland-client.so.0
     #6  dispatch_event() from libwayland-client.so.0
     #7  wl_display_dispatch_queue_pending() from libwayland-client.so.0
     #8  xwl_read_events() at xwayland.c:483
     #9  ospoll_wait() at ospoll.c:412
     #10 WaitForSomething() at WaitFor.c:222
     #11 Dispatch() at dispatch.c:412
     #12 dix_main() at main.c:287
     #13 __libc_start_main() at libc-start.c:289
     #14 _start ()
    
    The crash occurs when trying to access the sprite associated with the
    touch device, which appears to be NULL. Reason being the device itself
    is more a keyboard device than a touch device.
    
    Moreover, it appears the device is neither enabled nor activated
    (inited=0, enabled=0) which doesn't seem right, but matches the code in
    init_touch() from xwayland-input.c which would enable the device if it
    was previously existing and otherwise would create the device but not
    activate it.
    
    Make sure we do activate and enable touch devices just like we do for
    other input devices such as keyboard and pointer.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 1991076..7ec3b1a 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -1059,12 +1059,13 @@ init_touch(struct xwl_seat *xwl_seat)
     wl_touch_add_listener(xwl_seat->wl_touch,
                           &touch_listener, xwl_seat);
 
-    if (xwl_seat->touch)
-        EnableDevice(xwl_seat->touch, TRUE);
-    else {
+    if (xwl_seat->touch == NULL) {
         xwl_seat->touch =
             add_device(xwl_seat, "xwayland-touch", xwl_touch_proc);
+        ActivateDevice(xwl_seat->touch, TRUE);
     }
+    EnableDevice(xwl_seat->touch, TRUE);
+
 }
 
 static void

commit f68ba7b81ffe765380664fccc92f3e689c6c48c2
Author: Rui Matos <tiagomatos@gmail.com>
Date:   Tue Oct 25 19:24:49 2016 +0200

    xwayland: Transform pointer enter event coordinates
    
    Pointer enter event coordinates are surface relative and we need them to
    be screen relative for pScreen->SetCursorPosition().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758283
    
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 4d447a5..1991076 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -298,6 +298,7 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
     int i;
     int sx = wl_fixed_to_int(sx_w);
     int sy = wl_fixed_to_int(sy_w);
+    int dx, dy;
     ScreenPtr pScreen = xwl_seat->xwl_screen->screen;
     ValuatorMask mask;
 
@@ -314,9 +315,11 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
     xwl_seat->pointer_enter_serial = serial;
 
     xwl_seat->focus_window = wl_surface_get_user_data(surface);
+    dx = xwl_seat->focus_window->window->drawable.x;
+    dy = xwl_seat->focus_window->window->drawable.y;
 
     master = GetMaster(dev, POINTER_OR_FLOAT);
-    (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE);
+    (*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE);
 
     miPointerInvalidateSprite(master);
 

commit f5c6d751d08c6de77c2ca49ba2a48f8023758cef
Author: Nikhil Mahale <nmahale@nvidia.com>
Date:   Sat Oct 22 17:40:51 2016 +0530

    modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
    
    Commit c7e8d4a6ee9542f56cd241cf7a960fb8223a6b22 had already unifdef
    MODESETTING_OUTPUT_SLAVE_SUPPORT but commit
    9257b1252da9092ddc676fec9aabe2b33dfad272 didn't notice that.
    
    Signed-off-by: Nikhil Mahale <nmahale@nvidia.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 61a0e27..6e755e9 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1701,10 +1701,8 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name,
  fallback:
     if (koutput->connector_type >= MS_ARRAY_SIZE(output_names))
         snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id);
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     else if (pScrn->is_gpu)
         snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id);
-#endif
     else
         snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id);
 }

commit 4aaeeda4774397dd6d80aa240ca623ae795ec5dc
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Oct 18 16:10:19 2016 +0200

    xfree86: Xorg.wrap: Do not require root rights for cards with 0 outputs
    
    Prior to this commit the Xorg.wrap code to detect if root rights are
    necessary checked for DRM_IOCTL_MODE_GETRESOURCES succeeding *and*
    reporting more then 0 output connectors.
    
    DRM_IOCTL_MODE_GETRESOURCES succeeding alone is enough to differentiate
    between old drm only cards (which need ums and thus root) and kms capable
    cards.
    
    Some hybrid gfx laptops have 0 output connectors on one of their 2 GPUs,
    resulting in Xorg needlessly running as root. This commits removes the
    res.count_connectors > 0 check, fixing this.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index d930962..a25e6ff 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
 
             memset(&res, 0, sizeof(struct drm_mode_card_res));
             r = ioctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res);
-            if (r == 0 && res.count_connectors > 0)
+            if (r == 0)
                 kms_cards++;
 
             close(fd);

commit 7d91063aca4e4d326c294e246bc2dc36cb05318e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Oct 17 18:48:44 2016 +0900

    DRI2: Sync radeonsi_pci_ids.h from Mesa
    
    Fixes DRI2 client driver name mapping for newer AMD GPUs with the
    modesetting driver, allowing the DRI2 extension to initialize.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h b/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
index 4df8e9d..20c1583 100644
--- a/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
+++ b/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
@@ -184,12 +184,24 @@ CHIPSET(0x7300, FIJI_, FIJI)
 
 CHIPSET(0x67E0, POLARIS11_, POLARIS11)
 CHIPSET(0x67E1, POLARIS11_, POLARIS11)
+CHIPSET(0x67E3, POLARIS11_, POLARIS11)
+CHIPSET(0x67E7, POLARIS11_, POLARIS11)
 CHIPSET(0x67E8, POLARIS11_, POLARIS11)
 CHIPSET(0x67E9, POLARIS11_, POLARIS11)
 CHIPSET(0x67EB, POLARIS11_, POLARIS11)
+CHIPSET(0x67EF, POLARIS11_, POLARIS11)
 CHIPSET(0x67FF, POLARIS11_, POLARIS11)
 
 CHIPSET(0x67C0, POLARIS10_, POLARIS10)
+CHIPSET(0x67C1, POLARIS10_, POLARIS10)
+CHIPSET(0x67C2, POLARIS10_, POLARIS10)
+CHIPSET(0x67C4, POLARIS10_, POLARIS10)
+CHIPSET(0x67C7, POLARIS10_, POLARIS10)
+CHIPSET(0x67C8, POLARIS10_, POLARIS10)
+CHIPSET(0x67C9, POLARIS10_, POLARIS10)
+CHIPSET(0x67CA, POLARIS10_, POLARIS10)
+CHIPSET(0x67CC, POLARIS10_, POLARIS10)
+CHIPSET(0x67CF, POLARIS10_, POLARIS10)
 CHIPSET(0x67DF, POLARIS10_, POLARIS10)
 
 CHIPSET(0x98E4, STONEY_, STONEY)

commit f6ff2e974c5de3071c899eba828789f1d4d8645a
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Sat Oct 15 04:13:43 2016 +0000

    modesetting: fix glamor ifdef
    
    Add a missing ifdef needed for --disable-glamor.
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>
    Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 216388f..3da69a3 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -594,6 +594,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
     PixmapSyncDirtyHelper(dirty);
 
     if (!screen->isGPU) {
+#ifdef GLAMOR
         /*
          * When copying from the master framebuffer to the shared pixmap,
          * we must ensure the copy is complete before the slave starts a
@@ -602,6 +603,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
          */
         if (ms->drmmode.glamor)
             glamor_finish(screen);
+#endif
         /* Ensure the slave processes the damage immediately */
         if (timeout)
             *timeout = 0;

commit 8fee6a917b6468e1b116d922f86484498874fb5c
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Fri Oct 14 02:40:59 2016 +0000

    xwin: make glx optional again
    
    Commit 501d8e2b removed --enable-aiglx, but made xwin always be
    --enable-glx.
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/configure.ac b/configure.ac
index 4bb014d..25168cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2233,7 +2233,7 @@ if test "x$XWIN" = xyes; then
 	AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ])
 
 dnl XWin requires OpenGL spec files in order to generate wrapper code for native GL functions
-	if [test "x$XWIN" = xyes] ; then
+	if [test "x$XWIN" = xyes && test "x$GLX" = xyes] ; then
            AC_CHECK_PROG(PYTHON3, python3, python3)
            if test -z "$PYTHON3"; then
                 AC_MSG_ERROR([python3 not found])
@@ -2256,7 +2256,7 @@ AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes])
 AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes])
 AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes])
 AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes])
-AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes])
+AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$GLX" = xyes])
 AM_CONDITIONAL(XWIN_WINDOWS_DRI, [test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes])
 AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
 AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])

commit d13cb974426f7f1110b0bdb08c4ebb46ff8975f7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Oct 21 06:27:57 2016 +1000

    ddx: add new call to purge input devices that weren't added
    
    Special case for the systemd-logind case in xfree86: when we're vt-switched
    away and a device is plugged in, we get a paused fd from logind. Since we
    can't probe the device or do anything with it, we store that device in the
    xfree86 and handle it later when we vt-switch back. The device is not added to
    inputInfo.devices until that time.
    
    When the device is removed while still vt-switched away, the the config system
    never notifies the DDX. It only runs through inputInfo.devices and our device
    was never added to that.
    
    When a device is plugged in, removed, and plugged in again while vt-switched
    away, we have two entries in the xfree86-specific list that refer to the same
    device node, both pending for addition later. On VT switch back, the first one
    (the already removed one) will be added successfully, the second one (the
    still plugged-in one) fails. Since the fd is correct, the device works until
    it is removed again. The removed devices' config_info (i.e. the syspath)
    doesn't match the actual device we addded tough (the input number increases
    with each plug), it doesn't get removed, the fd remains open and we lose track
    of the fd count. Plugging the device in again leads to a dead device.
    
    Fix this by adding a call to notify the DDX to purge any remainders of devices
    with the given config_info, that's the only identifiable bit we have at this
    point.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=97928
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/Xi/stubs.c b/Xi/stubs.c
index 39bee7c..27848a2 100644
--- a/Xi/stubs.c
+++ b/Xi/stubs.c
@@ -143,3 +143,17 @@ DeleteInputDeviceRequest(DeviceIntPtr dev)
 {
     RemoveDevice(dev, TRUE);
 }
+
+/****************************************************************************
+ *
+ * Caller: configRemoveDevice (and others)
+ *
+ * Remove any traces of the input device specified in config_info.
+ * This is only necessary if the ddx keeps information around beyond
+ * the NewInputDeviceRequest/DeleteInputDeviceRequest
+ *
+ */
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+}
diff --git a/config/config.c b/config/config.c
index 1fb368c..fb60295 100644
--- a/config/config.c
+++ b/config/config.c
@@ -107,6 +107,8 @@ remove_devices(const char *backend, const char *config_info)
         if (dev->config_info && strcmp(dev->config_info, config_info) == 0)
             remove_device(backend, dev);
     }
+
+    RemoveInputDeviceTraces(config_info);
 }
 
 BOOL
diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c
index 4ccb439..d201034 100644
--- a/hw/dmx/dmxinput.c
+++ b/hw/dmx/dmxinput.c
@@ -123,3 +123,8 @@ void
 DeleteInputDeviceRequest(DeviceIntPtr pDev)
 {
 }
+
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+}
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 2c39624..8b08747 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2302,3 +2302,8 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
 {
     RemoveDevice(pDev, TRUE);
 }
+
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 0095272..39de498 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1119,6 +1119,21 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
     input_unlock();
 }
 
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+    PausedInputDevicePtr d, tmp;
+
+    xorg_list_for_each_entry_safe(d, tmp, &new_input_devices_list, node) {
+        const char *ci = xf86findOptionValue(d->pInfo->options, "config_info");
+        if (!ci || strcmp(ci, config_info) != 0)
+            continue;
+
+        xorg_list_del(&d->node);
+        free(d);
+    }
+}
+
 /*
  * convenient functions to post events
  */
diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c
index 3efaa2c..fea7e92 100644
--- a/hw/xquartz/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -147,3 +147,18 @@ DeleteInputDeviceRequest(DeviceIntPtr dev)
 {
     DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev);
 }
+
+/****************************************************************************
+ *
+ * Caller: configRemoveDevice (and others)
+ *
+ * Remove any traces of the input device specified in config_info.
+ * This is only necessary if the ddx keeps information around beyond
+ * the NewInputDeviceRequest/DeleteInputDeviceRequest
+ *
+ */
+void
+RemoveInputDeviceTraces(const char *config_info)
+{
+    DEBUG_LOG("RemoveInputDeviceTraces(%s)\n", config_info);
+}
diff --git a/include/input.h b/include/input.h
index c7b1e91..bb58b22 100644
--- a/include/input.h
+++ b/include/input.h
@@ -635,6 +635,7 @@ extern _X_EXPORT int NewInputDeviceRequest(InputOption *options,
                                            InputAttributes * attrs,
                                            DeviceIntPtr *dev);
 extern _X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr dev);
+extern _X_EXPORT void RemoveInputDeviceTraces(const char *config_info);
 
 extern _X_EXPORT void DDXRingBell(int volume, int pitch, int duration);
 

commit 8fcf2fa78f09257933b17e7dc9a03a2034e3076f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 20 15:45:46 2016 +1000

    xfree86: swap the list of paused devices to an xorg_list
    
    No functional changes but it makes it easier to remove elements from the
    middle of the list (future patch).
    
    We don't have an init call into this file, so the list is manually
    initialized.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e31aab3..0095272 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -110,8 +110,16 @@
 static int
  xf86InputDevicePostInit(DeviceIntPtr dev);
 
-static InputInfoPtr *new_input_devices;
-static int new_input_devices_count;
+typedef struct {
+    struct xorg_list node;
+    InputInfoPtr pInfo;
+} PausedInputDeviceRec;
+typedef PausedInputDeviceRec *PausedInputDevicePtr;
+
+static struct xorg_list new_input_devices_list = {
+    .next = &new_input_devices_list,
+    .prev = &new_input_devices_list,
+};
 
 /**
  * Eval config and modify DeviceVelocityRec accordingly
@@ -907,11 +915,10 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
         if (fd != -1) {
             if (paused) {
                 /* Put on new_input_devices list for delayed probe */
-                new_input_devices = xnfreallocarray(new_input_devices,
-                                                    new_input_devices_count + 1,
-                                                    sizeof(pInfo));
-                new_input_devices[new_input_devices_count] = pInfo;
-                new_input_devices_count++;
+                PausedInputDevicePtr new_device = xnfalloc(sizeof *new_device);
+                new_device->pInfo = pInfo;
+
+                xorg_list_append(&new_device->node, &new_input_devices_list);
                 systemd_logind_release_fd(pInfo->major, pInfo->minor, fd);
                 free(path);
                 return BadMatch;
@@ -1540,11 +1547,12 @@ xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type,
 void
 xf86InputEnableVTProbe(void)
 {
-    int i, is_auto = 0;
+    int is_auto = 0;
     DeviceIntPtr pdev;
+    PausedInputDevicePtr d, tmp;
 
-    for (i = 0; i < new_input_devices_count; i++) {
-        InputInfoPtr pInfo = new_input_devices[i];
+    xorg_list_for_each_entry_safe(d, tmp, &new_input_devices_list, node) {
+        InputInfoPtr pInfo = d->pInfo;
         const char *value = xf86findOptionValue(pInfo->options, "_source");
 
         is_auto = 0;
@@ -1557,8 +1565,9 @@ xf86InputEnableVTProbe(void)
         xf86NewInputDevice(pInfo, &pdev,
                                   (!is_auto ||
                                    (is_auto && xf86Info.autoEnableDevices)));
+        xorg_list_del(&d->node);
+        free(d);
     }
-    new_input_devices_count = 0;
 }
 
 /* end of xf86Xinput.c */

commit 28d8855cd4e3be8831fb1c17bf1d205bd8465d1e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 20 15:25:51 2016 +1000

    xfree86: use the right option traversal list to search for an option
    
    They're identically laid-out structs but let's use the right type to search
    for our desired value.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 538b110..e31aab3 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1541,23 +1541,19 @@ void
 xf86InputEnableVTProbe(void)
 {
     int i, is_auto = 0;
-    InputOption *option = NULL;
     DeviceIntPtr pdev;
 
     for (i = 0; i < new_input_devices_count; i++) {
         InputInfoPtr pInfo = new_input_devices[i];
+        const char *value = xf86findOptionValue(pInfo->options, "_source");
 
         is_auto = 0;
-        nt_list_for_each_entry(option, pInfo->options, list.next) {
-            const char *key = input_option_get_key(option);
-            const char *value = input_option_get_value(option);
-
-            if (strcmp(key, "_source") == 0 &&
-                (strcmp(value, "server/hal") == 0 ||
-                 strcmp(value, "server/udev") == 0 ||
-                 strcmp(value, "server/wscons") == 0))
-                is_auto = 1;


Reply to: