From: Geert Uytterhoeven Date: Tue, 8 May 2007 07:37:57 +0000 (-0700) Subject: fbdev: correct image offsets when rotating logo X-Git-Tag: v2.6.22-rc1~446 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=abed5d15af4cf864b502b5b0402c7fb39c5c3371;p=linux-2.6-omap-h63xx.git 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 Acked-By: James Simmons Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 8ce98a2f6f3..45f38390605 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;