Greetings, Question: What would be the way for a driver to flush some data in the CPU write cache, preferably all the way down to physical memory through the memory controller, but at least to the memory controller?
Background: I'm trying to add XAA color-expansion blit support to the i8xx driver. The hardware limitation dictates that the indirect (one- line-at-once) mode should be used. In order to do this, the driver lets the XAA common layer know the address of interim buffers, let them be filled, then issues the actual blit command to the i8xx hardware which reads and uses the buffer filled by the XAA common layer. The interim buffer is allocated in the video memory mapped into the AGP aperture. The problem is that the aperture has write-combining turned on so that not all writes go directly back to memory, and this makes it possible that some data written by the XAA common layer is not flushed out of CPU-internal write cache and seen by the memory/graphics controller. Result: incomplete blit. So far, it seems that I have to use some x86 assembler instruction like CLCACHE (we can always assume a Pentium II or better processor, because the driver is for i8xx chipset =p), but I'd like to know if there are more elegant solutions. WBINVD seems impractical because 1) it flushes the entire cache so the performance penalty will be obvious and 2) WBINVD is a privileged instruction so we must to switch to kernel mode before we can use it (means even more performance penalty). Could anyone shed a light on this? Thanks, Eugene _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert