summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-11-28 18:38:30 +0000
committerDave Airlie <airlied@redhat.com>2011-11-28 18:38:30 +0000
commit3853c3020d05175ae180b9a188dec7c425bdd0b8 (patch)
treef2d51a091143550643695e2c0e0d3cbf9f28952d
parentd669c34f140c000f88c4b4e464e44e6c8694f581 (diff)
fixup xinerama since 9151f3b1c2ebcc34e63195888ba696f2183ba5e2
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 <airlied@redhat.com> Acked-on-irc-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r--src/radeon_video.c6
1 files 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;