PCI Subsystem Rework for X.org 7.1 Proposal
Jesse Barnes
jbarnes at virtuousgeek.org
Fri Feb 3 09:32:30 PST 2006
On Thursday, February 2, 2006 5:39 pm, David S. Miller wrote:
> 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.
Yeah, but not all platforms support it.
> I'm surprised the sysfs stuff didn't obtain similar functionality.
sysfs doesn't have ioctl so when I implemented support there I wasn't
quite sure how to go about it. I didn't like the idea of providing
multiple files, but maybe that would be a good way to go. But
madvise(2) might be even better.
Jesse
More information about the xorg
mailing list