diff options
author | Roberto De Ioris <roberto@unbit.it> | 2009-06-10 23:02:19 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 11:00:57 -0700 |
commit | 7316bc55ed20c1eae6ff87a35dc2a8e3827f2d79 (patch) | |
tree | d2ad89ddb34c71cba496197a36e11a4f2ba97745 /drivers/staging/udlfb/udlfb.h | |
parent | 4b6a4856c6b6e3bb7839b15296712627b7a37208 (diff) |
Staging: udlfb: update to version 0.2.3
This updates the udlfb to the 0.2.3 version.
From: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/udlfb/udlfb.h')
-rw-r--r-- | drivers/staging/udlfb/udlfb.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index f69b1c586c1..08bd671204b 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -26,7 +26,9 @@ struct dlfb_data { int line_length; struct completion done; int base16; + int base16d; int base8; + int base8d; }; struct dlfb_video_mode { @@ -48,6 +50,24 @@ static void dlfb_bulk_callback(struct urb *urb) complete(&dev_info->done); } +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) { int ret; @@ -129,8 +149,12 @@ static int dlfb_set_video_mode(struct dlfb_data *dev_info, int width, int height && dlfb_video_modes[i].yres == height) { dev_info->base16 = 0; + dev_info->base16d = width * height * (FB_BPP / 8); - dev_info->base8 = width * height * (FB_BPP / 8);; + //dev_info->base8 = width * height * (FB_BPP / 8); + + dev_info->base8 = dev_info->base16; + dev_info->base8d = dev_info->base16d; /* set encryption key (null) */ memcpy(dev_info->buf, STD_CHANNEL, 16); @@ -144,6 +168,9 @@ static int dlfb_set_video_mode(struct dlfb_data *dev_info, int width, int height /* set registers */ bufptr = dlfb_set_register(bufptr, 0xFF, 0x00); + /* set color depth */ + bufptr = dlfb_set_register(bufptr, 0x00, 0x00); + /* set addresses */ bufptr = dlfb_set_register(bufptr, 0x20, |