sna: Check that we successfully install the required hosting midlayer

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-08-14 08:38:52 +01:00
parent 3d818c0a36
commit 394978867e
1 changed files with 7 additions and 0 deletions

View File

@ -430,6 +430,13 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
goto cleanup;
}
/* Sanity check */
if (hosted() && (sna->flags & SNA_IS_HOSTED) == 0) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to setup hosted device.\n");
goto cleanup;
}
preferred_depth = sna->info->gen < 030 ? 15 : 24;
if (!fb_supports_depth(fd, preferred_depth))
preferred_depth = 24;