Re: [Linux-fbdev-devel] radeonfb lockup in .28-rc (bisected)

Subsystems: framebuffer layer, the rest

3 messages, 2 authors, 2008-11-04 · open the first message on its own page

Re: [Linux-fbdev-devel] radeonfb lockup in .28-rc (bisected)

From: Paul Collins <hidden>
Date: 2008-11-04 06:50:09

Benjamin Herrenschmidt [off-list ref] writes:
One thing you may want to try .. it will result in crap results on
screen but would help telling us if that's the cause, is to hack
radeonfb to round the image size to a multiple of 32 and see if that
stops the lockup.
I took a guess at how to do this and ended up with the patch below.

With the patch applied, the screen turns almost completely to gibberish
at console handover and the machine hangs.  At the top I get two lines
of old output from the previous boot.  (I'm pretty sure it's hung
because the optical drive init happens after console handover, and I
don't get the usual chunka-chunka noise.)

The corruption I get is very similar to what I got when I originally
reported the problem when I was using my patched-in 12x24 font.  (I
created the .psf version later and switched back to default 8x16 to
verify my problem was the same as James's.)

diff --git a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
index 8718f73..848e9bc 100644
--- a/drivers/video/aty/radeon_accel.c
+++ b/drivers/video/aty/radeon_accel.c
@@ -208,7 +208,11 @@ static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo,
 	 * work ok for me without that and the doco doesn't seem to imply
 	 * there is such a restriction.
 	 */
-	OUTREG(DST_WIDTH_HEIGHT, (image->width << 16) | image->height);
+	{
+		/* Hack attack. */
+		int width = ((image->width - 1) / 32 + 1) * 32;
+		OUTREG(DST_WIDTH_HEIGHT, (width << 16) | image->height);
+	}
 
 	src_bytes = (((image->width * image->depth) + 7) / 8) * image->height;
 	dwords = (src_bytes + 3) / 4;

-- 
Paul Collins
Wellington, New Zealand

Dag vijandelijk luchtschip de huismeester is dood

Re: [Linux-fbdev-devel] radeonfb lockup in .28-rc (bisected)

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-11-04 21:38:53

On Tue, 2008-11-04 at 19:49 +1300, Paul Collins wrote:
+               int width = ((image->width - 1) / 32 + 1) * 32;
Heh, it would have been easier to do

	width = (image->width | 0x1f) + 1; 

BTW. Does it always lockup or only when using this special font (without
the hack that is ?)

Cheers,
Ben.

Re: [Linux-fbdev-devel] radeonfb lockup in .28-rc (bisected)

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-11-04 21:41:29

On Tue, 2008-11-04 at 19:49 +1300, Paul Collins wrote:
quoted hunk
Benjamin Herrenschmidt [off-list ref] writes:
quoted
One thing you may want to try .. it will result in crap results on
screen but would help telling us if that's the cause, is to hack
radeonfb to round the image size to a multiple of 32 and see if that
stops the lockup.
I took a guess at how to do this and ended up with the patch below.

With the patch applied, the screen turns almost completely to gibberish
at console handover and the machine hangs.  At the top I get two lines
of old output from the previous boot.  (I'm pretty sure it's hung
because the optical drive init happens after console handover, and I
don't get the usual chunka-chunka noise.)

The corruption I get is very similar to what I got when I originally
reported the problem when I was using my patched-in 12x24 font.  (I
created the .psf version later and switched back to default 8x16 to
verify my problem was the same as James's.)

diff --git a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
index 8718f73..848e9bc 100644
--- a/drivers/video/aty/radeon_accel.c
+++ b/drivers/video/aty/radeon_accel.c
@@ -208,7 +208,11 @@ static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo,
 	 * work ok for me without that and the doco doesn't seem to imply
 	 * there is such a restriction.
 	 */
-	OUTREG(DST_WIDTH_HEIGHT, (image->width << 16) | image->height);
+	{
+		/* Hack attack. */
+		int width = ((image->width - 1) / 32 + 1) * 32;
+		OUTREG(DST_WIDTH_HEIGHT, (width << 16) | image->height);
+	}
 
 	src_bytes = (((image->width * image->depth) + 7) / 8) * image->height;
 	dwords = (src_bytes + 3) / 4;
Oh and you also need to change the src_bytes calculation 

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help