diff options
author | Olaf Hering <olaf@aepfle.de> | 2013-12-15 20:40:35 (GMT) |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-04-03 08:32:12 (GMT) |
commit | e8bdefebda1ee5641d5eaf30ada4ae8dc3acff8e (patch) | |
tree | 8c1e1cfee1f37df693a880be26e910bb8c18da91 /drivers | |
parent | ee023577f66a1c647011384cb839d09747a083a4 (diff) | |
download | linux-fsl-qoriq-e8bdefebda1ee5641d5eaf30ada4ae8dc3acff8e.tar.xz |
fbmem: really support wildcard video=options for all fbdev drivers
commit f5d2b7c28b67d627646b6a0142bc201a7b1516b0 upstream.
Documentation/fb/modedb.txt states that video=option should be
considered a global option. But video_setup and fb_get_options are not
coded that way. Instead its required to boot with video=driver:option to
set a given option in drvier. This is cumbersome because it requires to
know in advance which driver will be active for a given board/kernel.
The following patch implements the documented catchall for the fbdev
drivers. It is now possible to boot with video=XxY without the need to
know the active driver in advance. The specific case it tries to fix is
syslinux in the SUSE installer which offers a menu to set a display
resolution. Right now this just appends the vga= option the kernel. But
in addition to vga= it should be possible to pass a generic video=XxY
for all framebuffer/drm drivers. With this change forcing a certain
window size of VM displays is now much easier.
Today the video= option is stored in a global fb_mode_option. But
unfortunately only drm uses it.
Note: this change introduces a small memleak if video=option is actually
used because fb_mode_option is const. Most drivers use strsep to get to
individual options. This could be fixed in a followup patch which always
releases the option string in every caller of fb_get_options.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbmem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index dacaf74..8659eb1 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1916,6 +1916,9 @@ int fb_get_options(const char *name, char **option) options = opt + name_len + 1; } } + /* No match, pass global option */ + if (!options && option && fb_mode_option) + options = kstrdup(fb_mode_option, GFP_KERNEL); if (options && !strncmp(options, "off", 3)) retval = 1; |