summaryrefslogtreecommitdiff
path: root/drivers/video/console/fbcon.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-11-08 21:39:12 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:56:34 -0800
commitdbcbfe1ea41e404d960a06fa2faf7da568909f33 (patch)
tree757dccdb6e1c518392b7ee973641969b6130bf11 /drivers/video/console/fbcon.c
parent6cc50e1c5b57180fd37a31282000f43859b0fe73 (diff)
[PATCH] fbcon: Console Rotation - Add support for 90-degree console rotation
Add support for 90-degree (clockwise) rotation of the console. To activate, boot with: fbcon=rotate:1 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 'drivers/video/console/fbcon.c')
-rw-r--r--drivers/video/console/fbcon.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 26935e231a1d..e829ba18e0a5 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -207,12 +207,25 @@ static irqreturn_t fb_vbl_detect(int irq, void *dummy, struct pt_regs *fp)
}
#endif
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
+static inline void fbcon_set_rotation(struct fb_info *info, struct display *p)
+{
+ struct fbcon_ops *ops = info->fbcon_par;
+
+ if (!(info->flags & FBINFO_MISC_TILEBLITTING) &&
+ p->con_rotate < 4)
+ ops->rotate = p->con_rotate;
+ else
+ ops->rotate = 0;
+}
+#else
static inline void fbcon_set_rotation(struct fb_info *info, struct display *p)
{
struct fbcon_ops *ops = info->fbcon_par;
ops->rotate = FB_ROTATE_UR;
}
+#endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */
static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info)
{