Index: [thread] [date] [subject] [author]
  From: Jos Hulzink <josh@stack.nl>
  To  : Brian S. Julin <bri@tull.umassp.edu>
  Date: Fri, 13 Aug 1999 12:40:41 +0200 (CEST)

Re: GGI and XFree86 and stuff

On Thu, 12 Aug 1999, Brian S. Julin wrote:

> On Thu, 12 Aug 1999, Jos Hulzink wrote:
> > We discussed this before. Trying to see all S3 cards as one big family is
> > not done, for the chips differ far too much, so it would make the code
> > unreadable. 
> > 
> > Besides, you would not do me a pleasure if you start writing yet 
> > another ViRGE driver. I already got the idea my job is useless for the big
> > kernel guys still don't seem to understand the joy of KGI / GGI. Can't we
> > just write one driver for many chips instead of making many drivers for
> > the one chip ?
> 
> Might I suggest a compromise... Jos breaks out the less Virge-specific parts of
> his driver (chip ID, MMIO region select) into separate files that other
> S3 driver modules can include, and there be one main file for each major
> S3 family.  Maybe Jos would care to say what he sees those major families
> as being.  There's probably a good balance point between code readability
> and code duplication to be found.
> 
> Especially chip ID and common register defs should not be duplicated.
> It isn't functional, but see the wd90cxx source for an example of that.

Problem is that the ViRGE chipset is a "just hack a little around and hope
it will work" chipset. The trick is that (see XFree code) for the ViRGE VX
some registers must be set at strange moments, the DX must be booted in IO
instead of MMIO, the ViRGE crashes if registers are written in the right
order for ViRGE DX, etc. Many S3 register definitions are not right for
Virge, some ViRGE definitions are not right for ViRGE VX. When I look
thorugh the code, I think the only part that is portable is the clock
driver and the code that sets the basic resolution (11 registers out of
70). Even the "compatible" Trio64 gives trouble...

But if you want me to I'll make the code exportable, don't blame me
if it doesn't work. 

Jos

Index: [thread] [date] [subject] [author]