Kludge around linux bug and turn off write-through and cache-disable bits
authorKeith Packard <keithp@keithp.com>
Wed, 16 Apr 2008 19:10:52 +0000 (12:10 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 16 Apr 2008 19:11:18 +0000 (12:11 -0700)
commitb30d458202bc0304c705eb081b12ead860584bea
tree31b8ccbbc7680927cc668adc72206393423c135e
parenta3b63c43b960e3b37e1b303214e63c5155192a5d
Kludge around linux bug and turn off write-through and cache-disable bits

When mmaping the PCI device, the kernel turns on the write-through and
cache-disable bits in the allocated PTEs. This disables write-combining mode
and dramatically reduces write bandwidth to the frame buffer. While that
should be fixed in the kernel, we'll kludge around it here by using mprotect
to rewrite the PTEs and get those bits turned off.
src/linux_sysfs.c