diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-11-09 00:39:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:35 -0500 |
commit | a812c94b94e3db76d1af68208fb3edef69070401 (patch) | |
tree | 8dd2ecd1e1981e3423d8c3aaf796aeb3f38f91f1 /include | |
parent | ed8c0e99f27451a9b980adf0de318d60e6de811f (diff) |
[PATCH] fbcon: Console Rotation - Add ability to control rotation via sysfs
Add ability to set rotation via sysfs. The attributes are located in
/sys/class/graphics/fb[n] and accepts 0 - unrotated; 1 - clockwise; 2 - upside
down; 3 - counterclockwise.
The attributes are:
con_rotate (r/w) - set rotation of the active console
con_rotate_all (w) - set rotation of all consoles
rotate (r/w) - set rotation of the framebuffer, if supported.
Currently, none of the drivers support this.
This is probably temporary, since con_rotate and con_rotate_all are
console-specific and has no business being under the fb device. However,
until the console layer acquires it's own sysfs class, these attributes will
temporarily reside here.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 357dd3a0a01e..04a58f33ec53 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -508,6 +508,12 @@ struct fb_cursor_user { | |||
508 | /* The resolution of the passed in fb_info about to change and | 508 | /* The resolution of the passed in fb_info about to change and |
509 | all vc's should be changed */ | 509 | all vc's should be changed */ |
510 | #define FB_EVENT_MODE_CHANGE_ALL 0x0A | 510 | #define FB_EVENT_MODE_CHANGE_ALL 0x0A |
511 | /* CONSOLE-SPECIFIC: set console rotation */ | ||
512 | #define FB_EVENT_SET_CON_ROTATE 0x0B | ||
513 | /* CONSOLE-SPECIFIC: get console rotation */ | ||
514 | #define FB_EVENT_GET_CON_ROTATE 0x0C | ||
515 | /* CONSOLE-SPECIFIC: rotate all consoles */ | ||
516 | #define FB_EVENT_SET_CON_ROTATE_ALL 0x0D | ||
511 | 517 | ||
512 | struct fb_event { | 518 | struct fb_event { |
513 | struct fb_info *info; | 519 | struct fb_info *info; |
@@ -836,6 +842,7 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, | |||
836 | struct fb_fix_screeninfo *fix); | 842 | struct fb_fix_screeninfo *fix); |
837 | extern int fb_get_options(char *name, char **option); | 843 | extern int fb_get_options(char *name, char **option); |
838 | extern int fb_new_modelist(struct fb_info *info); | 844 | extern int fb_new_modelist(struct fb_info *info); |
845 | extern int fb_con_duit(struct fb_info *info, int event, void *data); | ||
839 | 846 | ||
840 | extern struct fb_info *registered_fb[FB_MAX]; | 847 | extern struct fb_info *registered_fb[FB_MAX]; |
841 | extern int num_registered_fb; | 848 | extern int num_registered_fb; |