Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Michel Dänzer
On Mon, 2003-02-03 at 18:09, Benjamin Herrenschmidt wrote: On Mon, 2003-02-03 at 17:05, Michel Dänzer wrote: On Mon, 2003-02-03 at 17:34, Alan Cox wrote: On Mon, 2003-02-03 at 15:02, Keith Whitwell wrote: -#define COMMIT_RING() do { \ -

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Michel Dänzer
On Die, 2003-02-04 at 19:06, Michel Dänzer wrote: After various tests, it looks like all of this is indeed necessary even with AGP. Also, I think at least the r128 driver could use the same treatment, but we probably want to split COMMIT_RING() off ADVANCE_RING() as well for that, and I'm not

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Keith Whitwell
Michel Dänzer wrote: On Die, 2003-02-04 at 19:06, Michel Dänzer wrote: After various tests, it looks like all of this is indeed necessary even with AGP. Also, I think at least the r128 driver could use the same treatment, but we probably want to split COMMIT_RING() off ADVANCE_RING() as

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Michel Dänzer
On Die, 2003-02-04 at 19:36, Keith Whitwell wrote: Michel Dänzer wrote: On Die, 2003-02-04 at 19:06, Michel Dänzer wrote: After various tests, it looks like all of this is indeed necessary even with AGP. Also, I think at least the r128 driver could use the same treatment, but

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Keith Whitwell
Michel Dänzer wrote: On Die, 2003-02-04 at 19:36, Keith Whitwell wrote: Michel Dänzer wrote: On Die, 2003-02-04 at 19:06, Michel Dänzer wrote: After various tests, it looks like all of this is indeed necessary even with AGP. Also, I think at least the r128 driver could use the same

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Leif Delgass
On 4 Feb 2003, Michel Dänzer wrote: On Die, 2003-02-04 at 19:36, Keith Whitwell wrote: Michel Dänzer wrote: On Die, 2003-02-04 at 19:06, Michel Dänzer wrote: After various tests, it looks like all of this is indeed necessary even with AGP. Also, I think at least the

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Michel Dänzer
On Die, 2003-02-04 at 20:09, Leif Delgass wrote: On 4 Feb 2003, Michel Dänzer wrote: On Die, 2003-02-04 at 19:36, Keith Whitwell wrote: Michel Dänzer wrote: On Die, 2003-02-04 at 19:06, Michel Dänzer wrote: After various tests, it looks like all of this is indeed necessary

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Pawel Salek
On 2003.02.04 19:06 Michel Dänzer wrote: And there's even more: newer compilers seem to optimize away some of the reads with strict aliasing. I thought I'd steal some code from the kernel to detect if the compiler supports -fno-strict-aliasing, but it looks like it just uses that

Re: [Dri-devel] Radeon PCI Fix

2003-02-04 Thread Benjamin Herrenschmidt
On Tue, 2003-02-04 at 21:25, Pawel Salek wrote: On 2003.02.04 19:06 Michel Dänzer wrote: And there's even more: newer compilers seem to optimize away some of the reads with strict aliasing. I thought I'd steal some code from the kernel to detect if the compiler supports

[Dri-devel] Radeon PCI Fix

2003-02-03 Thread Chris Ison
I managed to get my pci radeon working with an evil hack, a proper fix is needed but after using the pcigart patch, I did in programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_drv.h #define COMMIT_RING() do { \ +u32 test_read;

[Dri-devel] Radeon PCI Fix

2003-02-03 Thread Chris Ison
please find attached a complete patch that allows pci Radeon cards to work with DRI. It was created against the DRI CVS xc branch/trunk. Thanks to MrCooper and M.Harris for their help. Note: also contains the pcigart patch many often refer too. Index:

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Keith Whitwell
-#define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv-ring.tail ); \ +#define COMMIT_RING() do { \ + /* read from PCI bus to ensure correct posting */ \ + RADEON_READ( RADEON_CP_RB_WPTR ); \ +

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 16:02, Keith Whitwell wrote: -#define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv-ring.tail ); \ +#define COMMIT_RING() do { \ + /* read from PCI bus

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Alan Cox
On Mon, 2003-02-03 at 15:02, Keith Whitwell wrote: -#define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv-ring.tail ); \ +#define COMMIT_RING() do { \ + /* read from PCI bus

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 17:34, Alan Cox wrote: On Mon, 2003-02-03 at 15:02, Keith Whitwell wrote: -#define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv-ring.tail ); \ +#define COMMIT_RING() do {

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 15:53, Chris Ison wrote: please find attached a complete patch that allows pci Radeon cards to work with DRI. It was created against the DRI CVS xc branch/trunk. Thanks, I'll commit this unless someone else comes up with a better solution. Note: also contains the

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Keith Whitwell
Michel Dänzer wrote: On Mon, 2003-02-03 at 15:53, Chris Ison wrote: please find attached a complete patch that allows pci Radeon cards to work with DRI. It was created against the DRI CVS xc branch/trunk. Thanks, I'll commit this unless someone else comes up with a better solution. Well,

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 17:47, Keith Whitwell wrote: Michel Dänzer wrote: On Mon, 2003-02-03 at 15:53, Chris Ison wrote: please find attached a complete patch that allows pci Radeon cards to work with DRI. It was created against the DRI CVS xc branch/trunk. Thanks, I'll commit this

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Benjamin Herrenschmidt
On Mon, 2003-02-03 at 17:05, Michel Dänzer wrote: On Mon, 2003-02-03 at 17:34, Alan Cox wrote: On Mon, 2003-02-03 at 15:02, Keith Whitwell wrote: -#define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv-ring.tail );

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 18:09, Benjamin Herrenschmidt wrote: On Mon, 2003-02-03 at 17:05, Michel Dänzer wrote: On Mon, 2003-02-03 at 17:34, Alan Cox wrote: On Mon, 2003-02-03 at 15:02, Keith Whitwell wrote: -#define COMMIT_RING() do { \ -

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Chris Ison
Yeah, it works, just a little weary of it cause remembering without the read it won't work, but it still appears to work with the read at the end. You mean like this? Chris, does that work for you? -- Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer XFree86 and DRI

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 22:31, Chris Ison wrote: Yeah, it works, Great! just a little weary of it cause remembering without the read it won't work, but it still appears to work with the read at the end. Well, I think Ben has given the best explanation of what's going on so far. Keith, are

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Keith Whitwell
Michel Dänzer wrote: On Mon, 2003-02-03 at 22:31, Chris Ison wrote: Yeah, it works, Great! just a little weary of it cause remembering without the read it won't work, but it still appears to work with the read at the end. Well, I think Ben has given the best explanation of what's going

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Michel Dänzer
On Mon, 2003-02-03 at 22:59, Keith Whitwell wrote: Michel Dänzer wrote: On Mon, 2003-02-03 at 22:31, Chris Ison wrote: Yeah, it works, Great! just a little weary of it cause remembering without the read it won't work, but it still appears to work with the read at the end.

Re: [Dri-devel] Radeon PCI Fix

2003-02-03 Thread Chris Ison
This has been seen before, and fixes a known issue with PCI cards locking up, the same fix possably fixes an issue occassionaly seen with AGP card locking up. It wasn't easy to track down and the fix was only found by accident, it could well of remained alot longer if I hadn't gotten impatient