logo       

Re: XFree86 NVidia cached access: msg#00073

Subject: Re: XFree86 NVidia cached access
On Tue, Dec 16, 2003 at 06:45:24PM +0000, Peter Naulls wrote:
> Phil Blundell <pb@xxxxxxxxxxx> wrote:
> > on Tue, Dec 16, 2003 at 02:14:26PM +0000, Peter Naulls wrote:
> > > I have looked at the various mmap calls, and cannot see any particular
> > > reason for it.  In particular, using the slow framebuffer driver,
> > > access isn't cached.   There aren't any calls to mprotect, either,
> > > which might affect things.
> > 
> > Perhaps you could run the code under strace, capture the output,
> > and put it somewhere we can look at.
> 
> I have put up the most relevant parts:
> 
> http://www.chocky.org/linux/nvidia
> 
> Line 602 shows the I/O space mmap, and line 1131 et al show the output
> after accessing the I2C bus.

If anyone wants to guarantee uncached accesses while mmaping /dev/mem,
they must open /dev/mem with the O_SYNC flag.  I would suggest teaching
XFree to use this flag as appropriate, so that it always explicitly
tells the kernel the behaviour it expects.

That said, the kernel traditionally only mmaps mappings above the RAM
as uncached by default, and at or below the RAM as cached.  I suspect
your platform probably has the memory mapped at an address higher than
the devices.

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php



<Prev in Thread] Current Thread [Next in Thread>