summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-02-24 21:01:29 +0100
committerLars-Peter Clausen <lars@metafoo.de>2009-02-24 21:01:29 +0100
commit703acea131caf72e71f04a0ad40f540fe236be89 (patch)
treecd6929d83e24981d7b2d56fe39e886a4de263878
parent3e3c32309cf6d9045d821da52b7547831d819b31 (diff)
Mark the mode of the framebuffer which was set before the xserver was started as
preferred.
-rw-r--r--src/glamo-output.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glamo-output.c b/src/glamo-output.c
index 2d63a47..57ce7c2 100644
--- a/src/glamo-output.c
+++ b/src/glamo-output.c
@@ -174,8 +174,10 @@ GlamoOutputInit(ScrnInfoPtr pScrn) {
ConvertModeFbToXfree(&pGlamo->fb_var, mode, NULL);
xf86SetModeDefaultName(mode);
+ mode->type = M_T_PREFERRED | M_T_DRIVER;
pGlamoOutput->modes = xf86ModesAdd(pGlamoOutput->modes, mode);
+
/* This is a really really dirty hack. It assumes a configuration like on
* the freerunner. It would be much better if there was a way to query the
* framebuffer driver for all valid modes. */
@@ -183,6 +185,7 @@ GlamoOutputInit(ScrnInfoPtr pScrn) {
if (!mode)
return;
+
if (mode->VDisplay <= 320) {
mode->HSyncStart = mode->HDisplay * 2 + (mode->HDisplay - mode->HSyncStart);
mode->HSyncEnd = mode->HDisplay * 2 + (mode->HDisplay - mode->HSyncEnd);
@@ -205,6 +208,8 @@ GlamoOutputInit(ScrnInfoPtr pScrn) {
xf86SetModeCrtc(mode, 0);
xf86SetModeDefaultName(mode);
+ mode->type = M_T_DRIVER;
+
pGlamoOutput->modes = xf86ModesAdd(pGlamoOutput->modes, mode);
}