From 3853c3020d05175ae180b9a188dec7c425bdd0b8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 28 Nov 2011 18:38:30 +0000 Subject: fixup xinerama since 9151f3b1c2ebcc34e63195888ba696f2183ba5e2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since the driver would call RRFirstOutput without checking if randr has been enabled, and it would crash in privates code. reported by vereteran on #radeon Signed-off-by: Dave Airlie Acked-on-irc-by: Michel Dänzer --- src/radeon_video.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/radeon_video.c b/src/radeon_video.c index 834f9246..0e2c1275 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -142,7 +142,7 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn, xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int coverage, best_coverage, c; BoxRec box, crtc_box, cover_box; - RROutputPtr primary_output; + RROutputPtr primary_output = NULL; xf86CrtcPtr best_crtc = NULL, primary_crtc = NULL; box.x1 = x1; @@ -152,7 +152,9 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn, best_coverage = 0; /* Prefer the CRTC of the primary output */ - primary_output = RRFirstOutput(pScrn->pScreen); + if (dixPrivateKeyRegistered(rrPrivKey)) { + primary_output = RRFirstOutput(pScrn->pScreen); + } if (primary_output && primary_output->crtc) primary_crtc = primary_output->crtc->devPrivate; -- cgit v1.2.3