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

xorg-server: Changes to 'ubuntu+1'



 ChangeLog                                                                 |   98 ++++
 Xi/exevents.c                                                             |    1 
 configure.ac                                                              |    8 
 debian/changelog                                                          |  105 ++++-
 debian/control                                                            |    8 
 debian/patches/02_hide_panoramix_symbol.diff                              |   13 
 debian/patches/228_autobind_gpu.patch                                     |   50 +-
 debian/patches/autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch |  192 +++++++++
 debian/patches/config-add-no-removal.patch                                |   30 +
 debian/patches/dix-allow-pixmap-dirty-helper-to-be-used-for-non-sha.patch |   40 +
 debian/patches/no-nv.patch                                                |   24 +
 debian/patches/os-use-libunwind-to-generate-backtraces.patch              |  206 ++++++++++
 debian/patches/series                                                     |   21 -
 debian/patches/xephyr-glx-register.patch                                  |   39 +
 debian/patches/xf86crtc-don-t-use-display-for-vx-vy-for-gpu-screens.patch |   65 +++
 debian/patches/xfree86-no-xv-for-gpuscreens.patch                         |   36 +
 debian/patches/xserver-call-CSR-for-gpus.patch                            |   46 ++
 debian/rules                                                              |    2 
 dix/touch.c                                                               |    3 
 hw/xfree86/os-support/shared/posix_tty.c                                  |    3 
 include/list.h                                                            |    2 
 xfixes/xfixesint.h                                                        |    2 
 22 files changed, 950 insertions(+), 44 deletions(-)

New commits:
commit f98a1a4e9a36999bf1fa9748273dd6b2da95b066
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Mon Apr 22 11:16:37 2013 +0300

    Dropped drm_device_keep_trying.patch, not needed anymore.

diff --git a/debian/changelog b/debian/changelog
index d31d677..e9a8e9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ xorg-server (2:1.14.1-0ubuntu0.1) raring; urgency=low
     165_man_xorg_conf_no_device_ident.patch
     233-xf86events-valgrind.patch
     236-use-fbdev-for-poulsbo-oaktrail-medfield.patch
+  * Dropped drm_device_keep_trying.patch, not needed anymore.
 
   [ Bryce Harrington ]
   * 157_check_null_modes.patch: Dropped, patch included upstream.
diff --git a/debian/patches/drm_device_keep_trying.patch b/debian/patches/drm_device_keep_trying.patch
deleted file mode 100644
index cac3fdd..0000000
--- a/debian/patches/drm_device_keep_trying.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From fe5802680b5ecf5ecef55b839f2f555882207d41 Mon Sep 17 00:00:00 2001
-From: Bryce Harrington <bryce@canonical.com>
-Date: Wed, 13 Feb 2013 11:39:34 -0800
-Subject: [PATCH] If drm device couldn't be opened, keep trying for a sec.
-
-The kernel returns EACCES or EAGAIN on drm open when the drm device is
-currently unavailable, such as if it is in use by another process
-(e.g. plymouth), or hasn't finished initializing (e.g. on a really fast
-SSD).  Check for errors when trying to open the device, and continue
-retrying for a short period before giving up.
-
-Fixes: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/982889
-
-Signed-off-by: Bryce Harrington <bryce@canonical.com>
----
- hw/xfree86/os-support/linux/lnx_platform.c |   29 +++++++++++++++++++++++++---
- 1 file changed, 26 insertions(+), 3 deletions(-)
-
---- a/config/udev.c
-+++ b/config/udev.c
-@@ -98,7 +98,7 @@
-         if (strncmp(sysname, "card", 4) != 0)
-             return;
- 
--        LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path);
-+        LogMessage(X_INFO, "config/udev: Adding drm device (%s) %s %s\n", path, sysname, syspath);
- 
-         config_udev_odev_setup_attribs(path, syspath, NewGPUDeviceRequest);
-         return;
-@@ -267,7 +267,7 @@
- 
-         if (strncmp(sysname,"card", 4) != 0)
-             return;
--        ErrorF("removing GPU device %s %d\n", syspath, path);
-+        ErrorF("removing GPU device %s %s\n", syspath, path);
-         if (!path)
-             return;
- 
-@@ -420,11 +420,23 @@
- #ifdef CONFIG_UDEV_KMS
- 
- static Bool
-+get_pci_busid(const char *in, char *pci_str)
-+{
-+    int ret, domain, bus, dev, func;
-+    ret = sscanf(in, "/%04x:%02x:%02x.%d/drm/card%*d", &domain, &bus, &dev, &func);
-+    if (ret != 4)
-+        return FALSE;
-+    sprintf(pci_str, "pci:%04x:%02x:%02x.%d", domain, bus, dev, func);
-+    return TRUE;
-+}
-+
-+static Bool
- config_udev_odev_setup_attribs(const char *path, const char *syspath,
-                                config_odev_probe_proc_ptr probe_callback)
- {
-     struct OdevAttributes *attribs = config_odev_allocate_attribute_list();
-     int ret;
-+    const char *platform;
- 
-     if (!attribs)
-         return FALSE;
-@@ -437,6 +449,32 @@
-     if (ret == FALSE)
-         goto fail;
- 
-+    if (strstr(syspath, "/devices/pci")) {
-+        char pci_str[17];
-+        const char *end = strstr(syspath, "/drm/card");
-+        if (strstr(syspath, "/usb"))
-+            ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, "");
-+        else if (get_pci_busid(end - 13, pci_str))
-+            ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, pci_str);
-+    } else if ((platform = strstr(syspath, "/devices/platform/"))) {
-+        const char *end;
-+        platform += 18;
-+        end = strchr(platform, '.');
-+        if (end) {
-+            char *busid;
-+            ret = asprintf(&busid, "platform:%.*s:%02li",
-+                           (int)(end - platform), platform, strtol(end + 1, NULL, 10));
-+            if (ret >= 0) {
-+                ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, busid);
-+                free(busid);
-+            }
-+            else
-+                ret = TRUE;
-+        }
-+    }
-+    if (ret == FALSE)
-+        goto fail;
-+
-     /* ownership of attribs is passed to probe layer */
-     probe_callback(attribs);
-     return TRUE;
---- a/hw/xfree86/os-support/linux/lnx_platform.c
-+++ b/hw/xfree86/os-support/linux/lnx_platform.c
-@@ -17,8 +17,8 @@
- 
- #include "hotplug.h"
- 
--static Bool
--get_drm_info(struct OdevAttributes *attribs, char *path)
-+static void
-+set_drm_info(const char *path)
- {
-     drmSetVersion sv;
-     char *buf;
-@@ -26,25 +26,23 @@
- 
-     fd = open(path, O_RDWR, O_CLOEXEC);
-     if (fd == -1)
--        return FALSE;
-+        return;
- 
-     sv.drm_di_major = 1;
-     sv.drm_di_minor = 4;
-     sv.drm_dd_major = -1;       /* Don't care */
-     sv.drm_dd_minor = -1;       /* Don't care */
-     if (drmSetInterfaceVersion(fd, &sv)) {
--        ErrorF("setversion 1.4 failed\n");
--        return FALSE;
-+        ErrorF("setversion 1.4 failed on %s: %m\n", path);
-+        close(fd);
-+        return;
-     }
- 
--    xf86_add_platform_device(attribs);
--
-     buf = drmGetBusid(fd);
-+    close(fd);
-     xf86_add_platform_device_attrib(xf86_num_platform_devices - 1,
-                                     ODEV_ATTRIB_BUSID, buf);
-     drmFreeBusid(buf);
--    close(fd);
--    return TRUE;
- }
- 
- Bool
-@@ -93,14 +91,15 @@
- {
-     struct OdevAttribute *attrib;
-     int i;
--    char *path = NULL;
--    Bool ret;
-+    const char *path = NULL, *busid = NULL, *syspath = NULL;
- 
-     xorg_list_for_each_entry(attrib, &attribs->list, member) {
--        if (attrib->attrib_id == ODEV_ATTRIB_PATH) {
-+        if (attrib->attrib_id == ODEV_ATTRIB_PATH)
-             path = attrib->attrib_name;
--            break;
--        }
-+        else if (attrib->attrib_id == ODEV_ATTRIB_SYSPATH)
-+            syspath = attrib->attrib_name;
-+        else if (attrib->attrib_id == ODEV_ATTRIB_BUSID)
-+            busid = attrib->attrib_name;
-     }
-     if (!path)
-         goto out_free;
-@@ -119,10 +118,11 @@
-     LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n",
-                path);
- 
--    ret = get_drm_info(attribs, path);
--    if (ret == FALSE)
--        goto out_free;
--
-+    xf86_add_platform_device(attribs);
-+    if (!busid) {
-+        LogMessage(X_WARNING, "Could not extract busid from syspath %s, attempting drm probe\n", syspath);
-+        set_drm_info(path);
-+    }
-     return;
- 
- out_free:
diff --git a/debian/patches/series b/debian/patches/series
index 9757438..309f5e0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,7 +16,6 @@
 
 ## send upstream
 232-xf86compatoutput-valgrind.patch
-drm_device_keep_trying.patch
 xfree86-no-xv-for-gpuscreens.patch
 xephyr-glx-register.patch
 no-nv.patch

commit 684d94d499a4f020be4e8b87a67e4a65c507ecfa
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Mon Apr 22 10:37:11 2013 +0300

    drop patch 02, upstream

diff --git a/debian/changelog b/debian/changelog
index 21f594d..f74663d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,8 +8,6 @@ xorg-server (2:1.14.1-1) UNRELEASED; urgency=low
     - 04_int10-fix-pci_device_read_rom-usage.diff
     - 07_Revert-kinput-allocate-enough-space-for-null-charact.diff
   * Bump x11proto-input-dev and libpixman-1-dev minimum versions.
-  * Add patch to fix build failure of xserver-xorg-core-udeb.
-    - 02_hide_panoramix_symbol.diff
 
   [ Timo Aaltonen ]
   * Refresh 02_Add-libnettle-as-option-for-sha1.diff.
diff --git a/debian/patches/02_hide_panoramix_symbol.diff b/debian/patches/02_hide_panoramix_symbol.diff
deleted file mode 100644
index 60c25ed..0000000
--- a/debian/patches/02_hide_panoramix_symbol.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
-index 334c71f..309954d 100644
---- a/xfixes/xfixesint.h
-+++ b/xfixes/xfixesint.h
-@@ -291,7 +291,7 @@ int
-  SProcXFixesDestroyPointerBarrier(ClientPtr client);
- 
- /* Xinerama */
--extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr);
-+_X_INTERNAL extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr);
- void PanoramiXFixesInit(void);
- void PanoramiXFixesReset(void);
- 
diff --git a/debian/patches/series b/debian/patches/series
index 810051d..3c8c1a3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,6 @@
 ## Patches with a number < 100 are applied in debian.
 ## Ubuntu patches start with 100.
 001_fedora_extramodes.patch
-02_hide_panoramix_symbol.diff
 #13_debian_add_xkbpath_env_variable.diff
 05_Revert-Unload-submodules.diff
 06_Revert-fb-reorder-Bresenham-error-correction-to-avoi.diff

commit 67effc60b9e58ffabc3f63bdec60fc6ff8385d76
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Mon Apr 22 10:34:52 2013 +0300

    control: Bump inputproto build-dep to 2.3.

diff --git a/debian/changelog b/debian/changelog
index 65a6a0c..21f594d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ xorg-server (2:1.14.1-1) UNRELEASED; urgency=low
   * Refresh 04_int10-fix-pci_device_read_rom-usage.diff.
   * Drop 09_EXA-Track...diff, upstream.
   * control: Mark xvfb as M-A: foreign.
+  * control: Bump inputproto build-dep to 2.3.
 
   [ Robert Hooker ]
   * Update to a newer git snapshot, 7fe5e6dfa5c1e71
diff --git a/debian/control b/debian/control
index 046959d..f2845e2 100644
--- a/debian/control
+++ b/debian/control
@@ -39,7 +39,7 @@ Build-Depends:
  x11proto-xf86vidmode-dev (>= 2.2.99.1),
  xtrans-dev (>= 1.2.2),
  libxau-dev (>= 1:1.0.5-2),
- x11proto-input-dev (>= 2.2.99.1),
+ x11proto-input-dev (>= 2.3),
  x11proto-dri2-dev (>= 2.8),
  libxdmcp-dev (>= 1:0.99.1),
  libxfont-dev (>= 1:1.4.2),

commit 2949ba55e9f15e23393548cefae5cb0c95f113b6
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Mon Apr 22 10:27:56 2013 +0300

    bump the changelogs

diff --git a/ChangeLog b/ChangeLog
index 6169721..eda3cd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,101 @@
+commit f5796f98dadccf67c04f601178966614dd51a1b4
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Apr 17 16:12:00 2013 +1000
+
+    xserver 1.14.1
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit aac2d9d09c73fa2b9d02d8446718aa6ccd7e894a
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Wed Apr 10 16:09:01 2013 +1000
+
+    xf86: fix flush input to work with Linux evdev devices.
+    
+    So when we VT switch back and attempt to flush the input devices,
+    we don't succeed because evdev won't return part of an event,
+    since we were only asking for 4 bytes, we'd only get -EINVAL back.
+    
+    This could later cause events to be flushed that we shouldn't have
+    gotten.
+    
+    This is a fix for CVE-2013-1940.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f)
+
+commit 2eec013569f6daa952482ac5d9db8acc71fe01aa
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Feb 25 11:13:52 2013 +1000
+
+    dix: fix a comment
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c)
+
+commit bce06afc99ce1d948f9002e0c5c7bc29d66425da
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Feb 28 10:43:05 2013 +1000
+
+    Xi: add a comment to make a condition a bit clearer
+    
+    The commit message to 676447190190d8546165e21be242cf16dd69f5ae explains it,
+    but that doesn't stop the WTF moment when reading the code.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 2967391c6d35f03121afa8003e0fb94b62495129)
+
+commit 8e16c2e3038c1c17cae73d8d9681dccce0fd402a
+Author: Robert Morell <rmorell@nvidia.com>
+Date:   Tue Mar 12 09:40:16 2013 -0700
+
+    list.h: Make xorg_list_init inline
+    
+    Otherwise this file is emitted in every unit that includes it.
+    
+    Signed-off-by: Robert Morell <rmorell@nvidia.com>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275)
+
+commit 44def3caf002f9fc53b971014e4e2d62afe39435
+Author: Robert Morell <rmorell@nvidia.com>
+Date:   Tue Mar 12 09:37:43 2013 -0700
+
+    configure.ac: Require inputproto 2.3
+    
+    This picks up support for Xi pointer barriers in the protocol.
+    
+    Signed-off-by: Robert Morell <rmorell@nvidia.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 31595b528645a7e4903eb81da0fc332d78407f25)
+
+commit 27a49db31a146b8e2f1133c23262ecadc5ff4157
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Sat Mar 9 17:12:53 2013 +1000
+
+    xfixes: ifdef PanoramiXFixes* (#62015)
+    
+    Fixes build failure with --disable-xinerama introduced by
+    482e0cb cursor: Move pointer barrier code over to XI
+    
+    Reason is new include order: sdksyms.sh includes xfixes.h, which previously
+    did not include xfixesint.h.
+    
+    As of 482e0cb xfixes.h includes xibarriers.h which includes xfixesint.h
+    
+    X.Org Bug 62015 <http://bugs.freedesktop.org/show_bug.cgi?id=62015>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Tested-by: Daniel Martin <consume.noise@gmail.com>
+    (cherry picked from commit 3ac2e61705432951f9e1b96b42b4214e7f748f94)
+
 commit 103b77c59e3638a45179bf6d7908f5c738d2d872
 Author: Keith Packard <keithp@keithp.com>
 Date:   Tue Mar 5 22:31:17 2013 -0800
diff --git a/debian/changelog b/debian/changelog
index 496fb70..65a6a0c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.14.0-1) UNRELEASED; urgency=low
+xorg-server (2:1.14.1-1) UNRELEASED; urgency=low
 
   [ Maarten Lankhorst ]
   * New upstream release

commit defa6b30be20acd877b986f4a1d9e0f3705ab7cd
Author: Jamie Strandboge <jamie@ubuntu.com>
Date:   Mon Apr 22 14:27:21 2013 +1000

    Release package with patch for CVE-2013-1940

diff --git a/debian/changelog b/debian/changelog
index d4d7dd9..97c7ad9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xorg-server (2:1.13.3-0ubuntu6) raring; urgency=low
+
+  * SECURITY UPDATE: input event leak via inactive VT
+    - debian/patches/CVE-2013-1940.patch: fix flush input to work with
+      Linux evdev devices in hw/xfree86/os-support/shared/posix_tty.c.
+    - CVE-2013-1940
+
+ -- Jamie Strandboge <jamie@ubuntu.com>  Wed, 17 Apr 2013 09:41:17 -0500
+
 xorg-server (2:1.13.3-0ubuntu5) raring; urgency=low
 
   [ Bryce Harrington ]
diff --git a/debian/patches/CVE-2013-1940.patch b/debian/patches/CVE-2013-1940.patch
new file mode 100644
index 0000000..af3ff58
--- /dev/null
+++ b/debian/patches/CVE-2013-1940.patch
@@ -0,0 +1,35 @@
+From 88394b5cf39f298ebaa9a8ce4ace9bef14c2c6ee Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@gmail.com>
+Date: Wed, 10 Apr 2013 16:09:01 +1000
+Subject: [PATCH] xf86: fix flush input to work with Linux evdev devices.
+
+So when we VT switch back and attempt to flush the input devices,
+we don't succeed because evdev won't return part of an event,
+since we were only asking for 4 bytes, we'd only get -EINVAL back.
+
+This could later cause events to be flushed that we shouldn't have
+gotten.
+
+This is a fix for CVE-2013-1940.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+---
+ hw/xfree86/os-support/shared/posix_tty.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
+index ab3757a..4d08c1e 100644
+--- a/hw/xfree86/os-support/shared/posix_tty.c
++++ b/hw/xfree86/os-support/shared/posix_tty.c
+@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
+ {
+     fd_set fds;
+     struct timeval timeout;
+-    char c[4];
++    /* this needs to be big enough to flush an evdev event. */
++    char c[256];
+ 
+     DebugF("FlushingSerial\n");
+     if (tcflush(fd, TCIFLUSH) == 0)
+-- 
+1.8.2
diff --git a/debian/patches/series b/debian/patches/series
index d856ee5..b207b1c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -53,3 +53,4 @@ xserver-call-CSR-for-gpus.patch
 xf86-actually-set-the-compat-output-in-the-failure-c.patch
 autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch
 config-add-no-removal.patch
+CVE-2013-1940.patch

commit f5796f98dadccf67c04f601178966614dd51a1b4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 17 16:12:00 2013 +1000

    xserver 1.14.1
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 44982b3..4289863 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.14.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2013-03-05"
-RELEASE_NAME="Keemun Mao Feng"
+AC_INIT([xorg-server], 1.14.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2013-04-17"
+RELEASE_NAME="Act Normal"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 

commit aac2d9d09c73fa2b9d02d8446718aa6ccd7e894a
Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Apr 10 16:09:01 2013 +1000

    xf86: fix flush input to work with Linux evdev devices.
    
    So when we VT switch back and attempt to flush the input devices,
    we don't succeed because evdev won't return part of an event,
    since we were only asking for 4 bytes, we'd only get -EINVAL back.
    
    This could later cause events to be flushed that we shouldn't have
    gotten.
    
    This is a fix for CVE-2013-1940.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f)

diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index ab3757a..4d08c1e 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
 {
     fd_set fds;
     struct timeval timeout;
-    char c[4];
+    /* this needs to be big enough to flush an evdev event. */
+    char c[256];
 
     DebugF("FlushingSerial\n");
     if (tcflush(fd, TCIFLUSH) == 0)

commit 408107230a7a231c1278ec337e364a55b2bb423a
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Apr 8 12:21:12 2013 +0200

    release to raring

diff --git a/debian/changelog b/debian/changelog
index 3dbb5d3..d4d7dd9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,15 @@
-xorg-server (2:1.13.3-0ubuntu5) UNRELEASED; urgency=low
+xorg-server (2:1.13.3-0ubuntu5) raring; urgency=low
 
+  [ Bryce Harrington ]
   * Add no-nv.patch:  Don't autoprobe -nv on linux.
-  * Refresh drm_device_keep_trying.patch
+  * Refresh drm_device_keep_trying.patch (LP: #1161981)
+    - Set empty busid for usb devices
+    - Parse pci path more strictly.
     - Make platform devices work correctly, try to obtain busid from
-      path if possible. Fallback if not possible (tegra). (LP: #1161981)
-    - Set empty busid for usb devices, and parse pci path more strictly.
+      path if possible.
+    - Fallback if not possible (tegra).
 
- -- Bryce Harrington <bryce@ubuntu.com>  Wed, 03 Apr 2013 13:39:50 -0700
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 08 Apr 2013 11:40:26 +0200
 
 xorg-server (2:1.13.3-0ubuntu4) raring; urgency=low
 

commit 57a259eac11f6baa46b837ca3d2d4d993b507bbc
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Apr 8 08:45:06 2013 +0200

    refresh drm_device_keep_trying.patch

diff --git a/debian/changelog b/debian/changelog
index e4b55b4..3dbb5d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
 xorg-server (2:1.13.3-0ubuntu5) UNRELEASED; urgency=low
 
   * Add no-nv.patch:  Don't autoprobe -nv on linux.
+  * Refresh drm_device_keep_trying.patch
+    - Make platform devices work correctly, try to obtain busid from
+      path if possible. Fallback if not possible (tegra). (LP: #1161981)
+    - Set empty busid for usb devices, and parse pci path more strictly.
 
  -- Bryce Harrington <bryce@ubuntu.com>  Wed, 03 Apr 2013 13:39:50 -0700
 
diff --git a/debian/patches/drm_device_keep_trying.patch b/debian/patches/drm_device_keep_trying.patch
index 3f45cf2..cac3fdd 100644
--- a/debian/patches/drm_device_keep_trying.patch
+++ b/debian/patches/drm_device_keep_trying.patch
@@ -16,11 +16,9 @@ Signed-off-by: Bryce Harrington <bryce@canonical.com>
  hw/xfree86/os-support/linux/lnx_platform.c |   29 +++++++++++++++++++++++++---
  1 file changed, 26 insertions(+), 3 deletions(-)
 
-diff --git a/config/udev.c b/config/udev.c
-index 454838f..af133d2 100644
 --- a/config/udev.c
 +++ b/config/udev.c
-@@ -98,7 +98,7 @@ device_added(struct udev_device *udev_device)
+@@ -98,7 +98,7 @@
          if (strncmp(sysname, "card", 4) != 0)
              return;
  
@@ -29,7 +27,7 @@ index 454838f..af133d2 100644
  
          config_udev_odev_setup_attribs(path, syspath, NewGPUDeviceRequest);
          return;
-@@ -267,7 +267,7 @@ device_removed(struct udev_device *device)
+@@ -267,7 +267,7 @@
  
          if (strncmp(sysname,"card", 4) != 0)
              return;
@@ -38,73 +36,141 @@ index 454838f..af133d2 100644
          if (!path)
              return;
  
-@@ -437,6 +437,16 @@ config_udev_odev_setup_attribs(const char *path, const char *syspath,
+@@ -420,11 +420,23 @@
+ #ifdef CONFIG_UDEV_KMS
+ 
+ static Bool
++get_pci_busid(const char *in, char *pci_str)
++{
++    int ret, domain, bus, dev, func;
++    ret = sscanf(in, "/%04x:%02x:%02x.%d/drm/card%*d", &domain, &bus, &dev, &func);
++    if (ret != 4)
++        return FALSE;
++    sprintf(pci_str, "pci:%04x:%02x:%02x.%d", domain, bus, dev, func);
++    return TRUE;
++}
++
++static Bool
+ config_udev_odev_setup_attribs(const char *path, const char *syspath,
+                                config_odev_probe_proc_ptr probe_callback)
+ {
+     struct OdevAttributes *attribs = config_odev_allocate_attribute_list();
+     int ret;
++    const char *platform;
+ 
+     if (!attribs)
+         return FALSE;
+@@ -437,6 +449,32 @@
      if (ret == FALSE)
          goto fail;
  
 +    if (strstr(syspath, "/devices/pci")) {
++        char pci_str[17];
 +        const char *end = strstr(syspath, "/drm/card");
-+        if (end && end - 12 > syspath) {
-+            char pci_str[17] = "pci:";
-+
-+            strncpy(pci_str + 4, end - 12, 12);
++        if (strstr(syspath, "/usb"))
++            ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, "");
++        else if (get_pci_busid(end - 13, pci_str))
 +            ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, pci_str);
++    } else if ((platform = strstr(syspath, "/devices/platform/"))) {
++        const char *end;
++        platform += 18;
++        end = strchr(platform, '.');
++        if (end) {
++            char *busid;
++            ret = asprintf(&busid, "platform:%.*s:%02li",
++                           (int)(end - platform), platform, strtol(end + 1, NULL, 10));
++            if (ret >= 0) {
++                ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_BUSID, busid);
++                free(busid);
++            }
++            else
++                ret = TRUE;
 +        }
 +    }
++    if (ret == FALSE)
++        goto fail;
 +
      /* ownership of attribs is passed to probe layer */
      probe_callback(attribs);
      return TRUE;
-diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
-index 76f5583..11bb9fc 100644
 --- a/hw/xfree86/os-support/linux/lnx_platform.c
 +++ b/hw/xfree86/os-support/linux/lnx_platform.c
-@@ -17,36 +17,6 @@
+@@ -17,8 +17,8 @@
  
  #include "hotplug.h"
  
 -static Bool
 -get_drm_info(struct OdevAttributes *attribs, char *path)
--{
--    drmSetVersion sv;
--    char *buf;
--    int fd;
--
--    fd = open(path, O_RDWR, O_CLOEXEC);
--    if (fd == -1)
++static void
++set_drm_info(const char *path)
+ {
+     drmSetVersion sv;
+     char *buf;
+@@ -26,25 +26,23 @@
+ 
+     fd = open(path, O_RDWR, O_CLOEXEC);
+     if (fd == -1)
 -        return FALSE;
--
--    sv.drm_di_major = 1;
--    sv.drm_di_minor = 4;
--    sv.drm_dd_major = -1;       /* Don't care */
--    sv.drm_dd_minor = -1;       /* Don't care */
--    if (drmSetInterfaceVersion(fd, &sv)) {
++        return;
+ 
+     sv.drm_di_major = 1;
+     sv.drm_di_minor = 4;
+     sv.drm_dd_major = -1;       /* Don't care */
+     sv.drm_dd_minor = -1;       /* Don't care */
+     if (drmSetInterfaceVersion(fd, &sv)) {
 -        ErrorF("setversion 1.4 failed\n");
 -        return FALSE;
--    }
--
++        ErrorF("setversion 1.4 failed on %s: %m\n", path);
++        close(fd);
++        return;
+     }
+ 
 -    xf86_add_platform_device(attribs);
 -
--    buf = drmGetBusid(fd);
--    xf86_add_platform_device_attrib(xf86_num_platform_devices - 1,
--                                    ODEV_ATTRIB_BUSID, buf);
--    drmFreeBusid(buf);
+     buf = drmGetBusid(fd);
++    close(fd);
+     xf86_add_platform_device_attrib(xf86_num_platform_devices - 1,
+                                     ODEV_ATTRIB_BUSID, buf);
+     drmFreeBusid(buf);
 -    close(fd);
 -    return TRUE;
--}
--
+ }
+ 
  Bool
- xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid)
+@@ -93,14 +91,15 @@
  {
-@@ -119,10 +89,7 @@ xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
+     struct OdevAttribute *attrib;
+     int i;
+-    char *path = NULL;
+-    Bool ret;
++    const char *path = NULL, *busid = NULL, *syspath = NULL;
+ 
+     xorg_list_for_each_entry(attrib, &attribs->list, member) {
+-        if (attrib->attrib_id == ODEV_ATTRIB_PATH) {
++        if (attrib->attrib_id == ODEV_ATTRIB_PATH)
+             path = attrib->attrib_name;
+-            break;
+-        }
++        else if (attrib->attrib_id == ODEV_ATTRIB_SYSPATH)
++            syspath = attrib->attrib_name;
++        else if (attrib->attrib_id == ODEV_ATTRIB_BUSID)
++            busid = attrib->attrib_name;
+     }
+     if (!path)
+         goto out_free;
+@@ -119,10 +118,11 @@
      LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n",
                 path);
  
-+    xf86_add_platform_device(attribs);
 -    ret = get_drm_info(attribs, path);
 -    if (ret == FALSE)
 -        goto out_free;
 -
++    xf86_add_platform_device(attribs);
++    if (!busid) {
++        LogMessage(X_WARNING, "Could not extract busid from syspath %s, attempting drm probe\n", syspath);
++        set_drm_info(path);
++    }
      return;
  
  out_free:

commit 51033f99245f8cf5c03bbcf6f33561a095d1e5ea
Author: Bryce Harrington <bryce@canonical.com>
Date:   Wed Apr 3 13:39:08 2013 -0700

    Add no-nv.patch:  Don't bother autoprobing -nv on linux anymore.

diff --git a/debian/changelog b/debian/changelog
index 2d46fd6..e4b55b4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.13.3-0ubuntu5) UNRELEASED; urgency=low
+
+  * Add no-nv.patch:  Don't autoprobe -nv on linux.
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Wed, 03 Apr 2013 13:39:50 -0700
+
 xorg-server (2:1.13.3-0ubuntu4) raring; urgency=low
 
   * Do not bother registering xv/xvmc on gpu screens.
diff --git a/debian/patches/no-nv.patch b/debian/patches/no-nv.patch
new file mode 100644
index 0000000..4fb23e7
--- /dev/null
+++ b/debian/patches/no-nv.patch
@@ -0,0 +1,24 @@
+commit b770266fa9c3fab5374bdf109676e0b129ac4546
+Author: Bryce Harrington <bryce@canonical.com>
+Date:   Wed Apr 3 13:36:20 2013 -0700
+
+    Don't bother probing -nv on linux.
+    
+    For linux this driver is long obsolete now.  It may have some relevance
+    on non-linux systems.
+
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index b2545be..73a662d 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1220,8 +1220,9 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
+         driverList[idx++] = "nvidia";
+ #ifdef __linux__
+         driverList[idx++] = "nouveau";
+-#endif
++#else
+         driverList[idx++] = "nv";
++#endif
+         break;
+     }
+     case 0x1106:
diff --git a/debian/patches/series b/debian/patches/series
index 1732dba..d856ee5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -31,6 +31,7 @@
 drm_device_keep_trying.patch
 xfree86-no-xv-for-gpuscreens.patch
 xephyr-glx-register.patch
+no-nv.patch
 
 ## waiting for review by upstream
 111_armel-drv-fallbacks.patch

commit 2eec013569f6daa952482ac5d9db8acc71fe01aa
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Feb 25 11:13:52 2013 +1000

    dix: fix a comment
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c)

diff --git a/dix/touch.c b/dix/touch.c
index 0db842c..891cc78 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -902,7 +902,8 @@ TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev)
 }
 
 /**
- * Remove the touch pointer grab from the device. Called from AllowSome()
+ * Remove the touch pointer grab from the device. Called from
+ * DeactivatePointerGrab()
  */
 void
 TouchRemovePointerGrab(DeviceIntPtr dev)

commit bce06afc99ce1d948f9002e0c5c7bc29d66425da
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 28 10:43:05 2013 +1000

    Xi: add a comment to make a condition a bit clearer
    
    The commit message to 676447190190d8546165e21be242cf16dd69f5ae explains it,
    but that doesn't stop the WTF moment when reading the code.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 2967391c6d35f03121afa8003e0fb94b62495129)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 609b126..f05e03d 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1896,6 +1896,7 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
         goto out;
     }
 
+    /* A client is waiting for the begin, don't give it a TouchEnd */
     if (listener->state == LISTENER_AWAITING_BEGIN) {
         listener->state = LISTENER_HAS_END;
         goto out;

commit 8e16c2e3038c1c17cae73d8d9681dccce0fd402a
Author: Robert Morell <rmorell@nvidia.com>
Date:   Tue Mar 12 09:40:16 2013 -0700

    list.h: Make xorg_list_init inline
    
    Otherwise this file is emitted in every unit that includes it.
    
    Signed-off-by: Robert Morell <rmorell@nvidia.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275)

diff --git a/include/list.h b/include/list.h
index 067c679..11de7c5 100644
--- a/include/list.h
+++ b/include/list.h
@@ -119,7 +119,7 @@ struct xorg_list {
  *
  * @param The list to initialized.
  */
-static void
+static inline void
 xorg_list_init(struct xorg_list *list)
 {
     list->next = list->prev = list;

commit 44def3caf002f9fc53b971014e4e2d62afe39435
Author: Robert Morell <rmorell@nvidia.com>
Date:   Tue Mar 12 09:37:43 2013 -0700

    configure.ac: Require inputproto 2.3
    
    This picks up support for Xi pointer barriers in the protocol.
    
    Signed-off-by: Robert Morell <rmorell@nvidia.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 31595b528645a7e4903eb81da0fc332d78407f25)

diff --git a/configure.ac b/configure.ac
index 6e1ff65..44982b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -788,7 +788,7 @@ XPROTO="xproto >= 7.0.22"
 RANDRPROTO="randrproto >= 1.4.0"
 RENDERPROTO="renderproto >= 0.11"
 XEXTPROTO="xextproto >= 7.1.99"
-INPUTPROTO="inputproto >= 2.2.99.1"
+INPUTPROTO="inputproto >= 2.3"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto"


Reply to: