debian/changelog | 2 debian/patches/drm_device_keep_trying.patch | 153 ---------------------------- debian/patches/series | 1 3 files changed, 2 insertions(+), 154 deletions(-)
New commits: commit 2d9274f5658accdbce4f87083f3671abc9c72c54 Author: Timo Aaltonen <[email protected]> Date: Tue Sep 6 15:34:50 2016 +0300 drop drm_device_keep_trying.patch, reupload to sru queue diff --git a/debian/changelog b/debian/changelog index fd9b166..b50d00e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ xorg-server (2:1.18.4-0ubuntu0.1) xenial; urgency=medium randr-do-not-check-the-screen-size.diff: Fix issues changing display mode on prime setups. (LP: #1586260) * os-treat-ssh-as-a-non-local-client.diff: Dropped, upstream. + * drm_device_keep_trying.patch: Dropped, shouldn't be needed anymore, + and causes issues on non-x86 archs. (LP: #1581076) -- Timo Aaltonen <[email protected]> Thu, 01 Sep 2016 10:28:26 +0300 diff --git a/debian/patches/drm_device_keep_trying.patch b/debian/patches/drm_device_keep_trying.patch deleted file mode 100644 index 59bb1cf..0000000 --- a/debian/patches/drm_device_keep_trying.patch +++ /dev/null @@ -1,153 +0,0 @@ -From: Maarten Lankhorst <[email protected]> -Subject: [PATCH] do not use drmGetBusid to grab the pci-id name - -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). Because the probing is done before a vt switch is completed, -we have no way to ensure that we can own DRM master. This results -in failing to boot. - -Also attrib->unowned is not initialized, always initialize it to fix -a valgrind warning, and to prevent adding the same device a second time -after a vt switch. - -Fixes: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/982889 - -Signed-off-by: Bryce Harrington <[email protected]> ---- - hw/xfree86/os-support/linux/lnx_platform.c | 29 +++++++++++++++++++++++++--- - 1 file changed, 26 insertions(+), 3 deletions(-) - ---- a/config/udev.c -+++ b/config/udev.c -@@ -126,7 +126,7 @@ device_added(struct udev_device *udev_de - if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum))) - 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, major(devnum), - minor(devnum), NewGPUDeviceRequest); -@@ -465,18 +465,54 @@ config_udev_fini(void) - - #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 void - config_udev_odev_setup_attribs(const char *path, const char *syspath, - int major, int minor, - config_odev_probe_proc_ptr probe_callback) - { - struct OdevAttributes *attribs = config_odev_allocate_attributes(); -+ const char *platform; - - attribs->path = XNFstrdup(path); - attribs->syspath = XNFstrdup(syspath); - attribs->major = major; - attribs->minor = minor; - -+ if (strstr(syspath, "/devices/pci")) { -+ char pci_str[17]; -+ const char *end = strstr(syspath, "/drm/card"); -+ if (strstr(syspath, "/usb")) -+ attribs->busid = strdup(""); -+ else if (get_pci_busid(end - 13, pci_str)) -+ attribs->busid = strdup(pci_str); -+ } else if ((platform = strstr(syspath, "/devices/platform/"))) { -+ /* OMAP relies on this, modesetting doesn't use it */ -+ const char *end; -+ platform += 18; -+ end = strchr(platform, '.'); -+ if (end) { -+ char *busid; -+ int ret; -+ -+ ret = asprintf(&busid, "platform:%.*s:%02li", -+ (int)(end - platform), platform, strtol(end + 1, NULL, 10)); -+ if (ret >= 0) { -+ attribs->busid = busid; -+ } -+ } -+ } -+ - /* ownership of attribs is passed to probe layer */ - probe_callback(attribs); - } ---- a/hw/xfree86/os-support/linux/lnx_platform.c -+++ b/hw/xfree86/os-support/linux/lnx_platform.c -@@ -23,11 +23,8 @@ - static Bool - get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) - { -- drmSetVersion sv; - drmVersionPtr v; -- char *buf; - int major, minor, fd; -- int err = 0; - Bool paused, server_fd = FALSE; - - major = attribs->major; -@@ -51,18 +48,6 @@ get_drm_info(struct OdevAttributes *attr - 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 */ -- -- err = drmSetInterfaceVersion(fd, &sv); -- if (err) { -- xf86Msg(X_ERROR, "%s: failed to set DRM interface version 1.4: %s\n", -- path, strerror(-err)); -- goto out; -- } -- - /* for a delayed probe we've already added the device */ - if (delayed_index == -1) { - xf86_add_platform_device(attribs, FALSE); -@@ -72,10 +57,6 @@ get_drm_info(struct OdevAttributes *attr - if (server_fd) - xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD; - -- buf = drmGetBusid(fd); -- xf86_platform_odev_attributes(delayed_index)->busid = XNFstrdup(buf); -- drmFreeBusid(buf); -- - v = drmGetVersion(fd); - if (!v) { - xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path); -@@ -88,7 +69,7 @@ get_drm_info(struct OdevAttributes *attr - out: - if (!server_fd) - close(fd); -- return (err == 0); -+ return TRUE; - } - - Bool -@@ -158,8 +139,11 @@ xf86PlatformDeviceProbe(struct OdevAttri - break; - } - -- if (i != xf86_num_platform_devices) -+ if (i != xf86_num_platform_devices) { -+ LogMessage(X_INFO, "config/udev: Ignoring already known drm device (%s)\n", -+ path); - goto out_free; -+ } - - LogMessage(X_INFO, "xfree86: Adding drm device (%s)\n", path); - diff --git a/debian/patches/series b/debian/patches/series index d907d2f..561db5a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -47,7 +47,6 @@ disable-rotation-transform-gpuscreens.patch xmir.patch xmir-desktop-file-hint-flag.patch -drm_device_keep_trying.patch xi2-resize-touch.patch randr-adjust-masters-last-set-time.diff randr-do-not-check-the-screen-size.diff

