Subject: Re: ET4000 questions
To: NetBSD port-atari mailing list <port-atari@NetBSD.ORG>
From: Thomas Gerner <thomas@murmel.camelot.de>
List: port-atari
Date: 03/12/1998 19:07:52
On Thu, Mar 12, 1998 at 04:31:46PM +0000, Julian Coleman wrote:
> Concerning the kernel ET4000 initialisation ...
> ... Leo Weppelman wrote:
> L> Yes, I'm currently running with a modified driver. I can't find my VGA
> L> docs right know, so I don't know if this setting makes sense on the PCI-bus.
> 
> ... Thomas Gerner wrote:
> T> Don't know, I first must try this. This may take a while. May be it will
> T> affect the behavier of the et4000w32. But normally no one does chip
> T> version depending things in a general manner. Better one gets the
> T> chip version during the probe and then write something like:
> T>    if (et4chipversion == ET4000W32) {
> T>        do_the_right_thing
> T>    }
> T>    if (et4chipversion == ET4000) {
> T>        do_the_right_thing
> T>    }
> T> Look at the Xserver code how to get the chip version.
> 
> If it will make a difference, then there needs to be some way of knowing the
> bus type of the card.  Or can I do this just by looking at the type of card?
> Will there ever be a non-accelerated card on the PCI bus?  Perhaps an extra
> flag could added to the et_priv{} struct?  The routines could check whether
> the card was VME or PCI (or ... in the future?) and set 0xf3 or 0x73 as
> appropriate.  I wouldn't have thought this bit would matter on the PCI bus,
> - as the code stands, it sets the card I/O to be 8 bit - but I'm not sure
> what _really_ happens.

I really think it is better to do things on chip version. It is true, that
there is currently no plain et4000 card for the PCI bus (at least I don't
know any), but there are et6000 cards, which are most compatible to the
et4000, but some things must be done in a different way. If we one day add
support for et6000 it would be nice if many things are already done. Doing
things depending on chip version is really better than doing on bus type.

> Concerning the X server ...
> ... Leo Weppelman wrote:
> L> Is this something specific to a specific to the chipset/card combination?
> L> If you can determine that you are not talking to a W32P_[ABCD], but to
> L> a VME version of the card, this shouldn't be a problem. If I remember
> L> correctly, there was quite some card detect logic in the Xserver.
> 
> ... Thomas Gerner wrote:
> T> Don't know, must first try. But here is the same as I wrote above.
> T> 
> T> The XFree Source 3.3.1, on which the xsrc tree is based, uses currently a
> T> accelerater interface at the SVGA server. Do you uses this interface? The
> T> et4000w32 SVGA server will sure use this.
> 
> This is indeed a similar problem.  However, I think there is less latitude
> to change things if the eventual goal is to get the patches into the main
> X tree.  Again, if I do this for all ET4000 (non W32) cards, is this OK?

Yes, I think this is OK,

> Also, the X server does do a PCI probe - does this work on the Hades or
> does it fall back to determining the card type by probing?  If it finds
> the card by looking on the PCI bus, I could use this to determine whether
> or not to write to iobase+0x00.

Currently the X server does no PCI probe, because there is no interface
in NetBSD Atari which would allow this. As far as I remember the XFree
PCI probe works in a manner that the server access the PCI config register.
Better is using a way "if (et4chipversion == ....", you know. This is the
way the XFree driver do things and we really should do it in the same
way.

Thomas