Commit dbcbfe1e authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

[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: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6cc50e1c
......@@ -32,7 +32,7 @@ ifeq ($(CONFIG_FB_TILEBLITTING),y)
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += tileblit.o
endif
ifeq ($(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION),y)
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o
endif
obj-$(CONFIG_FB_STI) += sticore.o font.o
......
......@@ -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)
{
......
This diff is collapsed.
......@@ -97,6 +97,12 @@ static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc,
void fbcon_set_rotate(struct fbcon_ops *ops)
{
ops->rotate_font = fbcon_rotate_font;
switch(ops->rotate) {
case FB_ROTATE_CW:
fbcon_rotate_cw(ops);
break;
}
}
EXPORT_SYMBOL(fbcon_set_rotate);
......
......@@ -99,4 +99,5 @@ static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height)
}
}
extern void fbcon_rotate_cw(struct fbcon_ops *ops);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment