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 unless someone else comes up with a better
> > solution.
> 
> Well, I'd like to at least understand why *two* reads are necessary.

Because it doesn't work with only one. ;)

Seriously though, here's an excerpt from IRC (with a few useless
comments of mine stripped):

<mharris> <mharris> #define COMMIT_RING() do {                                         
 \
<mharris> <mharris>         RADEON_WRITE( RADEON_CP_RB_WPTR,
dev_priv->ring.tail );             \
<mharris> <mharris> } while (0)
<mharris> <arjan> yup that has a pci posting bug :)
<mharris> <arjan> well
<mharris> <arjan> technically doing a read just before that IS the right
fix
<mharris> <arjan> eg it requires all previous writes to be flushed
<mharris> <arjan> also just after this write you want to ALSO do a read
<mharris> <arjan> technically it's cleaner to have a special
PCI_FLUSH_RING() that's called where needed
<mharris> <arjan> but it'll be all the places that then immediatly call
COMMIT_RING
<mharris> <arjan> so including it into COMMIT_RING isn't all THAT ugly
<mharris> <mharris> So, AGP and PCI should be special cased?
<mharris> <arjan> I'd assume AGP has the same posting rules for posting?
<mharris> <mharris> The problem doesn't seem to occur for AGP hardware
<mharris> <arjan> maybe CURRENT agp bridges don't do posting
<MrCooper> mharris: not sure about that
<MrCooper> mharris: there are random lockups on AGP after a couple hours
<mharris> <arjan> the read costs you a bit
<mharris> <arjan> but it's needed for correctness
<mharris> <arjan> leaving it out is invalid code
<mharris> <mharris> Coincidence?  Or possibly rarer bug in AGP case?
<mharris> <arjan> I'd have to read the agp spec for that
<mharris> <arjan> but I'd not be surprised if AGP has the same posting
rules


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to