From 394978867edf3746c285491db6be41abfe325d87 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 14 Aug 2013 08:38:52 +0100 Subject: sna: Check that we successfully install the required hosting midlayer Signed-off-by: Chris Wilson --- src/sna/sna_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sna/sna_driver.c') diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index c27deb6f..83a5bba5 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -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; -- cgit v1.2.3