linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
@ 2004-11-16 22:44 Andrew Walrond
  2004-11-16 23:29 ` Andrew Walrond
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Andrew Walrond @ 2004-11-16 22:44 UTC (permalink / raw)
  To: linux-fbdev-devel

Hi guys,

I just upgraded my kernel to linus latest bk head, booting with a built in 
rivafb as usual, but I get a corrupted display.

2.6.8.1 worked just fine.

The two pengiun logos seem fine (but ontop of garbage), but the text is 
totally screwed and spread all over the screen in little chunks

Before I start hunting down the problem, has anybody got any ideas/fixes?

This is a 64bit kernel on a dual opteron system.

TIA

Andrew Walrond


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-16 22:44 x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today Andrew Walrond
@ 2004-11-16 23:29 ` Andrew Walrond
  2004-11-17  0:01 ` Andrew Walrond
  2004-11-17  0:15 ` Antonino A. Daplas
  2 siblings, 0 replies; 12+ messages in thread
From: Andrew Walrond @ 2004-11-16 23:29 UTC (permalink / raw)
  To: linux-fbdev-devel

On Tuesday 16 Nov 2004 22:44, Andrew Walrond wrote:
> Hi guys,
>
> I just upgraded my kernel to linus latest bk head, booting with a built in
> rivafb as usual, but I get a corrupted display.
>
> 2.6.8.1 worked just fine.
>

2.6.9 is also fine. I'll try and narrow it down some more...


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-16 22:44 x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today Andrew Walrond
  2004-11-16 23:29 ` Andrew Walrond
@ 2004-11-17  0:01 ` Andrew Walrond
  2004-11-17  0:15 ` Antonino A. Daplas
  2 siblings, 0 replies; 12+ messages in thread
From: Andrew Walrond @ 2004-11-17  0:01 UTC (permalink / raw)
  To: linux-fbdev-devel

x>
> I just upgraded my kernel to linus latest bk head, booting with a built in
> rivafb as usual, but I get a corrupted display.
>
> 2.6.8.1 worked just fine.
>
> The two pengiun logos seem fine (but ontop of garbage), but the text is
> totally screwed and spread all over the screen in little chunks
>
> Before I start hunting down the problem, has anybody got any ideas/fixes?
>
> This is a 64bit kernel on a dual opteron system.
>

2.6.8.1 through to 2.6.10-rc1 work fine
2.6.10-rc2 is broken

I'll do some more digging tomorrow unless somebody knows what's up.

Andrew


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-16 22:44 x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today Andrew Walrond
  2004-11-16 23:29 ` Andrew Walrond
  2004-11-17  0:01 ` Andrew Walrond
@ 2004-11-17  0:15 ` Antonino A. Daplas
  2004-11-17  0:33   ` Andrew Walrond
  2 siblings, 1 reply; 12+ messages in thread
From: Antonino A. Daplas @ 2004-11-17  0:15 UTC (permalink / raw)
  To: linux-fbdev-devel, Andrew Walrond

On Wednesday 17 November 2004 06:44, Andrew Walrond wrote:
> Hi guys,
>
> I just upgraded my kernel to linus latest bk head, booting with a built in
> rivafb as usual, but I get a corrupted display.
>
> 2.6.8.1 worked just fine.
>
> The two pengiun logos seem fine (but ontop of garbage), but the text is
> totally screwed and spread all over the screen in little chunks
>
> Before I start hunting down the problem, has anybody got any ideas/fixes?
>
> This is a 64bit kernel on a dual opteron system.

There was a bunch of IO access fixes in rivafb.  Can you narrow it down to a particular
function?  Replace the following...

	.fb_fillrect 	= rivafb_fillrect,
	.fb_copyarea 	= rivafb_copyarea,
	.fb_imageblit 	= rivafb_imageblit,
	.fb_cursor	= rivafb_cursor,	

..with:

	.fb_fillrect 	= cfb_fillrect,
	.fb_copyarea 	= cfb_copyarea,
	.fb_imageblit 	= cfb_imageblit,
	.fb_cursor	= soft_cursor,

And make sure that 'info->pixmap.scan_align = 4' if using rivafb_imageblit
and 'info->pixmap.scan_align = 1' if using cfb_imageblit. (The scan
alignment is adjusted in rivafb_set_par() and riva_set_fbinfo()).

Using the soft drawing functions (cfb_*), in theory, should always produce a
working console. Then just bring back the rivafb_* functions one by one.

Tony




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17  0:15 ` Antonino A. Daplas
@ 2004-11-17  0:33   ` Andrew Walrond
  2004-11-17 11:07     ` Andrew Walrond
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Walrond @ 2004-11-17  0:33 UTC (permalink / raw)
  To: adaplas; +Cc: linux-fbdev-devel

On Wednesday 17 Nov 2004 00:15, Antonino A. Daplas wrote:
>
> There was a bunch of IO access fixes in rivafb.  Can you narrow it down to
> a particular function?  Replace the following...
>
>  .fb_fillrect  = rivafb_fillrect,
>  .fb_copyarea  = rivafb_copyarea,
>  .fb_imageblit  = rivafb_imageblit,
>  .fb_cursor = rivafb_cursor,
>
> ..with:
>
>  .fb_fillrect  = cfb_fillrect,
>  .fb_copyarea  = cfb_copyarea,
>  .fb_imageblit  = cfb_imageblit,
>  .fb_cursor = soft_cursor,
>
> And make sure that 'info->pixmap.scan_align = 4' if using rivafb_imageblit
> and 'info->pixmap.scan_align = 1' if using cfb_imageblit. (The scan
> alignment is adjusted in rivafb_set_par() and riva_set_fbinfo()).
>
> Using the soft drawing functions (cfb_*), in theory, should always produce
> a working console. Then just bring back the rivafb_* functions one by one.
>

Ok, it works using all the soft functions. I'll swap them out now...


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17  0:33   ` Andrew Walrond
@ 2004-11-17 11:07     ` Andrew Walrond
  2004-11-17 11:11       ` Geert Uytterhoeven
  2004-11-17 22:23       ` Antonino A. Daplas
  0 siblings, 2 replies; 12+ messages in thread
From: Andrew Walrond @ 2004-11-17 11:07 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: adaplas

On Wednesday 17 Nov 2004 00:33, Andrew Walrond wrote:
> On Wednesday 17 Nov 2004 00:15, Antonino A. Daplas wrote:
> > There was a bunch of IO access fixes in rivafb.  Can you narrow it down
> > to a particular function?  Replace the following...
> >
> >  .fb_fillrect  = rivafb_fillrect,

Broken.

> >  .fb_copyarea  = rivafb_copyarea,

seems ok

> >  .fb_imageblit  = rivafb_imageblit,

broken.

> >  .fb_cursor = rivafb_cursor,

doesn't cause any problems, but I'm not using a mouse on the console, so I 
probably wouldn't notice?

Andrew


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17 11:07     ` Andrew Walrond
@ 2004-11-17 11:11       ` Geert Uytterhoeven
  2004-11-17 11:34         ` Andrew Walrond
  2004-11-17 22:23       ` Antonino A. Daplas
  1 sibling, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2004-11-17 11:11 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development; +Cc: adaplas

On Wed, 17 Nov 2004, Andrew Walrond wrote:
> On Wednesday 17 Nov 2004 00:33, Andrew Walrond wrote:
> > On Wednesday 17 Nov 2004 00:15, Antonino A. Daplas wrote:
> > > There was a bunch of IO access fixes in rivafb.  Can you narrow it down
> > > to a particular function?  Replace the following...
> > >
> > >  .fb_fillrect  = rivafb_fillrect,
> 
> Broken.
> 
> > >  .fb_copyarea  = rivafb_copyarea,
> 
> seems ok
> 
> > >  .fb_imageblit  = rivafb_imageblit,
> 
> broken.
> 
> > >  .fb_cursor = rivafb_cursor,
> 
> doesn't cause any problems, but I'm not using a mouse on the console, so I 
> probably wouldn't notice?

It's used for the text cursor, so you're definitely using it.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17 11:11       ` Geert Uytterhoeven
@ 2004-11-17 11:34         ` Andrew Walrond
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Walrond @ 2004-11-17 11:34 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Geert Uytterhoeven, adaplas

On Wednesday 17 Nov 2004 11:11, Geert Uytterhoeven wrote:
>
> It's used for the text cursor, so you're definitely using it.
>

Ah Ok.

I'm developing a fb application so I'd like to get this fixed. Any 
insights/clues, before I start digging? As I said, it broke between rc1 and 
rc2, so I guess I can narrow it down to a particular cset and work it from 
there if nobody has any better ideas.

Andrew


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17 11:07     ` Andrew Walrond
  2004-11-17 11:11       ` Geert Uytterhoeven
@ 2004-11-17 22:23       ` Antonino A. Daplas
  2004-11-17 22:28         ` Antonino A. Daplas
  1 sibling, 1 reply; 12+ messages in thread
From: Antonino A. Daplas @ 2004-11-17 22:23 UTC (permalink / raw)
  To: linux-fbdev-devel, Andrew Walrond

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

On Wednesday 17 November 2004 19:07, Andrew Walrond wrote:
> On Wednesday 17 Nov 2004 00:33, Andrew Walrond wrote:
> > On Wednesday 17 Nov 2004 00:15, Antonino A. Daplas wrote:
> > > There was a bunch of IO access fixes in rivafb.  Can you narrow it down
> > > to a particular function?  Replace the following...
> > >
> > >  .fb_fillrect  = rivafb_fillrect,
>
> Broken.
>
> > >  .fb_copyarea  = rivafb_copyarea,
>
> seems ok
>
> > >  .fb_imageblit  = rivafb_imageblit,
>
> broken.
>

I was suspecting imageblit, I never suspected fillrect.  Anyway, can you try
the 2 patches attached.  The first patch reverts io access to the old method
(direct pointer loading/reading and forced alignment) and the second uses
__raw_{read|write} but forces alignment. You need to reverse the previous
patch before applying the other.

If none of the patches work, it will entail more work.  Revert the following
functions to linux-2.6.10-rc1, in the given order and preferrably one at a
time.

riva_set_pattern()
riva_set_rop_solid()
riva_setup_accel()
rivafb_imageblit()
rivafb_fillrect()

Tony



[-- Attachment #2: rivafb-ioaccess-revert1.diff --]
[-- Type: text/x-diff, Size: 1335 bytes --]

diff -Nru a/drivers/video/riva/riva_hw.h b/drivers/video/riva/riva_hw.h
--- a/drivers/video/riva/riva_hw.h	2004-11-17 18:29:40 +08:00
+++ b/drivers/video/riva/riva_hw.h	2004-11-18 05:54:17 +08:00
@@ -73,17 +73,20 @@
 /*
  * HW access macros.
  */
+#if defined(__powerpc__)
 #include <asm/io.h>
-
-#define NV_WR08(p,i,d)  (__raw_writeb((d), (void __iomem *)(p) + (i)))
-#define NV_RD08(p,i)    (__raw_readb((void __iomem *)(p) + (i)))
-#define NV_WR16(p,i,d)  (__raw_writew((d), (void __iomem *)(p) + (i)))
-#define NV_RD16(p,i)    (__raw_readw((void __iomem *)(p) + (i)))
-#define NV_WR32(p,i,d)  (__raw_writel((d), (void __iomem *)(p) + (i)))
-#define NV_RD32(p,i)    (__raw_readl((void __iomem *)(p) + (i)))
-
-#define VGA_WR08(p,i,d) (writeb((d), (void __iomem *)(p) + (i)))
-#define VGA_RD08(p,i)   (readb((void __iomem *)(p) + (i)))
+#define NV_WR08(p,i,d)	out_8(p+i, d)
+#define NV_RD08(p,i)	in_8(p+i)
+#else
+#define NV_WR08(p,i,d)  (((U008 *)(p))[i]=(d))
+#define NV_RD08(p,i)    (((U008 *)(p))[i])
+#endif
+#define NV_WR16(p,i,d)  (((U016 *)(p))[(i)/2]=(d))
+#define NV_RD16(p,i)    (((U016 *)(p))[(i)/2])
+#define NV_WR32(p,i,d)  (((U032 *)(p))[(i)/4]=(d))
+#define NV_RD32(p,i)    (((U032 *)(p))[(i)/4])
+#define VGA_WR08(p,i,d) NV_WR08(p,i,d)
+#define VGA_RD08(p,i)   NV_RD08(p,i)
 
 /*
  * Define different architectures.

[-- Attachment #3: rivafb-ioaccess-revert2.diff --]
[-- Type: text/x-diff, Size: 1200 bytes --]

diff -Nru a/drivers/video/riva/riva_hw.h b/drivers/video/riva/riva_hw.h
--- a/drivers/video/riva/riva_hw.h	2004-11-17 18:29:40 +08:00
+++ b/drivers/video/riva/riva_hw.h	2004-11-18 06:06:02 +08:00
@@ -75,12 +75,12 @@
  */
 #include <asm/io.h>
 
-#define NV_WR08(p,i,d)  (__raw_writeb((d), (void __iomem *)(p) + (i)))
-#define NV_RD08(p,i)    (__raw_readb((void __iomem *)(p) + (i)))
-#define NV_WR16(p,i,d)  (__raw_writew((d), (void __iomem *)(p) + (i)))
-#define NV_RD16(p,i)    (__raw_readw((void __iomem *)(p) + (i)))
-#define NV_WR32(p,i,d)  (__raw_writel((d), (void __iomem *)(p) + (i)))
-#define NV_RD32(p,i)    (__raw_readl((void __iomem *)(p) + (i)))
+#define NV_WR08(p,i,d)  (__raw_writeb((d), (u8 __iomem *)(p) + (i)))
+#define NV_RD08(p,i)    (__raw_readb((u8 __iomem *)(p) + (i)))
+#define NV_WR16(p,i,d)  (__raw_writew((d), (u16 __iomem *)(p) + (i)/2))
+#define NV_RD16(p,i)    (__raw_readw((u16 __iomem *)(p) + (i)/2))
+#define NV_WR32(p,i,d)  (__raw_writel((d), (u32 __iomem *)(p) + (i)/4))
+#define NV_RD32(p,i)    (__raw_readl((u32 __iomem *)(p) + (i)/4))
 
 #define VGA_WR08(p,i,d) (writeb((d), (void __iomem *)(p) + (i)))
 #define VGA_RD08(p,i)   (readb((void __iomem *)(p) + (i)))

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17 22:23       ` Antonino A. Daplas
@ 2004-11-17 22:28         ` Antonino A. Daplas
  2004-11-17 22:50           ` Andrew Walrond
  0 siblings, 1 reply; 12+ messages in thread
From: Antonino A. Daplas @ 2004-11-17 22:28 UTC (permalink / raw)
  To: adaplas, linux-fbdev-devel, Andrew Walrond

On Thursday 18 November 2004 06:23, Antonino A. Daplas wrote:
> On Wednesday 17 November 2004 19:07, Andrew Walrond wrote:
> > On Wednesday 17 Nov 2004 00:33, Andrew Walrond wrote:
> > > On Wednesday 17 Nov 2004 00:15, Antonino A. Daplas wrote:

> I was suspecting imageblit, I never suspected fillrect.  Anyway, can you
> try the 2 patches attached.  The first patch reverts io access to the old
> method (direct pointer loading/reading and forced alignment) and the second
> uses __raw_{read|write} but forces alignment. You need to reverse the
> previous patch before applying the other.

Umm, forget about the first patch, just apply the second patch.

Thanks.

Tony




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17 22:28         ` Antonino A. Daplas
@ 2004-11-17 22:50           ` Andrew Walrond
  2004-11-18  0:02             ` Antonino A. Daplas
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Walrond @ 2004-11-17 22:50 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Antonino A. Daplas, adaplas

On Wednesday 17 Nov 2004 22:28, Antonino A. Daplas wrote:
>
> Umm, forget about the first patch, just apply the second patch.
>

Absolutely no change I'm afraid.

You want me to try reverting the functions you mentioned?

Andrew


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today
  2004-11-17 22:50           ` Andrew Walrond
@ 2004-11-18  0:02             ` Antonino A. Daplas
  0 siblings, 0 replies; 12+ messages in thread
From: Antonino A. Daplas @ 2004-11-18  0:02 UTC (permalink / raw)
  To: linux-fbdev-devel, Andrew Walrond; +Cc: adaplas

On Thursday 18 November 2004 06:50, Andrew Walrond wrote:
> On Wednesday 17 Nov 2004 22:28, Antonino A. Daplas wrote:
> > Umm, forget about the first patch, just apply the second patch.
>
> Absolutely no change I'm afraid.
>
> You want me to try reverting the functions you mentioned?
>

Try the patch that reverts the "burst" code, and if that does not work,
then yes, you might have to revert.

Tony




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-11-18  0:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-16 22:44 x86_64 64bit kernel rivafb broke between 2.6.8.1 and linus bk as of today Andrew Walrond
2004-11-16 23:29 ` Andrew Walrond
2004-11-17  0:01 ` Andrew Walrond
2004-11-17  0:15 ` Antonino A. Daplas
2004-11-17  0:33   ` Andrew Walrond
2004-11-17 11:07     ` Andrew Walrond
2004-11-17 11:11       ` Geert Uytterhoeven
2004-11-17 11:34         ` Andrew Walrond
2004-11-17 22:23       ` Antonino A. Daplas
2004-11-17 22:28         ` Antonino A. Daplas
2004-11-17 22:50           ` Andrew Walrond
2004-11-18  0:02             ` Antonino A. Daplas

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).