* Problems with rotated Logos
@ 2006-06-14 10:13 Richard Purdie
2006-06-14 13:03 ` Antonino A. Daplas
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2006-06-14 10:13 UTC (permalink / raw)
To: Antonino A. Daplas, linux-fbdev-devel
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.
To assist debugging, I changed to a 480x185 logo and tested this without
console rotation where it displays fine. If I rotate the console
clockwise, the logo doesn't appear but there is space left for it and
the system boots.
I've tried to get further with this but I couldn't quite understand how
fb_rotate_logo_cw was working. Could this be broken in the case where
you have a logo with width > height? (height > width in the case of that
function). I made a test program to look at the numbers outputted by
that function and they didn't seem right for my logo size. I've not
checked with the tux logo sizes as I ran out of time but will do in due
course.
I'll continue to look into this but I wondered if anyone had any
thoughts where the problem might be offhand? The lockup worries me but
could be some separate issue and I'll work on getting the 480x185 logo
working initially.
Regards,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with rotated Logos
2006-06-14 10:13 Problems with rotated Logos Richard Purdie
@ 2006-06-14 13:03 ` Antonino A. Daplas
2006-06-14 18:56 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Antonino A. Daplas @ 2006-06-14 13:03 UTC (permalink / raw)
To: Richard Purdie; +Cc: linux-fbdev-devel
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;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problems with rotated Logos
2006-06-14 13:03 ` Antonino A. Daplas
@ 2006-06-14 18:56 ` Richard Purdie
2006-06-14 21:24 ` Antonino A. Daplas
2006-06-14 21:27 ` Antonino A. Daplas
0 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2006-06-14 18:56 UTC (permalink / raw)
To: Antonino A. Daplas; +Cc: linux-fbdev-devel
Hi,
On Wed, 2006-06-14 at 21:03 +0800, Antonino A. Daplas wrote:
> 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.
The patch helps in that the 640x185 image no longer locks the system up
and it displays something, thanks! The image is corrupted however.
Rather than trying to describe it:
http://www.rpsys.net/openzaurus/temp/logo-corrupt.jpg
(I'm refraining from comment about the logo itself ;-)
As well as the wrapping, the blue colour to the left is also corruption,
and marks the edge of the screen.
I suspect the rotation function has a bug...
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with rotated Logos
2006-06-14 18:56 ` Richard Purdie
@ 2006-06-14 21:24 ` Antonino A. Daplas
2006-06-14 21:27 ` Antonino A. Daplas
1 sibling, 0 replies; 6+ messages in thread
From: Antonino A. Daplas @ 2006-06-14 21:24 UTC (permalink / raw)
To: Richard Purdie; +Cc: linux-fbdev-devel
Richard Purdie wrote:
> Hi,
>
> On Wed, 2006-06-14 at 21:03 +0800, Antonino A. Daplas wrote:
>> 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.
>
> The patch helps in that the 640x185 image no longer locks the system up
> and it displays something, thanks! The image is corrupted however.
> Rather than trying to describe it:
>
> http://www.rpsys.net/openzaurus/temp/logo-corrupt.jpg
>
> (I'm refraining from comment about the logo itself ;-)
:-)
>
> As well as the wrapping, the blue colour to the left is also corruption,
> and marks the edge of the screen.
>
> I suspect the rotation function has a bug...
>
Yes, you're right, the dimensions where reversed. Can you revert the previous
patch, and then apply this one?
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 | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 9527a52..a6b0629 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -334,11 +334,11 @@ static void fb_rotate_logo_ud(const u8 *
static void fb_rotate_logo_cw(const u8 *in, u8 *out, u32 width, u32 height)
{
- int i, j, w = width - 1;
+ int i, j, h = height - 1;
for (i = 0; i < height; i++)
for (j = 0; j < width; j++)
- out[height * j + w - i] = *in++;
+ out[height * j + h - i] = *in++;
}
static void fb_rotate_logo_ccw(const u8 *in, u8 *out, u32 width, u32 height)
@@ -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;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problems with rotated Logos
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
1 sibling, 1 reply; 6+ messages in thread
From: Antonino A. Daplas @ 2006-06-14 21:27 UTC (permalink / raw)
To: Richard Purdie; +Cc: linux-fbdev-devel
Richard Purdie wrote:
> Hi,
>
> On Wed, 2006-06-14 at 21:03 +0800, Antonino A. Daplas wrote:
>> 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.
>
> The patch helps in that the 640x185 image no longer locks the system up
> and it displays something, thanks! The image is corrupted however.
> Rather than trying to describe it:
>
> http://www.rpsys.net/openzaurus/temp/logo-corrupt.jpg
>
> (I'm refraining from comment about the logo itself ;-)
:-)
>
> As well as the wrapping, the blue colour to the left is also corruption,
> and marks the edge of the screen.
>
> I suspect the rotation function has a bug...
>
Yes, you're right, the dimensions where reversed. Can you revert the previous
patch, and then apply this one?
Tony
PS: If this still doesn't work, can you send me your logo ppm file?
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 | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 9527a52..a6b0629 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -334,11 +334,11 @@ static void fb_rotate_logo_ud(const u8 *
static void fb_rotate_logo_cw(const u8 *in, u8 *out, u32 width, u32 height)
{
- int i, j, w = width - 1;
+ int i, j, h = height - 1;
for (i = 0; i < height; i++)
for (j = 0; j < width; j++)
- out[height * j + w - i] = *in++;
+ out[height * j + h - i] = *in++;
}
static void fb_rotate_logo_ccw(const u8 *in, u8 *out, u32 width, u32 height)
@@ -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;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problems with rotated Logos
2006-06-14 21:27 ` Antonino A. Daplas
@ 2006-06-14 23:35 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2006-06-14 23:35 UTC (permalink / raw)
To: Antonino A. Daplas; +Cc: linux-fbdev-devel
On Thu, 2006-06-15 at 05:27 +0800, Antonino A. Daplas wrote:
> Yes, you're right, the dimensions where reversed. Can you revert the previous
> patch, and then apply this one?
I've applied this and it displays perfectly, thanks! :)
> PS: If this still doesn't work, can you send me your logo ppm file?
In case you still want it, I have a few logos available at:
http://www.rpsys.net/openzaurus/patches/archive/logo_oz-r0.patch.bz2
http://www.rpsys.net/openzaurus/patches/archive/logo_oh-r0.patch.bz2
(the oz640 one is the one I was testing with)
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-14 23:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-14 10:13 Problems with rotated Logos Richard Purdie
2006-06-14 13:03 ` Antonino A. Daplas
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
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).