PCI Subsystem Rework for X.org 7.1 Proposal

David S. Miller davem at davemloft.net
Thu Feb 2 17:39:24 PST 2006


From: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Thu, 2 Feb 2006 16:31:13 -0800

> One thing that X has done poorly in the past (and at least some kernels 
> haven't helped much with their poor interfaces) is map memory with the 
> appropriate attributes.  The current sysfs mapping interface in Linux 
> assumes the user wants to do an uncacheable mapping, but in the case of 
> frame buffers and some other types of memory, you probably want to map 
> it with write combining or caching somehow.  I'm not sure if this should 
> happen automatically in some cases (e.g. a special pci_map_framebuffer 
> or pci_map_cacheable call) or if the mapping routine should take an 
> arbitrary flags argument (which could be abused).

The /proc/bus/pci/${DOMAIN}:${BUS}/* mmap() scheme allows you to set
"PCIIOC_WRITE_COMBINE" in the fd via ioctl() before mmap() in order to
achieve this.

I'm surprised the sysfs stuff didn't obtain similar functionality.



More information about the xorg mailing list