On Wed, 2009-01-28 at 13:34 +0100, Thomas Hellström wrote: > Dave Airlie wrote: > > On Wed, 28 Jan 2009, Shunichi Fuji wrote: > > > >> BTW using Write-Combining for ring-buffer is safe? > >> I afraid a bit that miss ordered. > >> > > > > Yes it should be fine, write combining shouldn't re-order, > > and its been write combined using an mtrr for years. > > > > > Actually, I think it may re-order, so WC buffers need to be flushed with > an mb() before > updating registers or pointers that depend on data being present in memory.
Yeah, we were over this years ago. :) The radeon COMMIT_RING() macro takes care of this: /* Flush writes to ring */ \ DRM_MEMORYBARRIER(); \ GET_RING_HEAD( dev_priv ); \ RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv->ring.tail ); \ /* read from PCI bus to ensure correct posting */ \ RADEON_READ( RADEON_CP_RB_RPTR ); \ -- Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel