xserver/hw/kdrive/fbdev fbdev.c,1.48,1.49
Phil Blundell
xserver-commit at pdx.freedesktop.org
Tue Sep 14 23:08:12 UTC 2004
Committed by: pb
Update of /cvs/xserver/xserver/hw/kdrive/fbdev
In directory gabe:/tmp/cvs-serv13372/hw/kdrive/fbdev
Modified Files:
fbdev.c
Log Message:
2004-09-14 Phil Blundell <pb at nexus.co.uk>
* hw/kdrive/fbdev/fbdev.c (fbdevScreenInitialize): Only set
screen
parameters if resolution has changed from current values. Patch
from scoony at noos.fr.
Index: fbdev.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/fbdev/fbdev.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- fbdev.c 26 Jul 2004 17:14:26 -0000 1.48
+++ fbdev.c 14 Sep 2004 23:08:10 -0000 1.49
@@ -156,10 +156,13 @@
struct fb_var_screeninfo var;
const KdMonitorTiming *t;
int k;
+
+ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
if (!screen->width || !screen->height)
{
- if (ioctl (priv->fd, FBIOGET_VSCREENINFO, &var) >= 0) {
+ if (k >= 0)
+ {
screen->width = var.xres;
screen->height = var.yres;
}
@@ -179,7 +182,8 @@
screen->height = t->vertical;
/* Now try setting the mode */
- fbdevConvertMonitorTiming (t, &var);
+ 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;
More information about the xserver-commit
mailing list