From fd32c49ed873df7b4c298bd81066ee2c1db4419a Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Sat, 3 Mar 2012 12:57:37 -0800 Subject: [PATCH] --- yaml --- r: 294211 b: refs/heads/master c: 664c5f18490f2552900c3f1794602204a43acc86 h: refs/heads/master i: 294209: 3a3903e04d78465095fd760d0c42ddf50673b09b 294207: fa37e12228937ba0472a508fe73d727bbdb7b55a v: v3 --- [refs] | 2 +- trunk/drivers/video/udlfb.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 36b29b7246fb..038f03c11d9c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b49f184b640dcfab7ede394cf2a1ff4fe3d154f5 +refs/heads/master: 664c5f18490f2552900c3f1794602204a43acc86 diff --git a/trunk/drivers/video/udlfb.c b/trunk/drivers/video/udlfb.c index 4330cf4b17a3..86c8b256e306 100644 --- a/trunk/drivers/video/udlfb.c +++ b/trunk/drivers/video/udlfb.c @@ -72,6 +72,7 @@ MODULE_DEVICE_TABLE(usb, id_table); static bool console = 1; /* Allow fbcon to open framebuffer */ static bool fb_defio = 1; /* Detect mmap writes using page faults */ 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 */ static void dlfb_urb_completion(struct urb *urb); @@ -1616,6 +1617,14 @@ static int dlfb_usb_probe(struct usb_interface *interface, 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)) { retval = -ENOMEM; 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_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 , " "Jaya Kumar , " "Bernie Thompson ");