The problem of handling caches for I/O also hit Sparc and 68k. Since they
however donīt share drivers with the mainstream hardware this has so far
not been solved.
> what shouldn't be needed? turning off caching for a mapped frame buffer ?
> or did I miss your point ?
Check the code that disables caching. Itīs a real #ifdef hack for certain
chipsets. The other
> how would you guarantee data/display integrity (esp. for WB cache) if you're
> changing the frame buffer sometimes by direct access to the frame buffer by the CPU
> and sometimes by using the graphics engine ? otherwise you'd have to flush the cache
> for very cpu <-> graphics engine tansition
You have two options:
Writeback the caches whenever you want to synchronize the device memory
and the caches. This is preferable because itīs fastest.
Or disable caching by hardware or pagetables. This may be slow because
you loose the cache advantage of write combining.
Actually the right thing to do is configuration dependand but almost
always #1 is the right thing to do.
What we need is some kind of extension to the Linux device driver interface
for handling the caches correctly. Iīll try to present something
as soon as I find the time ...
Ralf