• Olaf Hering's avatar
    fbmem: really support wildcard video=options for all fbdev drivers · f5d2b7c2
    Olaf Hering authored
    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: default avatarOlaf Hering <olaf@aepfle.de>
    Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    f5d2b7c2
fbmem.c 45.8 KB