summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-12-14 11:05:20 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-12-26 09:30:35 +1000
commit0f71be87b9174c587ccacd6aa61a9a66d3507ef4 (patch)
tree6048cc4a65a0884482f2f1a0714733fb4188aaed
parentb98a07d86dab5b6c5d524d36814fda8e9549120c (diff)
xfree86: belately init RandR12 if xinerama fails. (#24627)
On Fri, Dec 11, 2009 at 10:19:01AM -0800, Keith Packard wrote: > On Wed, 9 Dec 2009 11:55:14 +1000, Peter Hutterer <peter.hutterer@who-t.net> wrote: > > On Tue, Dec 08, 2009 at 05:24:06PM -0800, Aaron Plattner wrote: > > > On Tue, Dec 08, 2009 at 03:52:27PM -0800, Peter Hutterer wrote: > > > > Xorg +xinerama crashes immediately due to whacky dependency between Xinerama > > > > and RandR12. The latter doesn't initialize if Xinerama is enabled, but if > > > > only one screen is found, Xinerama is disabled again and RandR12 tries to > > > > access data it never initialized. > > I'd sure like to have RandR get enabled when xinerama doesn't; is there > an easy way of making that happen here? Perhaps having the RandR12 code > disable Xinerama when only one screen is found? Or some other kludge? you know the dependency better than I do so any hints are apreciated. afaict, the screenInfo.numScreens (the check used by Xinerama) isn't necessarily initialized at this point so we can't use the same check. The following seems to work though: From 670b3ebdb7312a6433a8f093d0820785db2aea20 Mon Sep 17 00:00:00 2001 From: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon, 14 Dec 2009 11:00:58 +1000 Subject: [PATCH] xfree86: if only one screen was found, disable Xinerama (#24627) Xorg +xinerama crashes immediately due to whacky dependency between Xinerama and RandR12. The latter doesn't initialize if Xinerama is enabled, but if only one screen is found, Xinerama is disabled again and RandR12 tries to access data it never initialized. Dependency chain is: - ProcessCommandLine sets noPanoramiXExtension to FALSE - xf86RandR12Init() is a noop - PanoramiXExtensionInit sets noPanoramiXExtension to TRUE - xf86RandR12CreateScreenResources tries to use the devPrivates key it never initialized. This hack checks if there's only one screen at the time RandR12 is initialized. If so, we expect Xinerama to fail anyhow so we disable it ourselves and proceed as planned. X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit faca1bc582e374d32ee9d63d10e072fbef4940a3)
-rw-r--r--hw/xfree86/modes/xf86RandR12.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 6ea9d26b6..1fc63c4dc 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -871,7 +871,12 @@ xf86RandR12Init (ScreenPtr pScreen)
#ifdef PANORAMIX
/* XXX disable RandR when using Xinerama */
if (!noPanoramiXExtension)
- return TRUE;
+ {
+ if (xf86NumScreens == 1)
+ noPanoramiXExtension = TRUE;
+ else
+ return TRUE;
+ }
#endif
if (xf86RandR12Generation != serverGeneration)