diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-05-08 09:37:57 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 20:15:27 +0200 |
commit | abed5d15af4cf864b502b5b0402c7fb39c5c3371 (patch) | |
tree | 03751aa17486c108c15a917e387ff34283e3bd02 /drivers/video/fbmem.c | |
parent | fbdev: fb_do_show_logo() updates (diff) | |
download | linux-abed5d15af4cf864b502b5b0402c7fb39c5c3371.tar.xz linux-abed5d15af4cf864b502b5b0402c7fb39c5c3371.zip |
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: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-By: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 8ce98a2f6f37..45f38390605b 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -354,22 +354,26 @@ static void fb_rotate_logo(struct fb_info *info, u8 *dst, if (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; |