Commit abed5d15 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

fbdev: correct image offsets when rotating logo

Correct the image offsets when rotating the logo.  Before image->dx and
image->dy were always zero, so nobody ever noticed.
Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-By: default avatarJames Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 448d4797
...@@ -354,22 +354,26 @@ static void fb_rotate_logo(struct fb_info *info, u8 *dst, ...@@ -354,22 +354,26 @@ static void fb_rotate_logo(struct fb_info *info, u8 *dst,
if (rotate == FB_ROTATE_UD) { if (rotate == FB_ROTATE_UD) {
fb_rotate_logo_ud(image->data, dst, image->width, fb_rotate_logo_ud(image->data, dst, image->width,
image->height); image->height);
image->dx = info->var.xres - image->width; image->dx = info->var.xres - image->width - image->dx;
image->dy = info->var.yres - image->height; image->dy = info->var.yres - image->height - image->dy;
} else if (rotate == FB_ROTATE_CW) { } else if (rotate == FB_ROTATE_CW) {
fb_rotate_logo_cw(image->data, dst, image->width, fb_rotate_logo_cw(image->data, dst, image->width,
image->height); image->height);
tmp = image->width; tmp = image->width;
image->width = image->height; image->width = image->height;
image->height = tmp; 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) { } else if (rotate == FB_ROTATE_CCW) {
fb_rotate_logo_ccw(image->data, dst, image->width, fb_rotate_logo_ccw(image->data, dst, image->width,
image->height); image->height);
tmp = image->width; tmp = image->width;
image->width = image->height; image->width = image->height;
image->height = tmp; 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; image->data = dst;
......
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