libpciaccess MTRR splitting
Francisco Jerez
currojerez at riseup.net
Tue Feb 3 18:44:24 PST 2009
Hi.
Since I switched to libpciaccess, I've been seeing errors like:
> error setting MTRR (base = 0x14200000, size = 0x00800000, type = 1) Invalid argument (22)
It's because the GPU I'm using (a siliconmotion SM720) has a register
area at the beginning of the PCI BAR which shouldn't be set to WC, and
the remaining memory (the actual framebuffer) isn't aligned at a size
multiple.
I've been running a modified version of libpciaccess (diff attached)
that splits the memory range on properly aligned chunks before setting
the MTRRs.
If it turns out to be a reasonable approach, I'm willing to document
it more thoroughly and format it for git-am.
I've only implemented it for the linux_sysfs backend, but the logic at
pci_mapping_split is somewhat generic and another source file might be
better suited for it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtrr_splitting.patch
Type: text/x-diff
Size: 5563 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090204/3417c050/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090204/3417c050/attachment.pgp>
More information about the xorg
mailing list