Fbdev logo fixes and updates
Subsystems (2)
cover Fbdev logo fixes and updates
These are a few logo bug fixes and updates:
[PATCH 1/3] fbdev: Avoid vertical overflow when making space for the logo [PATCH 2/3] fbdev: fb_do_show_logo() updates
[PATCH 3/3] fbdev: correct image offsets when rotating logo
Please apply for 2.6.21. Thx!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) [email protected] ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
PATCH 1/3 fbdev: Avoid vertical overflow when making space for the logo
fbcon_prepare_logo(): Avoid vertical overflow when making space for the logo
--- drivers/video/console/fbcon.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
drivers/video/console/fbcon.c +7 -2
@@ -618,8 +618,13 @@ static void fbcon_prepare_logo(struct vc r -= cols; }if (!save) { - vc->vc_y += logo_lines; - vc->vc_pos += logo_lines * vc->vc_size_row; +int lines; +if (vc->vc_y + logo_lines >= rows) + lines = rows - vc->vc_y -1 ; +else + lines = logo_lines; + vc->vc_y += lines; + vc->vc_pos += lines * vc->vc_size_row; } } scr_memsetw((unsigned short *) vc->vc_origin,
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) [email protected] ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
PATCH 2/3 fbdev: fb_do_show_logo() updates
In reply to [email protected]fb_do_show_logo() updates:
- Use width and height of the passed image instead of the global variable fb_logo
- Explicitly pass the number of logos to draw
--- drivers/video/fbmem.c | 34 +++++++++++++++------------------- 1 files changed, 15 insertions(+), 19 deletions(-)
drivers/video/fbmem.c +15 -19
@@ -376,37 +376,33 @@ static void fb_rotate_logo(struct fb_inf }static void fb_do_show_logo (struct fb_info *info,struct fb_image *image, -int rotate) +int rotate,unsigned int num) { -int x; +unsigned int x;if (rotate ==FB_ROTATE_UR ) { -for (x =0 ; x <num_online_cpus () && - x * (fb_logo.logo->width +8 ) <= - info->var.xres - fb_logo.logo->width; x++) { +for (x =0 ; + x < num && image->dx + image->width <= info->var.xres; + x++) { info->fbops->fb_imageblit (info, image); - image->dx += fb_logo.logo->width +8 ; + image->dx += image->width +8 ; } }else if (rotate ==FB_ROTATE_UD ) { -for (x =0 ; x <num_online_cpus () && - x * (fb_logo.logo->width +8 ) <= - info->var.xres - fb_logo.logo->width; x++) { +for (x =0 ; x < num && image->dx >=0 ; x++) { info->fbops->fb_imageblit (info, image); - image->dx -= fb_logo.logo->width +8 ; + image->dx -= image->width +8 ; } }else if (rotate ==FB_ROTATE_CW ) { -for (x =0 ; x <num_online_cpus () && - x * (fb_logo.logo->width +8 ) <= - info->var.yres - fb_logo.logo->width; x++) { +for (x =0 ; + x < num && image->dy + image->height <= info->var.yres; + x++) { info->fbops->fb_imageblit (info, image); - image->dy += fb_logo.logo->width +8 ; + image->dy += image->height +8 ; } }else if (rotate ==FB_ROTATE_CCW ) { -for (x =0 ; x <num_online_cpus () && - x * (fb_logo.logo->width +8 ) <= - info->var.yres - fb_logo.logo->width; x++) { +for (x =0 ; x < num && image->dy >=0 ; x++) { info->fbops->fb_imageblit (info, image); - image->dy -= fb_logo.logo->width +8 ; + image->dy -= image->height +8 ; } } }
@@ -532,7 +528,7 @@ int fb_show_logo(struct fb_info *info, ifb_rotate_logo (info, logo_rotate, &image, rotate); } -fb_do_show_logo (info, &image, rotate); +fb_do_show_logo (info, &image, rotate,num_online_cpus ());kfree (palette);if (saved_pseudo_palette !=NULL )
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) [email protected] ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
PATCH 3/3 fbdev: correct image offsets when rotating logo
In reply to [email protected]Correct the image offsets when rotating the logo. Before image->dx and image->dy were always zero, so nobody ever noticed.
--- drivers/video/fbmem.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
drivers/video/fbmem.c +8 -4
@@ -354,22 +354,26 @@ static void fb_rotate_logo(struct fb_infif (rotate ==FB_ROTATE_UD ) {fb_rotate_logo_ud (image->data, dst, image->width, image->height); - image->dx = info->var.xres - image->width; - image->dy = info->var.yres - image->height; + image->dx = info->var.xres - image->width - image->dx; + image->dy = info->var.yres - image->height - image->dy; }else if (rotate ==FB_ROTATE_CW ) {fb_rotate_logo_cw (image->data, dst, image->width, image->height); tmp = image->width; image->width = image->height; image->height = tmp; - image->dx = info->var.xres - image->width; + tmp = image->dy; + image->dy = image->dx; + image->dx = info->var.xres - image->width - tmp; }else if (rotate ==FB_ROTATE_CCW ) {fb_rotate_logo_ccw (image->data, dst, image->width, image->height); tmp = image->width; image->width = image->height; image->height = tmp; - image->dy = info->var.yres - image->height; + tmp = image->dx; + image->dx = image->dy; + image->dy = info->var.yres - image->height - tmp; } image->data = dst;
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) [email protected] ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV