Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f811b72 authored by Bernie Thompson's avatar Bernie Thompson Committed by Florian Tobias Schandinat
Browse files

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: default avatarBernie Thompson <bernie@plugable.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent d3189545
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -87,18 +87,26 @@ Special configuration for udlfb is usually unnecessary. There are a few
options, however.

From the command line, pass options to modprobe
modprobe udlfb defio=1 console=1
modprobe udlfb fb_defio=0 console=1 shadow=1

Or for permanent option, create file like /etc/modprobe.d/options with text
options udlfb defio=1 console=1
Or modify options on the fly at /sys/module/udlfb/parameters directory via
sudo nano fb_defio
change the parameter in place, and save the file.

Accepted options:
Unplug/replug USB device to apply with new settings

Or for permanent option, create file like /etc/modprobe.d/udlfb.conf with text
options udlfb fb_defio=0 console=1 shadow=1

Accepted boolean options:

fb_defio	Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel
		module to track changed areas of the framebuffer by page faults.
		Standard fbdev applications that use mmap but that do not
		report damage, may be able to work with this enabled.
		Disabled by default because of overhead and other issues.
		report damage, should be able to work with this enabled.
		Disable when running with X server that supports reporting
		changed regions via ioctl, as this method is simpler,
		more stable, and higher performance.

console	Allow fbcon to attach to udlfb provided framebuffers. This
		is disabled by default because fbcon will aggressively consume
+2 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ MODULE_DEVICE_TABLE(usb, id_table);

/* module options */
static int console;   /* Optionally allow fbcon to consume first framebuffer */
static int fb_defio;  /* Optionally enable experimental fb_defio mmap support */
static int fb_defio = 1;  /* Detect mmap writes using page faults */
static int shadow = 1; /* Optionally disable shadow framebuffer */

/* 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);
MODULE_PARM_DESC(console, "Allow fbcon to consume first framebuffer found");

module_param(fb_defio, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
MODULE_PARM_DESC(fb_defio, "Enable fb_defio mmap support. *Experimental*");
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");