Skip to contentSkip to conversation

fbcon: Console Rotation - Add support for 90-degree console rotation

PATCH In review Antonino A. Daplas 1 participant 1 message Nov 7, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/8 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

---
 Makefile       |    2 
 fbcon.c        |   13 +
 fbcon_cw.c     |  412 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 fbcon_rotate.c |    6 
 fbcon_rotate.h |    1 
 5 files changed, 433 insertions(+), 1 deletion(-)
drivers/video/console/Makefile +1 -1
index 4532bdf..984f8cd 100644
@@ -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
drivers/video/console/fbcon.c +13 -0
index 26935e2..e829ba1 100644
@@ -207,12 +207,25 @@ static irqreturn_t fb_vbl_detect(int irq
 }
 #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)
 {
drivers/video/console/fbcon_cw.c new file +412 -0

412 lines not on this page · raw message

drivers/video/console/fbcon_rotate.c +6 -0
index 6a96931..9df009c 100644
@@ -97,6 +97,12 @@ finished:
 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);
 
drivers/video/console/fbcon_rotate.h +1 -0
index d8acd6d..8e0320a 100644
@@ -99,4 +99,5 @@ static inline void rotate_ccw(const char
 	}
 }
 
+extern void fbcon_rotate_cw(struct fbcon_ops *ops);
 #endif

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php