diff options
author | Keith Packard <keithp@keithp.com> | 2008-05-04 22:24:56 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-05-04 22:24:56 -0700 |
commit | 33e5a176e62a0114cb8cca9447798c6d6b6665ed (patch) | |
tree | 8efa34606aae171fe1bad7aff993a2a94910d76e /hw/kdrive/fbdev/fbdev.c | |
parent | e48f6bcd94b310e5c79939bdb1703f9555a3cdd1 (diff) | |
parent | efa65a0317e12c9ad34fa00fe90bf5eae9fa2670 (diff) |
Merge commit 'origin/master' into transform-proposal-oldtransform-proposal
Conflicts:
configure.ac
exa/exa.c
Diffstat (limited to 'hw/kdrive/fbdev/fbdev.c')
-rw-r--r-- | hw/kdrive/fbdev/fbdev.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 177be0bdc..7721e608a 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -179,16 +179,24 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv) screen->rate = 103; /* FIXME: should get proper value from fb driver */ } if (!screen->fb[0].depth) - screen->fb[0].depth = 16; - - t = KdFindMode (screen, fbdevModeSupported); - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; + { + if (k >= 0) + screen->fb[0].depth = var.bits_per_pixel; + else + screen->fb[0].depth = 16; + } - /* Now try setting the mode */ - if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres)) - fbdevConvertMonitorTiming (t, &var); + if ((screen->width != var.xres) || (screen->height != var.yres)) + { + t = KdFindMode (screen, fbdevModeSupported); + screen->rate = t->rate; + screen->width = t->horizontal; + screen->height = t->vertical; + + /* Now try setting the mode */ + if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres)) + fbdevConvertMonitorTiming (t, &var); + } var.activate = FB_ACTIVATE_NOW; var.bits_per_pixel = screen->fb[0].depth; |