libpciaccess MTRR splitting

Francisco Jerez currojerez at riseup.net
Fri Feb 6 16:41:07 PST 2009


Francisco Jerez <currojerez at riseup.net> writes:

> 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.
>

I've added to it some doxygen blocks. Patch for git-am attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Linux-Split-misaligned-MTRR-ranges.patch
Type: text/x-diff
Size: 6278 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090207/107b152f/attachment-0001.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-devel/attachments/20090207/107b152f/attachment-0001.pgp 


More information about the xorg-devel mailing list