linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Problems with rotated Logos
Date: Wed, 14 Jun 2006 21:03:23 +0800	[thread overview]
Message-ID: <4490091B.4090900@gmail.com> (raw)
In-Reply-To: <1150279997.27375.15.camel@localhost.localdomain>

Richard Purdie wrote:
> Hi,
> 
> I've been experimenting with logos on the Sharp Zaurus C3000 which has a
> 480x640 framebuffer which is rotated clockwise to give 640x480. I'm
> using a 2.6.16 based kernel.
> 
> If I use the standard Linux logo (clut224), all is well. I added a
> 640x185 logo and this locked the machine up when booting. Space was
> cleared at the top of the console for the logo and some boot messages
> appeared beneath it. Also, 639x185 gave the same result.

Yes, it's a bug. Also present in CCW. Try this patch.

Tony

fbdev: Fix logo rotation if width != height

Logo drawing crashes or produces corrupt display if the logo width and
height are not equal.  The dimensions are transposed prior to the actual
rotation, which produces a corrupt image.  Reverse the sequence to fix.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 drivers/video/fbmem.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 9527a52..aaa4c9b 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -356,24 +356,24 @@ static void fb_rotate_logo(struct fb_inf
 	u32 tmp;
 
 	if (rotate == FB_ROTATE_UD) {
-		image->dx = info->var.xres - image->width;
-		image->dy = info->var.yres - image->height;
 		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;
 	} else if (rotate == FB_ROTATE_CW) {
-		tmp = image->width;
-		image->width = image->height;
-		image->height = tmp;
-		image->dx = info->var.xres - image->height;
 		fb_rotate_logo_cw(image->data, dst, image->width,
 				  image->height);
-	} else if (rotate == FB_ROTATE_CCW) {
 		tmp = image->width;
 		image->width = image->height;
 		image->height = tmp;
-		image->dy = info->var.yres - image->width;
+		image->dx = info->var.xres - image->width;
+	} 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;
 	}
 
 	image->data = dst;

  reply	other threads:[~2006-06-14 13:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-14 10:13 Problems with rotated Logos Richard Purdie
2006-06-14 13:03 ` Antonino A. Daplas [this message]
2006-06-14 18:56   ` Richard Purdie
2006-06-14 21:24     ` Antonino A. Daplas
2006-06-14 21:27     ` Antonino A. Daplas
2006-06-14 23:35       ` Richard Purdie

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=4490091B.4090900@gmail.com \
    --to=adaplas@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=rpurdie@rpsys.net \
    /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).