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>
This commit is contained in:
Chris Wilson 2013-03-07 09:10:32 +00:00
parent b84db39edb
commit 2aacfbaa51
1 changed files with 4 additions and 7 deletions

View File

@ -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);