From 60d716b53993b08a2a00c22f523c575e62e0a18d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 27 Jun 2013 14:11:00 +0100 Subject: sna: Add the probed CRTC mode to the list of output modes Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 4bad2ea2..0b40fb2c 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3082,6 +3082,8 @@ static bool sna_probe_initial_configuration(struct sna *sna) xf86CrtcPtr crtc = config->crtc[j]; if (to_sna_crtc(crtc)->id == enc.crtc_id) { if (crtc->desiredMode.status == MODE_OK) { + DisplayModePtr M; + xf86DrvMsg(scrn->scrnIndex, X_INFO, "Output %s using initial mode %s on pipe %d\n", output->name, @@ -3096,6 +3098,14 @@ static bool sna_probe_initial_configuration(struct sna *sna) output->mm_height = (crtc->desiredMode.VDisplay * 254) / (10*DEFAULT_DPI); output->mm_width = (crtc->desiredMode.HDisplay * 254) / (10*DEFAULT_DPI); } + + M = calloc(1, sizeof(DisplayModeRec)); + if (M) { + *M = crtc->desiredMode; + M->name = strdup(M->name); + output->probed_modes = + xf86ModesAdd(output->probed_modes, M); + } } break; } -- cgit v1.2.3