On Wed, 11 Jul 2007 20:14:12 -0400 "Timothy Normand Miller" <[EMAIL PROTECTED]> wrote:
> On 7/11/07, Zan Lynx <[EMAIL PROTECTED]> wrote: > > I bet that it is the MTRR setting. > > Here is the MTRR from a system running an Nvidia card with the nv driver. > > $ cat /proc/mtrr > > reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1 > > reg01: base=0xf0000000 (3840MB), size= 64MB: write-combining, count=1 As already said, the MTRR setting is the most important. While setting it, be aware that there is only a limited number of MTRR's you can set. For a (more or less) formal guide on how to set up, please read http://www.mplayerhq.hu/DOCS/HTML/en/mtrr.html > > This is the line from the X log where it sets it up: > > (==) NV(0): Write-combining range (0xf0000000,0x4000000) > > > > Here's what I found deep in x.org: > > #if defined(__ia64__) || defined(__arm__) || defined(__s390__) > #ifndef MAP_WRITECOMBINED > #define MAP_WRITECOMBINED 0x00010000 > #endif > #ifndef MAP_NONCACHED > #define MAP_NONCACHED 0x00020000 > #endif > if(flags & VIDMEM_FRAMEBUFFER) > mapflags |= MAP_WRITECOMBINED; > else > mapflags |= MAP_NONCACHED; > #endif > > This is used on mmap. I'm going to try it. Whether this will work i have no idea. The manpage of mmap doesn't talk about it and there is no occurence of "WRITECOMBINED" in the system headers. As far as i have seen, the kernel only supports writecombining within the specialized device drivers. Though, i'd be surprised if it wouldn't be possible to switch it on for arbitrary locations. BTW: How do you map the card memory into user space? How do you exactly memcpy? (some code would be good) Also a way to speed up memcpy's would be to use specialized versions. Have a look at http://svn.mplayerhq.hu/mplayer/trunk/libvo/ aclib.c and aclib_template.c (yes, there is a special memcpy for agp that gains another 5% of performance) Attila Kinali -- Praised are the Fountains of Shelieth, the silver harp of the waters, But blest in my name forever this stream that stanched my thirst! -- Deed of Morred _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
