From c5651254c3c152daf1ed79073779c1bed6ed0a9b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 26 Jun 2013 14:18:49 +0100 Subject: sna: Fallback to xf86InitialConfiguration if nothing is connected Use the default mechanism for picking a fallback output and mode if nothing is connected at X startup. Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 8c8d8444..c7d46718 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3086,6 +3086,9 @@ static bool sna_probe_initial_configuration(struct sna *sna) height = h; } + if (!width || !height) + return false; + scrn->display->frameX0 = 0; scrn->display->frameY0 = 0; scrn->display->virtualX = width; @@ -3095,7 +3098,7 @@ static bool sna_probe_initial_configuration(struct sna *sna) scrn->virtualY = height; xf86SetScrnInfoModes(sna->scrn); - return true; + return scrn->modes != NULL; } bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna) -- cgit v1.2.3