summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-23 13:27:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-23 13:27:07 +0100
commit5ae032e22b127c7c95753197e0914a8028a3b22e (patch)
tree12e47275e0d93016d400d9c77f2f82ce56457fb3 /src/sna/sna_driver.c
parent34882a979d9817d33bd6a8ae73a9f7083556578c (diff)
sna: Suppress modesetting errors on return from VT switch
If we presume that userspace will set the correct mode shortly afterwards, we can ignore the failure of the automatic restore. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 2e816402..d4b7eb01 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -571,13 +571,6 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
return sna_accel_pre_init(sna);
}
-/**
- * Intialiazes the hardware for the 3D pipeline use in the 2D driver.
- *
- * Some state caching is performed to avoid redundant state emits. This
- * function is also responsible for marking the state as clobbered for DRI
- * clients.
- */
static void
sna_block_handler(int i, pointer data, pointer timeout, pointer read_mask)
{
@@ -981,12 +974,17 @@ static Bool sna_enter_vt(int scrnIndex, int flags)
DBG(("%s\n", __FUNCTION__));
if (drmSetMaster(sna->kgem.fd)) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"drmSetMaster failed: %s\n",
strerror(errno));
+ return FALSE;
}
- return xf86SetDesiredModes(scrn);
+ if (!xf86SetDesiredModes(scrn))
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "failed to restore desired modes on VT switch\n");
+
+ return TRUE;
}
static Bool sna_switch_mode(int scrnIndex, DisplayModePtr mode, int flags)