summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-07 09:10:32 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-07 09:10:32 +0000
commit2aacfbaa5143568906e88e489c72f4ebf065a4ec (patch)
tree75f02161c884f63fa00a3833f36ce94687208607
parentb84db39edb6ebce965c1354dc5994bf0a70cea92 (diff)
sna: Return early if there are no outputs to setup
Instead of reporting failure, just try to run headless. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 27684245..30160a5d 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2642,14 +2642,11 @@ bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna)
list_init(&mode->crtcs);
list_init(&mode->outputs);
- xf86CrtcConfigInit(scrn, &sna_crtc_config_funcs);
-
mode->kmode = drmModeGetResources(sna->kgem.fd);
- if (!mode->kmode) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR,
- "failed to get resources: %s\n", strerror(errno));
- return false;
- }
+ if (!mode->kmode)
+ return true;
+
+ xf86CrtcConfigInit(scrn, &sna_crtc_config_funcs);
set_size_range(sna);