aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-06-10 19:46:52 +0200
committerKoen Kooi <koen@openembedded.org>2009-06-10 19:46:52 +0200
commitc34afca7ebd0868fa78ded64c5cd2fd53b4d78bc (patch)
treea19914c937408dad038c1b26ba8c47d4a4d2e745
parentd302cb3796aea6f77e3a32ae2e5d6c807ddbbcd0 (diff)
downloadopenembedded-c34afca7ebd0868fa78ded64c5cd2fd53b4d78bc.tar.gz
kernel-module-udlfb: update to 0.2.3
-rw-r--r--recipes/libdlo/kernel-module-udlfb.bb2
-rw-r--r--recipes/libdlo/kernel-module-udlfb/udlfb.c38
-rw-r--r--recipes/libdlo/kernel-module-udlfb/udlfb.h18
3 files changed, 44 insertions, 14 deletions
diff --git a/recipes/libdlo/kernel-module-udlfb.bb b/recipes/libdlo/kernel-module-udlfb.bb
index 55262d22c9..10e83c4caa 100644
--- a/recipes/libdlo/kernel-module-udlfb.bb
+++ b/recipes/libdlo/kernel-module-udlfb.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Framebuffer console driver for displaylink based usb devices"
LICENSE = "GPLv2"
-PV = "0.2.2"
+PV = "0.2.3"
SRC_URI = "file://udlfb.c \
file://udlfb.h \
diff --git a/recipes/libdlo/kernel-module-udlfb/udlfb.c b/recipes/libdlo/kernel-module-udlfb/udlfb.c
index 96fdb3e7d5..abeca9bd12 100644
--- a/recipes/libdlo/kernel-module-udlfb/udlfb.c
+++ b/recipes/libdlo/kernel-module-udlfb/udlfb.c
@@ -7,6 +7,7 @@
* Based on the amazing work of Florian Echtler and libdlo 0.1 *
* *
* *
+ * 10.06.09 release 0.2.3 (edid ioctl, fallback for unsupported modes) *
* 05.06.09 release 0.2.2 (real screen blanking, rle compression, double buffer) *
* 31.05.09 release 0.2 *
* 22.05.09 First public (ugly) release *
@@ -600,10 +601,21 @@ static int dlfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct dlfb_data *dev_info = info->par;
- struct dloarea *area = (struct dloarea *)arg;
+ struct dloarea *area = NULL;
+
+ if (cmd == 0xAD) {
+ char *edid = (char *)arg;
+ dlfb_edid(dev_info);
+ if (copy_to_user(edid, dev_info->edid, 128)) {
+ return -EFAULT;
+ }
+ return 0;
+ }
- if (cmd == 0xAA || cmd == 0xAB) {
+ if (cmd == 0xAA || cmd == 0xAB || cmd == 0xAC) {
+
+ area = (struct dloarea *)arg;
if (area->x < 0)
@@ -714,7 +726,6 @@ dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id)
{
struct dlfb_data *dev_info;
struct fb_info *info;
- int i;
int ret;
char rbuf[4];
@@ -755,15 +766,7 @@ dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id)
printk("ret control msg 0: %d %x%x%x%x\n", ret, rbuf[0], rbuf[1],
rbuf[2], rbuf[3]);
- for (i = 0; i < 128; i++) {
- ret =
- usb_control_msg(dev_info->udev,
- usb_rcvctrlpipe(dev_info->udev, 0), (0x02),
- (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2,
- 0);
- /* printk("ret control msg edid %d: %d [%d]\n",i, ret, rbuf[1]); */
- dev_info->edid[i] = rbuf[1];
- }
+ dlfb_edid(dev_info);
info = framebuffer_alloc(sizeof(u32) * 256, &dev_info->udev->dev);
@@ -775,6 +778,10 @@ dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id)
fb_parse_edid(dev_info->edid, &info->var);
printk("EDID XRES %d YRES %d\n", info->var.xres, info->var.yres);
+ if (info->var.xres == 0 || info->var.yres == 0) {
+ info->var.xres = 800;
+ info->var.yres = 480;
+ }
if (dlfb_set_video_mode(dev_info, info->var.xres, info->var.yres) != 0)
goto out;
@@ -828,7 +835,12 @@ dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id)
info->fix.smem_start = (unsigned long)info->screen_base;
info->fix.smem_len = PAGE_ALIGN(dev_info->screen_size);
- memcpy(info->fix.id, "DisplayLink FB", 14);
+ if (strlen(dev_info->udev->product) > 15) {
+ memcpy(info->fix.id, dev_info->udev->product, 15);
+ }
+ else {
+ memcpy(info->fix.id, dev_info->udev->product, strlen(dev_info->udev->product));
+ }
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = FB_VISUAL_TRUECOLOR;
info->fix.accel = info->flags;
diff --git a/recipes/libdlo/kernel-module-udlfb/udlfb.h b/recipes/libdlo/kernel-module-udlfb/udlfb.h
index f0508628f0..d587088913 100644
--- a/recipes/libdlo/kernel-module-udlfb/udlfb.h
+++ b/recipes/libdlo/kernel-module-udlfb/udlfb.h
@@ -50,6 +50,24 @@ static void dlfb_bulk_callback(struct urb *urb)
}
+static void dlfb_edid(struct dlfb_data *dev_info)
+{
+ int i;
+ int ret;
+ char rbuf[2];
+
+ for (i = 0; i < 128; i++) {
+ ret =
+ usb_control_msg(dev_info->udev,
+ usb_rcvctrlpipe(dev_info->udev, 0), (0x02),
+ (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2,
+ 0);
+ /*printk("ret control msg edid %d: %d [%d]\n",i, ret, rbuf[1]);*/
+ dev_info->edid[i] = rbuf[1];
+ }
+
+}
+
static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len)
{