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>
This commit is contained in:
committed by
Bernie Thompson
parent
b49f184b64
commit
664c5f1849
@ -72,6 +72,7 @@ MODULE_DEVICE_TABLE(usb, id_table);
|
|||||||
static bool console = 1; /* Allow fbcon to open framebuffer */
|
static bool console = 1; /* Allow fbcon to open framebuffer */
|
||||||
static bool fb_defio = 1; /* Detect mmap writes using page faults */
|
static bool fb_defio = 1; /* Detect mmap writes using page faults */
|
||||||
static bool shadow = 1; /* Optionally disable shadow framebuffer */
|
static bool shadow = 1; /* Optionally disable shadow framebuffer */
|
||||||
|
static int pixel_limit; /* Optionally force a pixel resolution limit */
|
||||||
|
|
||||||
/* dlfb keeps a list of urbs for efficient bulk transfers */
|
/* dlfb keeps a list of urbs for efficient bulk transfers */
|
||||||
static void dlfb_urb_completion(struct urb *urb);
|
static void dlfb_urb_completion(struct urb *urb);
|
||||||
@ -1616,6 +1617,14 @@ static int dlfb_usb_probe(struct usb_interface *interface,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pixel_limit) {
|
||||||
|
pr_warn("DL chip limit of %d overriden"
|
||||||
|
" by module param to %d\n",
|
||||||
|
dev->sku_pixel_limit, pixel_limit);
|
||||||
|
dev->sku_pixel_limit = pixel_limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!dlfb_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) {
|
if (!dlfb_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) {
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
pr_err("dlfb_alloc_urb_list failed\n");
|
pr_err("dlfb_alloc_urb_list failed\n");
|
||||||
@ -1963,6 +1972,9 @@ MODULE_PARM_DESC(fb_defio, "Page fault detection of mmap writes");
|
|||||||
module_param(shadow, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
|
module_param(shadow, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
|
||||||
MODULE_PARM_DESC(shadow, "Shadow vid mem. Disable to save mem but lose perf");
|
MODULE_PARM_DESC(shadow, "Shadow vid mem. Disable to save mem but lose perf");
|
||||||
|
|
||||||
|
module_param(pixel_limit, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
|
||||||
|
MODULE_PARM_DESC(pixel_limit, "Force limit on max mode (in x*y pixels)");
|
||||||
|
|
||||||
MODULE_AUTHOR("Roberto De Ioris <roberto@unbit.it>, "
|
MODULE_AUTHOR("Roberto De Ioris <roberto@unbit.it>, "
|
||||||
"Jaya Kumar <jayakumar.lkml@gmail.com>, "
|
"Jaya Kumar <jayakumar.lkml@gmail.com>, "
|
||||||
"Bernie Thompson <bernie@plugable.com>");
|
"Bernie Thompson <bernie@plugable.com>");
|
||||||
|
Reference in New Issue
Block a user