xserver: Branch 'master' - 3 commits
Ross Burton
ross at kemper.freedesktop.org
Tue Apr 22 09:07:58 PDT 2008
hw/kdrive/Makefile.am | 4 ++--
hw/kdrive/fbdev/fbdev.c | 26 +++++++++++++++++---------
hw/kdrive/linux/keyboard.c | 26 +++++++++++++++++++++++++-
3 files changed, 44 insertions(+), 12 deletions(-)
New commits:
commit e77f65768efbf05cdf363a2f41f036f74eaa45de
Author: Ross Burton <ross at burtonini.com>
Date: Tue Apr 22 18:07:46 2008 +0100
Reuse the existing framebuffer mode in kdrive/fbdev
When starting up kdrive/fbdev, if the current framebuffer mode is sensible use
that unless told otherwise.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 177be0b..7721e60 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;
commit c4fd1121531b0cba1a3e90fa747871d784365c7e
Author: Ross Burton <ross at burtonini.com>
Date: Tue Apr 22 18:05:53 2008 +0100
Add mediumraw support to the linux kdrive driver
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c
index 3193ab7..ae981b7 100644
--- a/hw/kdrive/linux/keyboard.c
+++ b/hw/kdrive/linux/keyboard.c
@@ -42,6 +42,8 @@
#include <sys/ioctl.h>
extern int LinuxConsoleFd;
+static unsigned char mediumraw_data, mediumraw_up;
+static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT;
static const KeySym linux_to_x[256] = {
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
@@ -701,7 +703,29 @@ LinuxKeyboardRead (int fd, void *closure)
else
#endif
scancode = b[0] & 0x7f;
- KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
+ /* This is extended medium raw mode interpreter
+ see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */
+ switch (mediumraw_state)
+ {
+ case DEFAULT:
+ if (scancode == 0)
+ {
+ mediumraw_state = EXTBYTE1;
+ mediumraw_up = b[0] & 0x80;
+ }
+ else
+ KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
+ break;
+ case EXTBYTE1:
+ mediumraw_data = scancode;
+ mediumraw_state = EXTBYTE2;
+ break;
+ case EXTBYTE2:
+ /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */
+ KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up);
+ mediumraw_state = DEFAULT;
+ break;
+ }
b++;
}
}
commit 455383db95618a05ebdbeae78423e08065f0e14e
Author: Ross Burton <ross at burtonini.com>
Date: Tue Apr 22 18:04:31 2008 +0100
Enable the epson kdrive driver
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am
index 5803644..767e1c4 100644
--- a/hw/kdrive/Makefile.am
+++ b/hw/kdrive/Makefile.am
@@ -1,10 +1,10 @@
if KDRIVEVESA
-VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga nvidia pm2 r128 \
+VESA_SUBDIRS = vesa ati chips i810 mach64 mga nvidia pm2 r128 \
smi via
endif
if BUILD_KDRIVEFBDEVLIB
-FBDEV_SUBDIRS = fbdev
+FBDEV_SUBDIRS = fbdev epson
endif
if XFAKESERVER
More information about the xorg-commit
mailing list