Skip to contentSkip to conversation

fbcon: Console Rotation - Add support to rotate the logo

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

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

PATCH 2/8 fbcon: Console Rotation - Add support to rotate the logo

Add support for rotating and positioning of the logo. Rotation and position depends on 'int rotate' parameter added to fb_prepare_logo() and fb_show_logo().

---
 drivers/video/console/fbcon.c |    5 -
 drivers/video/fbmem.c         |  130 +++++++++++++++++++++++++++++++++++++-----
 include/linux/fb.h            |    4 -
 3 files changed, 122 insertions(+), 17 deletions(-)
drivers/video/console/fbcon.c +3 -2
index b5d678c..26935e2 100644
@@ -499,6 +499,7 @@ static void fbcon_prepare_logo(struct vc
 			       int cols, int rows, int new_cols, int new_rows)
 {
 	/* Need to make room for the logo */
+	struct fbcon_ops *ops = info->fbcon_par;
 	int cnt, erase = vc->vc_video_erase_char, step;
 	unsigned short *save = NULL, *r, *q;
 
@@ -508,7 +509,7 @@ static void fbcon_prepare_logo(struct vc
 	 */
 	if (fb_get_color_depth(&info->var, &info->fix) == 1)
 		erase &= ~0x400;
-	logo_height = fb_prepare_logo(info);
+	logo_height = fb_prepare_logo(info, ops->rotate);
 	logo_lines = (logo_height + vc->vc_font.height - 1) /
 		vc->vc_font.height;
 	q = (unsigned short *) (vc->vc_origin +
@@ -2073,7 +2074,7 @@ static int fbcon_switch(struct vc_data *
 
 		logo_shown = fg_console;
 		/* This is protected above by initmem_freed */
-		fb_show_logo(info);
+		fb_show_logo(info, ops->rotate);
 		update_region(vc,
 			      vc->vc_origin + vc->vc_size_row * vc->vc_top,
 			      vc->vc_size_row * (vc->vc_bottom -
drivers/video/fbmem.c +117 -13

173 lines not on this page · raw message

include/linux/fb.h +2 -2
index 51791dc..357dd3a 100644
@@ -825,8 +825,8 @@ extern void cfb_imageblit(struct fb_info
 /* drivers/video/fbmem.c */
 extern int register_framebuffer(struct fb_info *fb_info);
 extern int unregister_framebuffer(struct fb_info *fb_info);
-extern int fb_prepare_logo(struct fb_info *fb_info);
-extern int fb_show_logo(struct fb_info *fb_info);
+extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
+extern int fb_show_logo(struct fb_info *fb_info, int rotate);
 extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);
 extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx,
 				u32 height, u32 shift_high, u32 shift_low, u32 mod);

-------------------------------------------------------
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