aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernie Thompson <bernie@plugable.com>2011-08-21 16:35:38 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-08-24 06:12:33 -0400
commit9f811b72c669e29f8c01e258d912254065e58f11 (patch)
tree06f5175444fa761a73055cfa0bb96c296dda121e
parentd3189545ee69527e949769b89a4cbb331de97b4a (diff)
udlfb: Enable fb_defio by default
Enables page fault based detection of mmap writes to the framebuffer, which allows standard fbdev apps (like the generic fbdev xorg driver) to work on DisplayLink devices. Not all bugs are shaken out of the fb_defio path of udlfb, but it's tantalizingly close, so this seems a good time to enable by default. Alternatively, option can be disabled when running with an xorg driver that can more directly communicate damaged regions of the framebuffer via IOCTL. This is a simpler, higher perf option, when available. Signed-off-by: Bernie Thompson <bernie@plugable.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
-rw-r--r--Documentation/fb/udlfb.txt24
-rw-r--r--drivers/video/udlfb.c4
2 files changed, 18 insertions, 10 deletions
diff --git a/Documentation/fb/udlfb.txt b/Documentation/fb/udlfb.txt
index 473ceed9e4eb..c6d90a6fb901 100644
--- a/Documentation/fb/udlfb.txt
+++ b/Documentation/fb/udlfb.txt
@@ -87,20 +87,28 @@ Special configuration for udlfb is usually unnecessary. There are a few
87options, however. 87options, however.
88 88
89From the command line, pass options to modprobe 89From the command line, pass options to modprobe
90modprobe udlfb defio=1 console=1 90modprobe udlfb fb_defio=0 console=1 shadow=1
91 91
92Or for permanent option, create file like /etc/modprobe.d/options with text 92Or modify options on the fly at /sys/module/udlfb/parameters directory via
93options udlfb defio=1 console=1 93sudo nano fb_defio
94change the parameter in place, and save the file.
94 95
95Accepted options: 96Unplug/replug USB device to apply with new settings
97
98Or for permanent option, create file like /etc/modprobe.d/udlfb.conf with text
99options udlfb fb_defio=0 console=1 shadow=1
100
101Accepted boolean options:
96 102
97fb_defio Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel 103fb_defio Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel
98 module to track changed areas of the framebuffer by page faults. 104 module to track changed areas of the framebuffer by page faults.
99 Standard fbdev applications that use mmap but that do not 105 Standard fbdev applications that use mmap but that do not
100 report damage, may be able to work with this enabled. 106 report damage, should be able to work with this enabled.
101 Disabled by default because of overhead and other issues. 107 Disable when running with X server that supports reporting
108 changed regions via ioctl, as this method is simpler,
109 more stable, and higher performance.
102 110
103console Allow fbcon to attach to udlfb provided framebuffers. This 111console Allow fbcon to attach to udlfb provided framebuffers. This
104 is disabled by default because fbcon will aggressively consume 112 is disabled by default because fbcon will aggressively consume
105 the first framebuffer it finds, which isn't usually what the 113 the first framebuffer it finds, which isn't usually what the
106 user wants in the case of USB displays. 114 user wants in the case of USB displays.
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index 2341b275e815..2b694e1c73cb 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -61,7 +61,7 @@ MODULE_DEVICE_TABLE(usb, id_table);
61 61
62/* module options */ 62/* module options */
63static int console; /* Optionally allow fbcon to consume first framebuffer */ 63static int console; /* Optionally allow fbcon to consume first framebuffer */
64static int fb_defio; /* Optionally enable experimental fb_defio mmap support */ 64static int fb_defio = 1; /* Detect mmap writes using page faults */
65static int shadow = 1; /* Optionally disable shadow framebuffer */ 65static int shadow = 1; /* Optionally disable shadow framebuffer */
66 66
67/* dlfb keeps a list of urbs for efficient bulk transfers */ 67/* dlfb keeps a list of urbs for efficient bulk transfers */
@@ -1951,7 +1951,7 @@ module_param(console, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
1951MODULE_PARM_DESC(console, "Allow fbcon to consume first framebuffer found"); 1951MODULE_PARM_DESC(console, "Allow fbcon to consume first framebuffer found");
1952 1952
1953module_param(fb_defio, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); 1953module_param(fb_defio, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
1954MODULE_PARM_DESC(fb_defio, "Enable fb_defio mmap support. *Experimental*"); 1954MODULE_PARM_DESC(fb_defio, "Page fault detection of mmap writes");
1955 1955
1956module_param(shadow, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); 1956module_param(shadow, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
1957MODULE_PARM_DESC(shadow, "Shadow vid mem. Disable to save mem but lose perf"); 1957MODULE_PARM_DESC(shadow, "Shadow vid mem. Disable to save mem but lose perf");