debian/changelog | 9 + debian/patches/include-GPU-screens-in-DPMS-code.patch | 105 ++++++++++++++++++ debian/patches/series | 2 debian/patches/xf86-detach-scanout.patch | 75 ++++++++++++ 4 files changed, 191 insertions(+)
New commits: commit f344d7f45c484e6c981d16b01e55640a5e2d932b Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue May 28 16:12:25 2013 +0200 release to saucy diff --git a/debian/changelog b/debian/changelog index 2d91807..ef81dab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -xorg-server (2:1.13.3-0ubuntu10) UNRELEASED; urgency=low +xorg-server (2:1.13.3-0ubuntu10) saucy; urgency=low * Add patch to fix DPMS. (LP: #1184999) - include-GPU-screens-in-DPMS-code.patch * Add patch to fix crash on hybrid systems during shutdown. (LP: #1185035) - xf86-detach-scanout.patch - -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 28 May 2013 14:22:10 +0200 + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 28 May 2013 16:12:12 +0200 xorg-server (2:1.13.3-0ubuntu9) saucy; urgency=low commit 3e610cc3d7c949f5db83ce529c35ad1fbeb98cb3 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue May 28 15:47:07 2013 +0200 Add patch to fix DPMS. (LP: #1184999) * Add patch to fix DPMS. (LP: #1184999) - include-GPU-screens-in-DPMS-code.patch * Add patch to fix crash on hybrid systems during shutdown. (LP: #1185035) - xf86-detach-scanout.patch diff --git a/debian/changelog b/debian/changelog index 7694365..2d91807 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +xorg-server (2:1.13.3-0ubuntu10) UNRELEASED; urgency=low + + * Add patch to fix DPMS. (LP: #1184999) + - include-GPU-screens-in-DPMS-code.patch + * Add patch to fix crash on hybrid systems during shutdown. (LP: #1185035) + - xf86-detach-scanout.patch + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 28 May 2013 14:22:10 +0200 + xorg-server (2:1.13.3-0ubuntu9) saucy; urgency=low * Cherry-pick patch from 1.14 to fix DRI1 regression. (LP: #1083032) diff --git a/debian/patches/include-GPU-screens-in-DPMS-code.patch b/debian/patches/include-GPU-screens-in-DPMS-code.patch new file mode 100644 index 0000000..d3439ea --- /dev/null +++ b/debian/patches/include-GPU-screens-in-DPMS-code.patch @@ -0,0 +1,105 @@ +From 6238bd68bd71323f8b4f1808f34dabe2ae447fe3 Mon Sep 17 00:00:00 2001 +From: Aaron Plattner <aplatt...@nvidia.com> +Date: Tue, 5 Mar 2013 13:04:46 -0800 +Subject: [PATCH] DPMS: include GPU screens in DPMS code + +Otherwise, displays driven by GPU screens remain on all the time. + +Signed-off-by: Aaron Plattner <aplatt...@nvidia.com> +Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> +Signed-off-by: Keith Packard <kei...@keithp.com> +--- + hw/xfree86/common/xf86DPMS.c | 45 ++++++++++++++++++++++++++++++-------------- + 1 file changed, 31 insertions(+), 14 deletions(-) + +diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c +index ef4a2c1..3f1e142 100644 +--- a/hw/xfree86/common/xf86DPMS.c ++++ b/hw/xfree86/common/xf86DPMS.c +@@ -130,6 +130,19 @@ DPMSClose(ScreenPtr pScreen) + return pScreen->CloseScreen(pScreen); + } + ++static void ++DPMSSetScreen(ScrnInfoPtr pScrn, int level) ++{ ++ ScreenPtr pScreen = xf86ScrnToScreen(pScrn); ++ DPMSPtr pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); ++ ++ if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { ++ xf86VGAarbiterLock(pScrn); ++ pScrn->DPMSSet(pScrn, level, 0); ++ xf86VGAarbiterUnlock(pScrn); ++ } ++} ++ + /* + * DPMSSet -- + * Device dependent DPMS mode setting hook. This is called whenever +@@ -139,8 +152,6 @@ int + DPMSSet(ClientPtr client, int level) + { + int rc, i; +- DPMSPtr pDPMS; +- ScrnInfoPtr pScrn; + + DPMSPowerLevel = level; + +@@ -155,17 +166,23 @@ DPMSSet(ClientPtr client, int level) + + /* For each screen, set the DPMS level */ + for (i = 0; i < xf86NumScreens; i++) { +- pScrn = xf86Screens[i]; +- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); +- if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { +- xf86VGAarbiterLock(pScrn); +- pScrn->DPMSSet(pScrn, level, 0); +- xf86VGAarbiterUnlock(pScrn); +- } ++ DPMSSetScreen(xf86Screens[i], level); ++ } ++ for (i = 0; i < xf86NumGPUScreens; i++) { ++ DPMSSetScreen(xf86GPUScreens[i], level); + } + return Success; + } + ++static Bool ++DPMSSupportedOnScreen(ScrnInfoPtr pScrn) ++{ ++ ScreenPtr pScreen = xf86ScrnToScreen(pScrn); ++ DPMSPtr pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); ++ ++ return pDPMS && pScrn->DPMSSet; ++} ++ + /* + * DPMSSupported -- + * Return TRUE if any screen supports DPMS. +@@ -174,8 +191,6 @@ Bool + DPMSSupported(void) + { + int i; +- DPMSPtr pDPMS; +- ScrnInfoPtr pScrn; + + if (DPMSKey == NULL) { + return FALSE; +@@ -183,9 +198,11 @@ DPMSSupported(void) + + /* For each screen, check if DPMS is supported */ + for (i = 0; i < xf86NumScreens; i++) { +- pScrn = xf86Screens[i]; +- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); +- if (pDPMS && pScrn->DPMSSet) ++ if (DPMSSupportedOnScreen(xf86Screens[i])) ++ return TRUE; ++ } ++ for (i = 0; i < xf86NumGPUScreens; i++) { ++ if (DPMSSupportedOnScreen(xf86GPUScreens[i])) + return TRUE; + } + return FALSE; +-- +1.8.3 + diff --git a/debian/patches/series b/debian/patches/series index 7cc09b9..4290015 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -40,6 +40,7 @@ xf86-dont-enable-gpuscreens.patch ## upstream patches os-use-libunwind-to-generate-backtraces.patch dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch +include-GPU-screens-in-DPMS-code.patch # hybrid graphics fixes for xserver 1.13 228_autobind_gpu.patch @@ -56,3 +57,4 @@ autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch config-add-no-removal.patch CVE-2013-1940.patch include-selection-h.patch +xf86-detach-scanout.patch diff --git a/debian/patches/xf86-detach-scanout.patch b/debian/patches/xf86-detach-scanout.patch new file mode 100644 index 0000000..e25bd48 --- /dev/null +++ b/debian/patches/xf86-detach-scanout.patch @@ -0,0 +1,75 @@ +From: Aaron Plattner <aplatt...@nvidia.com> +To: <xorg-de...@lists.x.org> +Subject: [PATCH] xfree86: detach scanout pixmaps when detaching output GPUs +Date: Tue, 30 Apr 2013 14:14:23 -0700 + +Commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 fixed a bit of a +chicken-and-egg problem by detaching GPU screens when their providers +are destroyed, which happens before CloseScreen is called. However, +this created a new problem: the GPU screen tears down its RandR crtc +objects during CloseScreen and if one of them is active, it tries to +detach the scanout pixmap then. This crashes because +RRCrtcDetachScanoutPixmap tries to get the master screen's screen +pixmap, but crtc->pScreen->current_master is already NULL at that +point. + +It doesn't make sense for an unbound GPU screen to still be scanning +out its former master screen's pixmap, so detach them first when the +provider is destroyed. + +Signed-off-by: Aaron Plattner <aplatt...@nvidia.com> +--- +Dave, does this seem like a reasonable way to work around this particular crash? + + hw/xfree86/modes/xf86RandR12.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +--- a/hw/xfree86/modes/xf86RandR12.c ++++ b/hw/xfree86/modes/xf86RandR12.c +@@ -1770,6 +1770,19 @@ + return RRGetInfo(pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */ + } + ++static void ++xf86DetachOutputGPU(ScreenPtr pScreen) ++{ ++ rrScrPrivPtr rp = rrGetScrPriv(pScreen); ++ int i; ++ ++ /* make sure there are no attached shared scanout pixmaps first */ ++ for (i = 0; i < rp->numCrtcs; i++) ++ RRCrtcDetachScanoutPixmap(rp->crtcs[i]); ++ ++ DetachOutputGPU(pScreen); ++} ++ + static Bool + xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen, + RRProviderPtr provider, +@@ -1779,7 +1792,7 @@ + if (provider->output_source) { + ScreenPtr cmScreen = pScreen->current_master; + +- DetachOutputGPU(pScreen); ++ xf86DetachOutputGPU(pScreen); + AttachUnboundGPU(cmScreen, pScreen); + } + provider->output_source = NULL; +@@ -1807,7 +1820,7 @@ + if (!sink_provider) { + if (provider->offload_sink) { + ScreenPtr cmScreen = pScreen->current_master; +- DetachOutputGPU(pScreen); ++ xf86DetachOutputGPU(pScreen); + AttachUnboundGPU(cmScreen, pScreen); + } + +@@ -1900,7 +1913,7 @@ + detached = TRUE; + } + if (config->randr_provider->output_source) { +- DetachOutputGPU(screen); ++ xf86DetachOutputGPU(screen); + config->randr_provider->output_source = NULL; + RRSetChanged(screen); + detached = TRUE; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1uiizk-0001st...@vasks.debian.org