linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert.Uytterhoeven@sonycom.com
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
	linux-fbdev-devel@lists.sourceforge.net,
	James Simmons <jsimmons@infradead.org>,
	"Antonino A. Daplas" <adaplas@gmail.com>
Subject: [patch 3/3] fbdev: correct image offsets when rotating logo
Date: Tue, 13 Mar 2007 15:14:42 +0100	[thread overview]
Message-ID: <20070313141512.370365000@sonycom.com> (raw)
In-Reply-To: 20070313141439.295232000@sonycom.com

[-- Attachment #1: spe-logo/fb_rotate_logo-fix-offsets.diff --]
[-- Type: text/plain, Size: 2156 bytes --]

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>
---
 drivers/video/fbmem.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

--- ps3-linux-2.6.21-rc3.orig/drivers/video/fbmem.c
+++ ps3-linux-2.6.21-rc3/drivers/video/fbmem.c
@@ -354,22 +354,26 @@ static void fb_rotate_logo(struct fb_inf
 	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;

--
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- 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

      parent reply	other threads:[~2007-03-13 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13 14:14 [patch 0/3] Fbdev logo fixes and updates Geert.Uytterhoeven
2007-03-13 14:14 ` [patch 1/3] fbdev: Avoid vertical overflow when making space for the logo Geert.Uytterhoeven
2007-03-13 14:14 ` [patch 2/3] fbdev: fb_do_show_logo() updates Geert.Uytterhoeven
2007-03-13 14:14 ` Geert.Uytterhoeven [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070313141512.370365000@sonycom.com \
    --to=geert.uytterhoeven@sonycom.com \
    --cc=adaplas@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).