summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-05-30 12:09:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-05-30 13:08:10 +0100
commita9acc8dbb436e1e523e7d7c0f3c41946a2d0f245 (patch)
treed3e7eefeda1fbad8365dd80d83ea9c1431dbccae /src/sna/sna_driver.c
parentf4fcb0e7d24a104afb642dd8819e67ffcaafbfb1 (diff)
sna: Cleanup up error reporting after failure to init KMS interface
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.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index b69083eb..b48ab30d 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -636,23 +636,14 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
"Tiling disabled, expect poor performance and increased power consumption.\n");
if (!sna_mode_pre_init(scrn, sna)) {
- PreInitCleanup(scrn);
- return FALSE;
- }
-
- if (!xf86SetGamma(scrn, zeros)) {
- PreInitCleanup(scrn);
- return FALSE;
- }
-
- if (scrn->modes == NULL) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR, "No modes.\n");
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "No outputs and no modes.\n");
PreInitCleanup(scrn);
return FALSE;
}
scrn->currentMode = scrn->modes;
- /* Set display resolution */
+ xf86SetGamma(scrn, zeros);
xf86SetDpi(scrn, 0, 0);
sna->dri_available = false;