From: Matan Ziv-Av (matan@svgalib.org)
Date: Thu 28 Jun 2001 - 19:24:13 IDT
On Thu, 28 Jun 2001, Mihai Cartoaje wrote:
> > In some mystique revisions the mmio and fb regions (in pci) are
> > reversed, so if you can send to me the output of lspci -vv -n it might
> > help.
>
> Your guess is correct. My friend's card had the register mapping in the primary
> aperture, and the video array in the second. Your driver assumes the reverse.
So does the driver work, after you replaced the apertures' meaning?
> Since the documentation on Matrox's website writes that the register mapping is
> in the primary aperture, I am amazed that your driver worked on any card.
It works on mine :-)
Actually, I read the document which says it is reversed, but apparently
there are a few revisions of the 1064. Here's from XFree86's driver:
/*
* For the 2064 and older rev 1064, base0 is the MMIO and base0 is
* the framebuffer is base1. Let the config file override these.
*/
> The best Icould think of until now is to test the size of the aperture, and
> assume it is register if it is small. But I have not read the specs in detail
> yet.
This is not easy, since the kernel does not export this information to
user space.
What I do now (will be in 1.9.11) is check which aperture is
prefetchable (fb) and which is non-prefetchable (mmio). But even this is
not 100%, since the matrox documentation says that the fb aperture might
be non-prefetchable as well.
> There is a non-zero probability I will fix it and post a patch on the mailing
> list.
You will need to play with the svgalib_helepr module for this.
I can see two more ways to distinguish:
- Trying to write an address that is read only in mmio, and see if it
changes.
- Checking the 1064 revision. (But I don't which revisions have which
mapping).
--
Matan Ziv-Av. matan@svgalib.org
------------------------------------------------------------------
Unsubscribe: To: listbot@svgalib.org
Body: unsubscribe linux-svgalib
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST