xorg-server: Changes to 'ubuntu'
configure.ac | 8
debian/changelog | 24
debian/patches/122_xext_fix_card32_overflow_in_xauth.patch | 30 -
debian/patches/208_switch_on_release.diff | 118 ----
debian/patches/227_null_ptr_midispcur.patch | 18
debian/patches/228_autobind_gpu.patch | 320 ++++++++++---
debian/patches/disable-rotation-transform-gpuscreens.patch | 28 -
debian/patches/randr-do-not-check-the-screen-size.diff | 83 ---
debian/patches/series | 16
debian/patches/xfree86-no-xv-for-gpuscreens.patch | 1
dix/pixmap.c | 16
glamor/glamor_dash.c | 1
hw/xwayland/xwayland-cursor.c | 14
hw/xwayland/xwayland-glamor.c | 60 ++
os/busfault.c | 13
present/present.c | 16
render/render.c | 4
17 files changed, 375 insertions(+), 395 deletions(-)
New commits:
commit 3d48f2b5bd2176b6feff3717fd66b772b33782bd
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 14:23:39 2017 +0200
randr-do-not-check-the-screen-size.diff: Dropped, can't reproduce #1586260 anymore without the patch.
diff --git a/debian/changelog b/debian/changelog
index 911ecc5..a3ef489 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ xorg-server (2:1.19.3-1ubuntu1) UNRELEASED; urgency=medium
review found issues and it never got applied.
* xfree86-no-xv-for-gpuscreens.patch: Drop bogus buglink.
* 227_null_ptr_midispcur.patch: Dropped, upstream didn't accept it.
+ * randr-do-not-check-the-screen-size.diff: Dropped, can't reproduce
+ #1586260 anymore without the patch.
[ Robert Ancell ]
* debian/patches/xmir.patch:
diff --git a/debian/patches/randr-do-not-check-the-screen-size.diff b/debian/patches/randr-do-not-check-the-screen-size.diff
deleted file mode 100644
index 5f8f015..0000000
--- a/debian/patches/randr-do-not-check-the-screen-size.diff
+++ /dev/null
@@ -1,83 +0,0 @@
-Subject: [PATCH xserver] randr: Do not check the screen size bound for gpu screens
-From: Nikhil Mahale <nmahale@nvidia.com>
-Date: 20.05.2016 08:00
-To: <xorg-devel@lists.x.org>
-CC: Nikhil Mahale <nmahale@nvidia.com>
-
-For gpu screen, CrtcSet set/adjust the master screen size along
-mode in following callstack -
-
- ProcRRSetCrtcConfig()
- |
- -> RRCrtcSet()
- |
- -> rrCheckPixmapBounding()
- |
- -> pScrPriv->rrScreenSetSize()
-
-Checking screen size bound for gpus screen cause some configurations
-to fails, e.g
-
- $ xrandr --output eDP --mode 1920x1080 --pos 0x0 --output HDMI \
- --mode 2560x1440 --pos 0x0
-
- Here xrandr utility first sets screen size to 2560x1440 which
- gets resized to 1920x1080 on RRSetCrtcConfig request for eDP,
- and then RRSetCrtcConfig request for HDMI fails because
- of failure of screen bound check.
-
-Signed-off-by: Nikhil Mahale <nmahale@nvidia.com>
----
- randr/rrcrtc.c | 19 ++++++-------------
- 1 file changed, 6 insertions(+), 13 deletions(-)
-
---- a/randr/rrcrtc.c
-+++ b/randr/rrcrtc.c
-@@ -1313,27 +1313,20 @@ ProcRRSetCrtcConfig(ClientPtr client)
-
- #ifdef RANDR_12_INTERFACE
- /*
-+ * For gpu screen, CrtcSet set/adjust the master screen size along
-+ * with mode.
-+ *
- * Check screen size bounds if the DDX provides a 1.2 interface
- * for setting screen size. Else, assume the CrtcSet sets
- * the size along with the mode. If the driver supports transforms,
- * then it must allow crtcs to display a subset of the screen, so
- * only do this check for drivers without transform support.
- */
-- if (pScrPriv->rrScreenSetSize && !crtc->transforms) {
-+ if (!pScreen->isGPU && pScrPriv->rrScreenSetSize && !crtc->transforms) {
- int source_width;
- int source_height;
- PictTransform transform;
- struct pixman_f_transform f_transform, f_inverse;
-- int width, height;
--
-- if (pScreen->isGPU) {
-- width = pScreen->current_master->width;
-- height = pScreen->current_master->height;
-- }
-- else {
-- width = pScreen->width;
-- height = pScreen->height;
-- }
-
- RRTransformCompute(stuff->x, stuff->y,
- mode->mode.width, mode->mode.height,
-@@ -1343,13 +1336,13 @@ ProcRRSetCrtcConfig(ClientPtr client)
-
- RRModeGetScanoutSize(mode, &transform, &source_width,
- &source_height);
-- if (stuff->x + source_width > width) {
-+ if (stuff->x + source_width > pScreen->width) {
- client->errorValue = stuff->x;
- free(outputs);
- return BadValue;
- }
-
-- if (stuff->y + source_height > height) {
-+ if (stuff->y + source_height > pScreen->height) {
- client->errorValue = stuff->y;
- free(outputs);
- return BadValue;
diff --git a/debian/patches/series b/debian/patches/series
index 8cf777f..be80ff6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -28,4 +28,3 @@ xf86-ignore-conflicting-rr-caps.patch
xmir.patch
xi2-resize-touch.patch
-randr-do-not-check-the-screen-size.diff
commit b10d141b6f0618820957d353a6310132db9d9962
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 12:07:24 2017 +0200
227_null_ptr_midispcur.patch: Dropped, upstream didn't accept it.
diff --git a/debian/changelog b/debian/changelog
index 8b60660..911ecc5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,7 @@ xorg-server (2:1.19.3-1ubuntu1) UNRELEASED; urgency=medium
* 122_xext_fix_card32_overflow_in_xauth.patch: Dropped, upstream
review found issues and it never got applied.
* xfree86-no-xv-for-gpuscreens.patch: Drop bogus buglink.
+ * 227_null_ptr_midispcur.patch: Dropped, upstream didn't accept it.
[ Robert Ancell ]
* debian/patches/xmir.patch:
diff --git a/debian/patches/227_null_ptr_midispcur.patch b/debian/patches/227_null_ptr_midispcur.patch
deleted file mode 100644
index 621bdaa..0000000
--- a/debian/patches/227_null_ptr_midispcur.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Check for NULL pointer before dereferencing pointer from miGetDCDevice.
- Fixes crash after connecting a bluetooth keyboard.
-Author: Bryce Harrington <bryce@ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/930936
-
---- a/mi/midispcur.c
-+++ b/mi/midispcur.c
-@@ -421,6 +421,10 @@ miDCRestoreUnderCursor(DeviceIntPtr pDev
- GCPtr pGC;
-
- pBuffer = miGetDCDevice(pDev, pScreen);
-+
-+ if (!pBuffer)
-+ return FALSE;
-+
- pSave = pBuffer->pSave;
-
- pWin = pScreen->root;
diff --git a/debian/patches/series b/debian/patches/series
index accb01f..8cf777f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,11 +20,6 @@
xfree86-no-xv-for-gpuscreens.patch
no-nv.patch
-## waiting for review by upstream
-227_null_ptr_midispcur.patch
-# https://bugs.freedesktop.org/show_bug.cgi?id=24181
-# Probably is just papering over issue; needs further analysis
-
## upstream patches
# hybrid graphics fixes
commit ad61263a076dc32ffd0c3f8c5f707a68bfaef317
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 12:01:48 2017 +0200
xfree86-no-xv-for-gpuscreens.patch: Drop bogus buglink.
diff --git a/debian/changelog b/debian/changelog
index 1ac0580..8b60660 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,7 @@ xorg-server (2:1.19.3-1ubuntu1) UNRELEASED; urgency=medium
supports rotation now.
* 122_xext_fix_card32_overflow_in_xauth.patch: Dropped, upstream
review found issues and it never got applied.
+ * xfree86-no-xv-for-gpuscreens.patch: Drop bogus buglink.
[ Robert Ancell ]
* debian/patches/xmir.patch:
diff --git a/debian/patches/xfree86-no-xv-for-gpuscreens.patch b/debian/patches/xfree86-no-xv-for-gpuscreens.patch
index 38a5639..966fc59 100644
--- a/debian/patches/xfree86-no-xv-for-gpuscreens.patch
+++ b/debian/patches/xfree86-no-xv-for-gpuscreens.patch
@@ -1,6 +1,5 @@
Description: Do not bother registering xv/xvmc on gpu screens.
Author: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/1079096
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
commit aebf580674a1054a2d2ef4336e02ffd3a29df4c3
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 11:57:52 2017 +0200
122_xext_fix_card32_overflow_in_xauth.patch: Dropped, upstream review found issues and it never got applied.
diff --git a/debian/changelog b/debian/changelog
index 3fa3bd0..1ac0580 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ xorg-server (2:1.19.3-1ubuntu1) UNRELEASED; urgency=medium
* 228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
* disable-rotation-transform-gpuscreens.patch: Dropped, nvidia
supports rotation now.
+ * 122_xext_fix_card32_overflow_in_xauth.patch: Dropped, upstream
+ review found issues and it never got applied.
[ Robert Ancell ]
* debian/patches/xmir.patch:
diff --git a/debian/patches/122_xext_fix_card32_overflow_in_xauth.patch b/debian/patches/122_xext_fix_card32_overflow_in_xauth.patch
deleted file mode 100644
index 22740f2..0000000
--- a/debian/patches/122_xext_fix_card32_overflow_in_xauth.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Description: Prevent overflow of a CARD32 variable millis by doing bounds checking.
- This is a patch currently in discussion at fdo #27134, so this patch can be dropped in favor of whatever upstream decides to include.
-Author: Bryce Harrington <bryce@ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/519049
-
-Index: xorg-server-1.17.2/Xext/security.c
-===================================================================
---- xorg-server-1.17.2.orig/Xext/security.c
-+++ xorg-server-1.17.2/Xext/security.c
-@@ -261,9 +261,9 @@ SecurityComputeAuthorizationTimeout(Secu
- /* maxSecs is the number of full seconds that can be expressed in
- * 32 bits worth of milliseconds
- */
-- CARD32 maxSecs = (CARD32) (~0) / (CARD32) MILLI_PER_SECOND;
-+ CARD32 maxSecs = (CARD32) (MAXINT) / (CARD32) MILLI_PER_SECOND;
-
-- if (seconds > maxSecs) { /* only come here if we want to wait more than 49 days */
-+ if (seconds > maxSecs) { /* only come here if we want to wait more than 24 days */
- pAuth->secondsRemaining = seconds - maxSecs;
- return maxSecs * MILLI_PER_SECOND;
- }
-@@ -297,8 +297,6 @@ SecurityAuthorizationExpired(OsTimerPtr
- {
- SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) pval;
-
-- assert(pAuth->timer == timer);
--
- if (pAuth->secondsRemaining) {
- return SecurityComputeAuthorizationTimeout(pAuth,
- pAuth->secondsRemaining);
diff --git a/debian/patches/series b/debian/patches/series
index a4b750f..accb01f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,10 +21,6 @@ xfree86-no-xv-for-gpuscreens.patch
no-nv.patch
## waiting for review by upstream
-122_xext_fix_card32_overflow_in_xauth.patch
-# https://bugs.freedesktop.org/show_bug.cgi?id=27134
-# http://lists.x.org/archives/xorg-devel/2010-April/007777.html
-# Resent to mailing list, Feb 2013
227_null_ptr_midispcur.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=24181
# Probably is just papering over issue; needs further analysis
commit 59df590b8ba28c7a99baa135cd1bdae3f4fe3df3
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 11:52:56 2017 +0200
actually drop 208_switch_on_release.diff
diff --git a/debian/changelog b/debian/changelog
index 2915f89..3fa3bd0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,7 +15,7 @@ xorg-server (2:1.19.3-1ubuntu1) UNRELEASED; urgency=medium
to confflags.
* 232-xf86compatoutput-valgrind.patch: This was added upstream
already, no need to carry a duplicate check.
- * 208_switch_on_release.diff: Disabled, doesn't work with 1.19.
+ * 208_switch_on_release.diff: Dropped, doesn't work with 1.19.
* 228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
* disable-rotation-transform-gpuscreens.patch: Dropped, nvidia
supports rotation now.
diff --git a/debian/patches/208_switch_on_release.diff b/debian/patches/208_switch_on_release.diff
deleted file mode 100644
index bbd5411..0000000
--- a/debian/patches/208_switch_on_release.diff
+++ /dev/null
@@ -1,118 +0,0 @@
-Description: Perform keyboard layout switches on key-release rather than key-press events.
- This solves a very long-standing issue where e.g. <ctrl>+<shift>+<key> fails when ctrl+shift is configured for layout switching.
-Author: Bryce Harrington <bryce@ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/36812
-Bug-Ubuntu: https://launchpad.net/bugs/711842
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=865
-
---- a/xkb/xkbActions.c
-+++ b/xkb/xkbActions.c
-@@ -352,25 +352,86 @@ _XkbFilterLatchState(XkbSrvInfoPtr xkbi,
- }
-
- static int
--_XkbFilterLockState(XkbSrvInfoPtr xkbi,
-+xkbSwitchGroupOnRelease(void)
-+{
-+ /* TODO: user configuring */
-+ return TRUE;
-+}
-+
-+static void
-+xkbUpdateLockedGroup(XkbSrvInfoPtr xkbi, XkbAction *pAction)
-+{
-+ XkbGroupAction ga = pAction->group;
-+
-+ if (ga.flags & XkbSA_GroupAbsolute)
-+ xkbi->state.locked_group = XkbSAGroup(&ga);
-+ else
-+ xkbi->state.locked_group += XkbSAGroup(&ga);
-+}
-+
-+static XkbFilterPtr _XkbNextFreeFilter(XkbSrvInfoPtr xkbi);
-+
-+static int
-+_XkbFilterLockGroup(XkbSrvInfoPtr xkbi,
- XkbFilterPtr filter, unsigned keycode, XkbAction *pAction)
- {
- if (filter->keycode == 0) /* initial press */
- AccessXCancelRepeatKey(xkbi, keycode);
-
-- if (pAction && (pAction->type == XkbSA_LockGroup)) {
-- if (pAction->group.flags & XkbSA_GroupAbsolute)
-- xkbi->state.locked_group = XkbSAGroup(&pAction->group);
-- else
-- xkbi->state.locked_group += XkbSAGroup(&pAction->group);
-- return 1;
-+ int sendEvent = 1;
-+
-+ if (!xkbSwitchGroupOnRelease()) {
-+ xkbUpdateLockedGroup(xkbi, pAction);
-+ return sendEvent;
- }
-+
-+ /* Delay switch till button release */
-+ if (filter->keycode == 0) { /* initial press */
-+ filter->keycode = keycode;
-+ filter->active = 1;
-+ filter->filterOthers = 0; /* for what? */
-+ filter->filter = _XkbFilterLockGroup;
-+
-+ /* filter->priv = 0; */
-+ filter->upAction = *pAction;
-+
-+ /* Ok, now we need to simulate the action which would go if this action didn't block it.
-+ XkbSA_SetMods is the one: it is to set modifier' flag up. */
-+ {
-+ XkbStateRec fake_state = xkbi->state;
-+ XkbAction act;
-+
-+ fake_state.mods = 0;
-+ act = XkbGetKeyAction(xkbi, &fake_state, keycode);
-+
-+ /* KLUDGE: XkbSA_SetMods only? */
-+ if (act.type == XkbSA_SetMods) {
-+ XkbFilterPtr filter = _XkbNextFreeFilter(xkbi);
-+
-+ sendEvent = _XkbFilterSetState(xkbi, filter, keycode, &act);
-+ }
-+ }
-+ }
-+ else {
-+ /* do nothing if some button else is pressed */
-+ if (!pAction)
-+ xkbUpdateLockedGroup(xkbi, &filter->upAction);
-+ filter->active = 0;
-+ }
-+
-+ return sendEvent;
-+}
-+
-+static int
-+_XkbFilterLockMods(XkbSrvInfoPtr xkbi,
-+ XkbFilterPtr filter, unsigned keycode, XkbAction *pAction)
-+{
- if (filter->keycode == 0) { /* initial press */
- filter->keycode = keycode;
- filter->active = 1;
- filter->filterOthers = 0;
- filter->priv = xkbi->state.locked_mods & pAction->mods.mask;
-- filter->filter = _XkbFilterLockState;
-+ filter->filter = _XkbFilterLockMods;
- filter->upAction = *pAction;
- if (!(filter->upAction.mods.flags & XkbSA_LockNoLock))
- xkbi->state.locked_mods |= pAction->mods.mask;
-@@ -1244,9 +1305,12 @@ XkbActionGetFilter(DeviceIntPtr dev, Dev
- *sendEvent = _XkbFilterLatchState(xkbi, filter, key, act);
- break;
- case XkbSA_LockMods:
-+ filter = _XkbNextFreeFilter(xkbi);
-+ sendEvent = _XkbFilterLockMods(xkbi, filter, key, &act);
-+ break;
- case XkbSA_LockGroup:
- filter = _XkbNextFreeFilter(xkbi);
-- *sendEvent = _XkbFilterLockState(xkbi, filter, key, act);
-+ *sendEvent = _XkbFilterLockGroup(xkbi, filter, key, act);
- break;
- case XkbSA_ISOLock:
- filter = _XkbNextFreeFilter(xkbi);
diff --git a/debian/patches/series b/debian/patches/series
index d4384af..a4b750f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -25,11 +25,6 @@ no-nv.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=27134
# http://lists.x.org/archives/xorg-devel/2010-April/007777.html
# Resent to mailing list, Feb 2013
-#208_switch_on_release.diff
-# https://bugs.freedesktop.org/show_bug.cgi?id=865
-# - Violates XKB spec: Section 6.3, SA_LockGroup
-# http://lists.freedesktop.org/archives/xorg-devel/2013-January/035046.html
-# - Different implementation proposed on fdo mailing list
227_null_ptr_midispcur.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=24181
# Probably is just papering over issue; needs further analysis
commit d9b663e05dd8a80eaad4d918a079e53035b4d76b
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 11:48:49 2017 +0200
update changelog, merge entries from ppa uploads
diff --git a/debian/changelog b/debian/changelog
index cee7bbc..2915f89 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,24 +1,4 @@
-xorg-server (2:1.19.3-1) unstable; urgency=medium
-
- * New upstream release.
-
- -- Emilio Pozuelo Monfort <pochu@debian.org> Wed, 15 Mar 2017 20:53:42 +0100
-
-xorg-server (2:1.19.2-1ubuntu3) UNRELEASED; urgency=medium
-
- * 228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
- * disable-rotation-transform-gpuscreens.patch: Dropped, nvidia
- supports rotation now.
-
- -- Timo Aaltonen <tjaalton@debian.org> Thu, 16 Mar 2017 11:44:22 +0200
-
-xorg-server (2:1.19.2-1ubuntu2) zesty; urgency=medium
-
- * 208_switch_on_release.diff: Disabled, doesn't work with 1.19.
-
- -- Timo Aaltonen <tjaalton@debian.org> Sat, 11 Mar 2017 10:34:09 +0200
-
-xorg-server (2:1.19.2-1ubuntu1) zesty; urgency=medium
+xorg-server (2:1.19.3-1ubuntu1) UNRELEASED; urgency=medium
[ Timo Aaltonen ]
* Merge from Debian experimental.
@@ -35,6 +15,10 @@ xorg-server (2:1.19.2-1ubuntu1) zesty; urgency=medium
to confflags.
* 232-xf86compatoutput-valgrind.patch: This was added upstream
already, no need to carry a duplicate check.
+ * 208_switch_on_release.diff: Disabled, doesn't work with 1.19.
+ * 228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
+ * disable-rotation-transform-gpuscreens.patch: Dropped, nvidia
+ supports rotation now.
[ Robert Ancell ]
* debian/patches/xmir.patch:
@@ -45,6 +29,12 @@ xorg-server (2:1.19.2-1ubuntu1) zesty; urgency=medium
-- Timo Aaltonen <tjaalton@debian.org> Mon, 06 Mar 2017 14:13:12 +0200
+xorg-server (2:1.19.3-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Emilio Pozuelo Monfort <pochu@debian.org> Wed, 15 Mar 2017 20:53:42 +0100
+
xorg-server (2:1.19.2-1) unstable; urgency=medium
[ Andreas Boll ]
commit 872ad9c3327c53cbf04b5272668c82bd27f25a7d
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 11:45:41 2017 +0200
disable-rotation-transform-gpuscreens.patch: Dropped, nvidia supports rotation now.
diff --git a/debian/changelog b/debian/changelog
index 3bed2a5..d4b4e89 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
xorg-server (2:1.19.2-1ubuntu3) UNRELEASED; urgency=medium
* 228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
+ * disable-rotation-transform-gpuscreens.patch: Dropped, nvidia
+ supports rotation now.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 16 Mar 2017 11:44:22 +0200
diff --git a/debian/patches/disable-rotation-transform-gpuscreens.patch b/debian/patches/disable-rotation-transform-gpuscreens.patch
deleted file mode 100644
index d4d1137..0000000
--- a/debian/patches/disable-rotation-transform-gpuscreens.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: Disable support for rotations and transforms on gpu screens.
-Author: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
-Bug-Ubuntu: https://launchpad.net/bugs/1386620
-Bug-Ubuntu: https://launchpad.net/bugs/1308515
-Bug-Ubuntu: https://launchpad.net/bugs/1489696
-
---- a/hw/xfree86/modes/xf86RandR12.c
-+++ b/hw/xfree86/modes/xf86RandR12.c
-@@ -934,6 +934,9 @@ xf86RandR12SetRotations(ScreenPtr pScree
- if (xf86RandR12Key == NULL)
- return;
-
-+ if (pScreen->isGPU)
-+ rotations = RR_Rotate_0;
-+
- randrp = XF86RANDRINFO(pScreen);
- #if RANDR_12_INTERFACE
- for (c = 0; c < config->num_crtc; c++) {
-@@ -954,6 +957,9 @@ xf86RandR12SetTransformSupport(ScreenPtr
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- #endif
-
-+ if (pScreen->isGPU)
-+ transforms = FALSE;
-+
- if (xf86RandR12Key == NULL)
- return;
-
diff --git a/debian/patches/series b/debian/patches/series
index 7e8eb6c..d4384af 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -39,7 +39,6 @@ no-nv.patch
# hybrid graphics fixes
228_autobind_gpu.patch
xf86-ignore-conflicting-rr-caps.patch
-disable-rotation-transform-gpuscreens.patch
xmir.patch
xi2-resize-touch.patch
commit d01a14768f1c02e76b15c4f07c1ea197cb150029
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Mar 16 11:44:39 2017 +0200
228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
diff --git a/debian/changelog b/debian/changelog
index 2a5fe15..3bed2a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.19.2-1ubuntu3) UNRELEASED; urgency=medium
+
+ * 228_autobind_gpu.patch: Update from Fedora, fixes nvidia.
+
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 16 Mar 2017 11:44:22 +0200
+
xorg-server (2:1.19.2-1ubuntu2) zesty; urgency=medium
* 208_switch_on_release.diff: Disabled, doesn't work with 1.19.
diff --git a/debian/patches/228_autobind_gpu.patch b/debian/patches/228_autobind_gpu.patch
index 5a609fc..8025cbd 100644
--- a/debian/patches/228_autobind_gpu.patch
+++ b/debian/patches/228_autobind_gpu.patch
@@ -1,40 +1,158 @@
-From 37d51acb3b6a38af1717bfaa7925043c35bfb447 Mon Sep 17 00:00:00 2001
+From 4471df41ea6e94834a2b10643ca7fcd69682d276 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 17 Aug 2012 09:49:24 +1000
-Subject: [PATCH] autobind GPUs to the screen, (v3)
+Subject: [PATCH xserver v3] autobind GPUs to the screen
-this is racy and really not what we want for hotplug going forward,
-but until DE support is in GNOME its probably for the best.
+This is a modified version of a patch we've been carry-ing in Fedora and
+RHEL for years now. This patch automatically adds secondary GPUs to the
+master as output sink / offload source making e.g. the use of
+slave-outputs just work, with requiring the user to manually run
+"xrandr --setprovideroutputsource" before he can hookup an external
+monitor to his hybrid graphics laptop.
-v2: fix if config or slave config is NULL
-v3: fix multi useful slaves
-DO NOT UPSTREAM.
+There is one problem with this patch, which is why it was not upstreamed
+before. What to do when a secondary GPU gets detected really is a policy
+decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
+as such should be under control of the Desktop Environment.
+
+Unconditionally adding autobinding support to the xserver will result
+in races between the DE dealing with the hotplug of a secondary GPU
+and the server itself dealing with it.
+
+However we've waited for years for any Desktop Environments to actually
+start doing some sort of autoconfiguration of secondary GPUs and there
+is still not a single DE dealing with this, so I believe that it is
+time to upstream this now.
+
+To avoid potential future problems if any DEs get support for doing
+secondary GPU configuration themselves, the new autobind functionality
+is made optional. Since no DEs currently support doing this themselves it
+is enabled by default. When DEs grow support for doing this themselves
+they can disable the servers autobinding through the servers cmdline or a
+xorg.conf snippet.
+
+Signed-off-by: Dave Airlie <airlied@gmail.com>
+[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+Changes in v2:
+-Make the default enabled instead of installing a xorg.conf
+ snippet which enables it unconditionally
+Changes in v3:
+-Handle GPUScreen autoconfig in randr/rrprovider.c, looking at
+ rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c
+ looking at xf86CrtcConfig->provider. This fixes the autoconfig not
+ working with the nvidia binary driver
---
- hw/xfree86/common/xf86Init.c | 12 ++++++++++++
- hw/xfree86/common/xf86platformBus.c | 3 +++
- hw/xfree86/modes/xf86Crtc.c | 32 ++++++++++++++++++++++++++++++++
- 3 files changed, 47 insertions(+), 0 deletions(-)
+ hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++
+ hw/xfree86/common/xf86Globals.c | 2 ++
+ hw/xfree86/common/xf86Init.c | 20 ++++++++++++++++++++
+ hw/xfree86/common/xf86Priv.h | 1 +
+ hw/xfree86/common/xf86Privstr.h | 1 +
+ hw/xfree86/common/xf86platformBus.c | 4 ++++
+ hw/xfree86/man/Xorg.man | 7 +++++++
+ hw/xfree86/man/xorg.conf.man | 6 ++++++
+ randr/randrstr.h | 3 +++
+ randr/rrprovider.c | 22 ++++++++++++++++++++++
+ 10 files changed, 85 insertions(+)
+diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
+index 21daf1a..df3ca50 100644
+--- a/hw/xfree86/common/xf86Config.c
++++ b/hw/xfree86/common/xf86Config.c
+@@ -719,6 +719,7 @@ typedef enum {
+ FLAG_DRI2,
+ FLAG_USE_SIGIO,
+ FLAG_AUTO_ADD_GPU,
++ FLAG_AUTO_BIND_GPU,
+ FLAG_MAX_CLIENTS,
+ FLAG_IGLX,
+ } FlagValues;
+@@ -778,6 +779,8 @@ static OptionInfoRec FlagOptions[] = {
+ {0}, FALSE},
+ {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
+ {0}, FALSE},
++ {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN,
++ {0}, FALSE},
+ {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER,
+ {0}, FALSE },
+ {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
+@@ -857,6 +860,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
+ }
+ xf86Msg(from, "%sutomatically adding GPU devices\n",
+ xf86Info.autoAddGPU ? "A" : "Not a");
++
++ if (xf86AutoBindGPUDisabled) {
++ xf86Info.autoBindGPU = FALSE;
++ from = X_CMDLINE;
++ }
++ else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) {
++ xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU,
++ &xf86Info.autoBindGPU);
++ from = X_CONFIG;
++ }
++ else {
++ from = X_DEFAULT;
++ }
++ xf86Msg(from, "%sutomatically binding GPU devices\n",
++ xf86Info.autoBindGPU ? "A" : "Not a");
++
+ /*
+ * Set things up based on the config file information. Some of these
+ * settings may be overridden later when the command line options are
+diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
+index e962b75..0d1e31b 100644
+--- a/hw/xfree86/common/xf86Globals.c
++++ b/hw/xfree86/common/xf86Globals.c
+@@ -136,6 +136,7 @@ xf86InfoRec xf86Info = {
+ #else
+ .autoAddGPU = FALSE,
+ #endif
++ .autoBindGPU = TRUE,
+ };
+
+ const char *xf86ConfigFile = NULL;
+@@ -197,6 +198,7 @@ Bool xf86FlipPixels = FALSE;
+ Gamma xf86Gamma = { 0.0, 0.0, 0.0 };
+
+ Bool xf86AllowMouseOpenFail = FALSE;
++Bool xf86AutoBindGPUDisabled = FALSE;
+
+ #ifdef XF86VIDMODE
+ Bool xf86VidModeDisabled = FALSE;
+diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
+index a544b65..b0cba3d 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
-@@ -297,6 +297,16 @@ xf86PrivsElevated(void)
- return privsElevated;
+@@ -76,6 +76,7 @@
+ #include "xf86DDC.h"
+ #include "xf86Xinput.h"
+ #include "xf86InPriv.h"
++#include "xf86Crtc.h"
+ #include "picturestr.h"
+
+ #include "xf86Bus.h"
+@@ -298,6 +299,19 @@ xf86PrivsElevated(void)
}
-+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
-+static void
+ static void
+xf86AutoConfigOutputDevices(void)
+{
+ int i;
+
++ if (!xf86Info.autoBindGPU)
++ return;
++
+ for (i = 0; i < xf86NumGPUScreens; i++)
-+ xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
++ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
++ xf86ScrnToScreen(xf86Screens[0]));
+}
+
- static void
++static void
InstallSignalHandlers(void)
{
-@@ -892,6 +902,8 @@ InitOutput(ScreenInfo * pScreenInfo, int
+ /*
+@@ -871,6 +885,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
for (i = 0; i < xf86NumGPUScreens; i++)
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
@@ -43,64 +161,142 @@ DO NOT UPSTREAM.
xf86VGAarbiterWrapFunctions();
if (sigio_blocked)
input_unlock();
---- a/hw/xfree86/common/xf86platformBus.c
-+++ b/hw/xfree86/common/xf86platformBus.c
-@@ -486,9 +486,12 @@ xf86platformProbeDev(DriverPtr drvp)
- }
+@@ -1389,6 +1405,10 @@ ddxProcessArgument(int argc, char **argv, int i)
+ xf86Info.iglxFrom = X_CMDLINE;
+ return 0;
}
++ if (!strcmp(argv[i], "-noautoBindGPU")) {
++ xf86AutoBindGPUDisabled = TRUE;
++ return 1;
++ }
-+ free(devList);
- return foundScreen;
- }
+ /* OS-specific processing */
+ return xf86ProcessArgument(argc, argv, i);
+diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
+index c1f8a18..9a3d0df 100644
+--- a/hw/xfree86/common/xf86Priv.h
++++ b/hw/xfree86/common/xf86Priv.h
+@@ -46,6 +46,7 @@
+ extern _X_EXPORT const char *xf86ConfigFile;
+ extern _X_EXPORT const char *xf86ConfigDir;
+ extern _X_EXPORT Bool xf86AllowMouseOpenFail;
++extern _X_EXPORT Bool xf86AutoBindGPUDisabled;
-+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
-+
- int
- xf86platformAddDevice(int index)
- {
-@@ -560,6 +563,7 @@ xf86platformAddDevice(int index)
+ #ifdef XF86VIDMODE
+ extern _X_EXPORT Bool xf86VidModeDisabled;
+diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
+index c29b3cc..4c5f54b 100644
+--- a/hw/xfree86/common/xf86Privstr.h
++++ b/hw/xfree86/common/xf86Privstr.h
+@@ -102,6 +102,7 @@ typedef struct {
+ MessageType dri2From;
+
+ Bool autoAddGPU;
++ Bool autoBindGPU;
+ } xf86InfoRec, *xf86InfoPtr;
+
+ #ifdef DPMSExtension
+diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
+index 063e81c..42789ca 100644
+--- a/hw/xfree86/common/xf86platformBus.c
++++ b/hw/xfree86/common/xf86platformBus.c
+@@ -48,6 +48,7 @@
+ #include "Pci.h"
+ #include "xf86platformBus.h"
+ #include "xf86Config.h"
++#include "xf86Crtc.h"
+
+ #include "randrstr.h"
+ int platformSlotClaimed;
+@@ -579,6 +580,9 @@ xf86platformAddDevice(int index)
}
/* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
-+ xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
++ if (xf86Info.autoBindGPU)
++ RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
++ xf86ScrnToScreen(xf86Screens[0]));
RRResourcesChanged(xf86Screens[0]->pScreen);
RRTellChanged(xf86Screens[0]->pScreen);
---- a/hw/xfree86/modes/xf86Crtc.c
-+++ b/hw/xfree86/modes/xf86Crtc.c
-@@ -3462,3 +3462,35 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn)
- crtc->x = crtc->y = 0;
- }
- }
+diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man
+index def9bfc..8df6b7d 100644
+--- a/hw/xfree86/man/Xorg.man
++++ b/hw/xfree86/man/Xorg.man
+@@ -283,6 +283,13 @@ is a comma separated list of directories to search for
+ server modules. This option is only available when the server is run
+ as root (i.e, with real-uid 0).
+ .TP 8
++.B \-noautoBindGPU
++Disable automatically setting secondary GPUs up as output sinks and offload
++sources. This is equivalent to setting the
++.B AutoBindGPU
++xorg.conf(__filemansuffix__) file option. To
++.B false.
++.TP 8
+ .B \-nosilk
+ Disable Silken Mouse support.
+ .TP 8
+diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
+index 7d0c524..3e596e4 100644
+--- a/hw/xfree86/man/xorg.conf.man
++++ b/hw/xfree86/man/xorg.conf.man
+@@ -673,6 +673,12 @@ Enabled by default.
+ If this option is disabled, then no GPU devices will be added from the udev
+ backend. Enabled by default. (May need to be disabled to setup Xinerama).
+ .TP 7
++.BI "Option \*qAutoBindGPU\*q \*q" boolean \*q
++If enabled then secondary GPUs will be automatically set up as output-sinks and
++offload-sources. Making e.g. laptop outputs connected only to the secondary
++GPU directly available for use without needing to run
++"xrandr --setprovideroutputsource". Enabled by default.
++.TP 7
+ .BI "Option \*qLog\*q \*q" string \*q
+ This option controls whether the log is flushed and/or synced to disk after
+ each message.
+diff --git a/randr/randrstr.h b/randr/randrstr.h
+index 706e9a7..66999d5 100644
+--- a/randr/randrstr.h
++++ b/randr/randrstr.h
+@@ -976,6 +976,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
+ extern _X_EXPORT void
+ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+
++extern _X_EXPORT void
++RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen);
+
+ /* rrproviderproperty.c */
+
+ extern _X_EXPORT void
+diff --git a/randr/rrprovider.c b/randr/rrprovider.c
+index f9df67e..abc5685 100644
+--- a/randr/rrprovider.c
++++ b/randr/rrprovider.c
+@@ -482,3 +482,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
+
+ WriteEventsToClient(client, 1, (xEvent *) &pe);
+ }
+
-+void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master)
++void
++RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen)
+{
-+ RRProviderPtr master_provider;
-+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(master);
-+ xf86CrtcConfigPtr slave_config = XF86_CRTC_CONFIG_PTR(pScrn);
-+ Bool unbound = FALSE;
++ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
++ rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen);
++ RRProviderPtr provider = pScrPriv->provider;
++ RRProviderPtr master_provider = masterPriv->provider;
+
-+ if (!config || !slave_config)
++ if (!provider || !master_provider)
+ return;
+
-+ master_provider = config->randr_provider;
-+
-+ if ((master->capabilities & RR_Capability_SinkOffload) &&
-+ pScrn->capabilities & RR_Capability_SourceOffload) {
-+ /* source offload */
-+
-+ DetachUnboundGPU(pScrn->pScreen);
-+ unbound = TRUE;
-+ AttachOffloadGPU(master->pScreen, pScrn->pScreen);
-+ slave_config->randr_provider->offload_sink = master_provider;
-+ }
-+ if ((master->capabilities & RR_Capability_SourceOutput) &&
-+ pScrn->capabilities & RR_Capability_SinkOutput) {
-+ /* sink offload */
-+ if (!unbound)
-+ DetachUnboundGPU(pScrn->pScreen);
-+ AttachOutputGPU(master->pScreen, pScrn->pScreen);
-+ slave_config->randr_provider->output_source = master_provider;
++ if ((provider->capabilities & RR_Capability_SinkOutput) &&
++ (master_provider->capabilities & RR_Capability_SourceOutput)) {
++ pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider);
++ RRInitPrimeSyncProps(pScreen);
+ }
++
++ if ((provider->capabilities & RR_Capability_SourceOffload) &&
++ (master_provider->capabilities & RR_Capability_SinkOffload))
++ pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider);
+}
+--
+2.9.3
+
commit b5485e32b1651b42911a5de8fe47bee890500938
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Wed Mar 15 20:53:48 2017 +0100
Release to unstable
diff --git a/debian/changelog b/debian/changelog
index 1d204ca..4414ff8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xorg-server (2:1.19.3-1) UNRELEASED; urgency=medium
+xorg-server (2:1.19.3-1) unstable; urgency=medium
* New upstream release.
- -- Emilio Pozuelo Monfort <pochu@debian.org> Wed, 15 Mar 2017 20:23:26 +0100
+ -- Emilio Pozuelo Monfort <pochu@debian.org> Wed, 15 Mar 2017 20:53:42 +0100
xorg-server (2:1.19.2-1) unstable; urgency=medium
commit a958fe0d10e2041bcd1602f0a28a1712148e0b40
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Wed Mar 15 20:23:39 2017 +0100
Reply to: