• Jon Smirl's avatar
    [PATCH] fbdev: Add mode changing via sysfs · 8c91d5e9
    Jon Smirl authored
    This is a first pass at adding two new sysfs attributes to
    /sys/class/graphics/fb0 for setting modes.  There are two attributes: modes
    which contains a list of valid modes, and mode which is the current mode.  To
    switch modes echo one of the entries from the modes list to the mode
    attribute.
    
    The D,V,S on the modes represents Detailed, Vesa, Standard from the DDC info.
    
    modes is root writable.  It can also be used to set the list of modes.  For
    example a /etc file could add modes that are not in the monitor's DDC.
    
    mode is user writable.  PAM would set ownership of mode at user login time.
    This provides a safe way for a user to set the mode without being root.  You
    can only set the mode to one of the modes on the list.
    Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    8c91d5e9
fbmem.c 31.8 KB