Commit 18dffdf8 authored by Bernie Thompson's avatar Bernie Thompson Committed by Greg Kroah-Hartman

staging: udlfb: enhance EDID and mode handling support

Enhance EDID and mode table handling

* Adds support for lower-end DL chips on higher-end monitors
* Adds support for using fbdev standard EDID parsing and handling
* Adds support for more dynamic reallocation of framebuffer, based on new EDID

Queries EDID from hardware with several retries then
queries DisplayLink chip for max pixel area via vendor descriptor.
Uses existing fbdev mode handling service funcations to build mode list
of common modes between adapter and monitor.
This enables lower-end chips (e.g. DL-125) to successfully pick a compatible
mode on higher end monitors (e.g. whose default mode is over 1280x1024).
Reallocate framebuffer if necessary in response to new max mode.
Signed-off-by: default avatarBernie Thompson <bernie@plugable.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 33077b8d
This diff is collapsed.
...@@ -44,7 +44,8 @@ struct dlfb_data { ...@@ -44,7 +44,8 @@ struct dlfb_data {
atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */ atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */
atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */ atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */
atomic_t use_defio; /* 0 = rely on ioctls and blit/copy/fill rects */ atomic_t use_defio; /* 0 = rely on ioctls and blit/copy/fill rects */
char edid[128]; char *edid; /* null until we read edid from hw or get from sysfs */
size_t edid_size;
int sku_pixel_limit; int sku_pixel_limit;
int base16; int base16;
int base8; int base8;
...@@ -64,6 +65,11 @@ struct dlfb_data { ...@@ -64,6 +65,11 @@ struct dlfb_data {
#define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE) #define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE)
#define WRITES_IN_FLIGHT (4) #define WRITES_IN_FLIGHT (4)
#define MIN_EDID_SIZE 128
#define MAX_EDID_SIZE 128
#define MAX_VENDOR_DESCRIPTOR_SIZE 256
#define GET_URB_TIMEOUT HZ #define GET_URB_TIMEOUT HZ
#define FREE_URB_TIMEOUT (HZ*2) #define FREE_URB_TIMEOUT (HZ*2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment