diff options
author | Ben Collins <bcollins@ubuntu.com> | 2012-03-03 15:57:37 -0500 |
---|---|---|
committer | Bernie Thompson <bernie@plugable.com> | 2012-03-03 15:57:37 -0500 |
commit | 664c5f18490f2552900c3f1794602204a43acc86 (patch) | |
tree | 7cd910c12c2082989c5106a28df864790c219a38 /drivers/video/udlfb.c | |
parent | b49f184b640dcfab7ede394cf2a1ff4fe3d154f5 (diff) |
udlfb: Add module_param to allow forcing pixel_limit
Some user scenarios need to prioritize performance over
maxiumum resolution.
Also, some devices may have bad vendor descriptors, and
this allows the user to set a pixel limit that matches
their specific device to avoid blank screens on higher
resolution monitors.
700000 minimum for DL-115, 2360000 maximum for DL-195
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Diffstat (limited to 'drivers/video/udlfb.c')
-rw-r--r-- | drivers/video/udlfb.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 4330cf4b17a3..86c8b256e306 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c | |||
@@ -72,6 +72,7 @@ MODULE_DEVICE_TABLE(usb, id_table); | |||
72 | static bool console = 1; /* Allow fbcon to open framebuffer */ | 72 | static bool console = 1; /* Allow fbcon to open framebuffer */ |
73 | static bool fb_defio = 1; /* Detect mmap writes using page faults */ | 73 | static bool fb_defio = 1; /* Detect mmap writes using page faults */ |
74 | static bool shadow = 1; /* Optionally disable shadow framebuffer */ | 74 | static bool shadow = 1; /* Optionally disable shadow framebuffer */ |
75 | static int pixel_limit; /* Optionally force a pixel resolution limit */ | ||
75 | 76 | ||
76 | /* dlfb keeps a list of urbs for efficient bulk transfers */ | 77 | /* dlfb keeps a list of urbs for efficient bulk transfers */ |
77 | static void dlfb_urb_completion(struct urb *urb); | 78 | static void dlfb_urb_completion(struct urb *urb); |
@@ -1616,6 +1617,14 @@ static int dlfb_usb_probe(struct usb_interface *interface, | |||
1616 | goto error; | 1617 | goto error; |
1617 | } | 1618 | } |
1618 | 1619 | ||
1620 | if (pixel_limit) { | ||
1621 | pr_warn("DL chip limit of %d overriden" | ||
1622 | " by module param to %d\n", | ||
1623 | dev->sku_pixel_limit, pixel_limit); | ||
1624 | dev->sku_pixel_limit = pixel_limit; | ||
1625 | } | ||
1626 | |||
1627 | |||
1619 | if (!dlfb_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) { | 1628 | if (!dlfb_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) { |
1620 | retval = -ENOMEM; | 1629 | retval = -ENOMEM; |
1621 | pr_err("dlfb_alloc_urb_list failed\n"); | 1630 | pr_err("dlfb_alloc_urb_list failed\n"); |
@@ -1963,6 +1972,9 @@ MODULE_PARM_DESC(fb_defio, "Page fault detection of mmap writes"); | |||
1963 | module_param(shadow, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); | 1972 | module_param(shadow, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); |
1964 | MODULE_PARM_DESC(shadow, "Shadow vid mem. Disable to save mem but lose perf"); | 1973 | MODULE_PARM_DESC(shadow, "Shadow vid mem. Disable to save mem but lose perf"); |
1965 | 1974 | ||
1975 | module_param(pixel_limit, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); | ||
1976 | MODULE_PARM_DESC(pixel_limit, "Force limit on max mode (in x*y pixels)"); | ||
1977 | |||
1966 | MODULE_AUTHOR("Roberto De Ioris <roberto@unbit.it>, " | 1978 | MODULE_AUTHOR("Roberto De Ioris <roberto@unbit.it>, " |
1967 | "Jaya Kumar <jayakumar.lkml@gmail.com>, " | 1979 | "Jaya Kumar <jayakumar.lkml@gmail.com>, " |
1968 | "Bernie Thompson <bernie@plugable.com>"); | 1980 | "Bernie Thompson <bernie@plugable.com>"); |