summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-06-27 14:11:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-06-27 14:11:00 +0100
commit60d716b53993b08a2a00c22f523c575e62e0a18d (patch)
tree2a87678a7ef35b55945b40194d7814185ecb64fe
parent263e87d5e1915e6c40fa8bc1b325a36f21f92b30 (diff)
sna: Add the probed CRTC mode to the list of output modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c10
1 files changed, 10 insertions, 0 deletions
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;
}