On Mon, 2003-03-03 at 07:43, Philip Brown wrote: > Could someone explain what exactly DRM_READMEMORYBARRIER is supposed to do, > in the kernel driver level, please? > > I was initially thinking that it did some kind of > "enable bus memory mapping" OS call. > However, it is used inconsistently. > > mga_drv.h and radeon_drv.h use it , each at only one place in the code. > > mga seems to use it consistently before all DRM_READ8() type calls, > via an inline func _MGA_READ() > > > However, radeon_drv.h only uses it before the READ8 call in > COMMIT_RING() > > [and radeon is consistent in lots of other ways, too. > Some places it uses RADEON_READ(), other places, DRM_READ32(). > Maybe this is the cause of some of the radeon problems?]
No. Basically, RADEON_READ() is for chip register reads, DRM_READ32 for reading little endian words from PCI space. If you care to look up the definition of RADEON_READ() though, you see that it uses DRM_READ32(). > Besides which, DRM(ioremap) seems to do the *actual* mapping to kernel > space.... which still leaves the question of, what does > DRM_READMEMORYBARRIER() do? As the name says, it issues a memory barrier. :) It prevents the compiler or CPU from reordering memory access beyond the barrier. -- 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:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel