diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-05-08 03:37:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:27 -0400 |
commit | abed5d15af4cf864b502b5b0402c7fb39c5c3371 (patch) | |
tree | 03751aa17486c108c15a917e387ff34283e3bd02 | |
parent | 448d479747b85eb2e284c29622d31f5485db6819 (diff) |
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>
-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, | |||
354 | if (rotate == FB_ROTATE_UD) { | 354 | if (rotate == FB_ROTATE_UD) { |
355 | fb_rotate_logo_ud(image->data, dst, image->width, | 355 | fb_rotate_logo_ud(image->data, dst, image->width, |
356 | image->height); | 356 | image->height); |
357 | image->dx = info->var.xres - image->width; | 357 | image->dx = info->var.xres - image->width - image->dx; |
358 | image->dy = info->var.yres - image->height; | 358 | image->dy = info->var.yres - image->height - image->dy; |
359 | } else if (rotate == FB_ROTATE_CW) { | 359 | } else if (rotate == FB_ROTATE_CW) { |
360 | fb_rotate_logo_cw(image->data, dst, image->width, | 360 | fb_rotate_logo_cw(image->data, dst, image->width, |
361 | image->height); | 361 | image->height); |
362 | tmp = image->width; | 362 | tmp = image->width; |
363 | image->width = image->height; | 363 | image->width = image->height; |
364 | image->height = tmp; | 364 | image->height = tmp; |
365 | image->dx = info->var.xres - image->width; | 365 | tmp = image->dy; |
366 | image->dy = image->dx; | ||
367 | image->dx = info->var.xres - image->width - tmp; | ||
366 | } else if (rotate == FB_ROTATE_CCW) { | 368 | } else if (rotate == FB_ROTATE_CCW) { |
367 | fb_rotate_logo_ccw(image->data, dst, image->width, | 369 | fb_rotate_logo_ccw(image->data, dst, image->width, |
368 | image->height); | 370 | image->height); |
369 | tmp = image->width; | 371 | tmp = image->width; |
370 | image->width = image->height; | 372 | image->width = image->height; |
371 | image->height = tmp; | 373 | image->height = tmp; |
372 | image->dy = info->var.yres - image->height; | 374 | tmp = image->dx; |
375 | image->dx = image->dy; | ||
376 | image->dy = info->var.yres - image->height - tmp; | ||
373 | } | 377 | } |
374 | 378 | ||
375 | image->data = dst; | 379 | image->data = dst; |