debian/changelog | 38 +++++++++++++++ debian/patches/include-selection-h.patch | 12 ++++ debian/patches/series | 5 +- debian/patches/xf86-detach-scanout.patch | 75 +++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 2 deletions(-)
New commits: commit 29d0c055a5b29e026d88d64b2cc1d9be2d32c873 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue May 28 16:19:24 2013 +0200 release to staging ppa diff --git a/debian/changelog b/debian/changelog index 4a1ee40..51c42f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +xorg-server (2:1.14.1-0ubuntu0.4) raring; urgency=low + + * Add patch to fix crash on hybrid systems during shutdown. (LP: #1185035) + - xf86-detach-scanout.patch + * Add patch to fix build error on saucy. + - include-selection-h.patch + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Tue, 28 May 2013 16:13:24 +0200 + xorg-server (2:1.14.1-0ubuntu0.3) raring; urgency=low * Add patch to fixup optimus again. diff --git a/debian/patches/include-GPU-screens-in-DPMS-code.patch b/debian/patches/include-GPU-screens-in-DPMS-code.patch deleted file mode 100644 index d3439ea..0000000 --- a/debian/patches/include-GPU-screens-in-DPMS-code.patch +++ /dev/null @@ -1,105 +0,0 @@ -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 - commit 116960c67a1edeacc1e3ff793d01f0e68895860b Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Tue May 28 16:12:25 2013 +0200 Cherry-pick "release to saucy" from ubuntu 1.13 branch. (cherry picked from commit f344d7f45c484e6c981d16b01e55640a5e2d932b) diff --git a/debian/changelog b/debian/changelog index ed98cc4..4a1ee40 100644 --- a/debian/changelog +++ b/debian/changelog @@ -60,14 +60,14 @@ xorg-server (2:1.14.1-1) UNRELEASED; urgency=low -- Robert Hooker <sarv...@ubuntu.com> Wed, 22 Aug 2012 11:12:17 -0400 -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; commit beeca7cf09872350afcf81c2263e91e8bab5f060 Author: Tormod Volden <debian.tor...@gmail.com> Date: Mon May 13 09:38:04 2013 +0200 Cherry-pick patch from 1.14 to fix DRI1 regression. (LP: #1083032) - dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch diff --git a/debian/changelog b/debian/changelog index 96072ac..7694365 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xorg-server (2:1.13.3-0ubuntu9) saucy; urgency=low + + * Cherry-pick patch from 1.14 to fix DRI1 regression. (LP: #1083032) + - dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch + + -- Tormod Volden <debian.tor...@gmail.com> Sun, 12 May 2013 11:30:46 +0200 + xorg-server (2:1.13.3-0ubuntu8) saucy; urgency=low * Fixup build error on saucy. diff --git a/debian/patches/dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch b/debian/patches/dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch new file mode 100644 index 0000000..81a156f --- /dev/null +++ b/debian/patches/dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch @@ -0,0 +1,52 @@ +From 785af88ab0120036e0ce3d0139f3c560ff71e10b Mon Sep 17 00:00:00 2001 +From: Dave Airlie <airl...@redhat.com> +Date: Wed, 26 Sep 2012 16:16:40 +1000 +Subject: [PATCH] dri1: fix dri1 startup since + 459c6da0f907ba33d733c7e62a116184ba2f14e5 + +This commit regresses dri1 since it moves the drmSetServerInfo from being +called at module load time to extension init time. However DRIScreenInit +relies on this being called before it gets control. + +This patches moves the call into DRIScreenInit and seems to work here. + +Signed-off-by: Dave Airlie <airl...@redhat.com> +--- + hw/xfree86/dri/dri.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c +index 398178e..6292e87 100644 +--- a/hw/xfree86/dri/dri.c ++++ b/hw/xfree86/dri/dri.c +@@ -320,6 +320,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + DRIContextFlags flags = 0; + DRIContextPrivPtr pDRIContextPriv; ++ static Bool drm_server_inited; + + /* If the DRI extension is disabled, do not initialize the DRI */ + if (noXFree86DRIExtension) { +@@ -345,6 +346,10 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) + return FALSE; + } + #endif ++ if (drm_server_inited == FALSE) { ++ drmSetServerInfo(&DRIDRMServerInfo); ++ drm_server_inited = TRUE; ++ } + + if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize, + pDRIInfo->busIdString, pDRIInfo->drmDriverName)) +@@ -791,8 +796,6 @@ DRIExtensionInit(void) + + RegisterBlockAndWakeupHandlers(DRIBlockHandler, DRIWakeupHandler, NULL); + +- drmSetServerInfo(&DRIDRMServerInfo); +- + return TRUE; + } + +-- +1.7.10.4 + diff --git a/debian/patches/series b/debian/patches/series index 86df27f..7cc09b9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -39,6 +39,7 @@ xf86-dont-enable-gpuscreens.patch 500_pointer_barrier_thresholds.diff ## upstream patches os-use-libunwind-to-generate-backtraces.patch +dri1-fix-dri1-startup-since-459c6da0f907ba33d733c7e6.patch # hybrid graphics fixes for xserver 1.13 228_autobind_gpu.patch commit 7213e91a6791210c7380adebf72224b1d1aeb439 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed May 8 14:05:15 2013 +0200 release to saucy diff --git a/debian/changelog b/debian/changelog index 0dd047d..96072ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xorg-server (2:1.13.3-0ubuntu8) saucy; urgency=low + + * Fixup build error on saucy. + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Wed, 08 May 2013 14:02:12 +0200 + xorg-server (2:1.13.3-0ubuntu7) saucy; urgency=low * Add patch to fixup optimus again. diff --git a/debian/patches/include-selection-h.patch b/debian/patches/include-selection-h.patch new file mode 100644 index 0000000..e145c36 --- /dev/null +++ b/debian/patches/include-selection-h.patch @@ -0,0 +1,12 @@ +diff --git a/dix/window.c b/dix/window.c +index 49ef4a0..5b87238 100644 +--- a/dix/window.c ++++ b/dix/window.c +@@ -110,6 +110,7 @@ Equipment Corporation. + #include "input.h" + #include "inputstr.h" + #include "resource.h" ++#include "selection.h" + #include "colormapst.h" + #include "cursorstr.h" + #include "dixstruct.h" diff --git a/debian/patches/series b/debian/patches/series index 9af5361..86df27f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -54,3 +54,4 @@ 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 +include-selection-h.patch commit 73f1016acdd805e2a71af6f3add911355d0842a6 Author: Maarten Lankhorst <maarten.lankho...@canonical.com> Date: Wed May 1 09:41:48 2013 +0200 Add patch to fixup optimus again, and release to saucy. diff --git a/debian/changelog b/debian/changelog index 97c7ad9..0dd047d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xorg-server (2:1.13.3-0ubuntu7) saucy; urgency=low + + * Add patch to fixup optimus again. + - xf86-dont-enable-gpuscreens.patch + + -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Wed, 01 May 2013 10:35:55 +0200 + xorg-server (2:1.13.3-0ubuntu6) raring; urgency=low * SECURITY UPDATE: input event leak via inactive VT diff --git a/debian/patches/series b/debian/patches/series index b207b1c..9af5361 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -34,9 +34,9 @@ xephyr-glx-register.patch no-nv.patch ## waiting for review by upstream +xf86-dont-enable-gpuscreens.patch 111_armel-drv-fallbacks.patch 500_pointer_barrier_thresholds.diff - ## upstream patches os-use-libunwind-to-generate-backtraces.patch diff --git a/debian/patches/xf86-dont-enable-gpuscreens.patch b/debian/patches/xf86-dont-enable-gpuscreens.patch new file mode 100644 index 0000000..64531ab --- /dev/null +++ b/debian/patches/xf86-dont-enable-gpuscreens.patch @@ -0,0 +1,64 @@ +From: Aaron Plattner <aplatt...@nvidia.com> +To: <xorg-de...@lists.x.org> +Subject: [PATCH] xfree86: don't enable anything in xf86InitialConfiguration + for GPU screens +Date: Tue, 30 Apr 2013 14:30:18 -0700 + +There's no point in turning on outputs connected to GPU screens during initial +configuration. Not only does this cause them to just display black, it also +confuses clients when these screens are attached to a master screen and RandR +reports that the outputs are already on. + +Also, don't print the warning about no outputs being found on GPU screens, +since that's expected. + +Signed-off-by: Aaron Plattner <aplatt...@nvidia.com> +--- +Dave, this fixes the black screen problem with "gpu: call CreateScreenResources +for GPU screens" + + hw/xfree86/modes/xf86Crtc.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index 4a490c6..35845e8 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -1997,6 +1997,14 @@ xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, + Bool any_enabled = FALSE; + int o; + ++ /* ++ * Don't bother enabling outputs on GPU screens: a client needs to attach ++ * it to a source provider before setting a mode that scans out a shared ++ * pixmap. ++ */ ++ if (scrn->is_gpu) ++ return FALSE; ++ + for (o = 0; o < config->num_output; o++) + any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE); + +@@ -2466,9 +2474,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow) + + ret = xf86CollectEnabledOutputs(scrn, config, enabled); + if (ret == FALSE && canGrow) { +- xf86DrvMsg(i, X_WARNING, +- "Unable to find connected outputs - setting %dx%d initial framebuffer\n", +- NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT); ++ if (!scrn->is_gpu) ++ xf86DrvMsg(i, X_WARNING, ++ "Unable to find connected outputs - setting %dx%d " ++ "initial framebuffer\n", ++ NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT); + have_outputs = FALSE; + } + else { +-- +1.8.2.2 + +_______________________________________________ +xorg-de...@lists.x.org: X.Org development +Archives: http://lists.x.org/archives/xorg-devel +Info: http://lists.x.org/mailman/listinfo/xorg-devel + -- 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-0001sl...@vasks.debian.org