Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2000 09:41:29 +0100
From:      Nicolas Souchu <nsouch@alcove.fr>
To:        Mike Smith <msmith@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: newbus question
Message-ID:  <20001221094129.A20285@wiliam.alcove-int>
In-Reply-To: <200012210552.eBL5qtc00510@mass.osd.bsdi.com>; from msmith@freebsd.org on Wed, Dec 20, 2000 at 09:52:55PM -0800
References:  <20001220174237.A18944@wiliam.alcove-int> <200012210552.eBL5qtc00510@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 20, 2000 at 09:52:55PM -0800, Mike Smith wrote:
> > If the vga driver was newbusified, should I attach my graphic card specific
> > driver to both the pci bus and the vga generic driver and let it
> > be initialised twice with two initialisation functions and only one
> > softc structure?
> 
> No, I don't think so.  If I understand what you're talking about, you 
> want to add some extra initialisation for a specific but otherwise 
> standard PCI VGA card, and you want to do this with a device driver which 
> "owns" the card.

Exactly.

> 
> The best way I can think of doing this is as follows:
> 
>  - Your driver should determine whether the VGA adapter is the "primary"
>    adapter.  Working this out may be a little tricky.

As a first cut, I would consider it as the only card. But yes, I should
take this into account.

> 
>  - In your attach routine (not in the probe routine, since you may not 
>    actually win the probe bidding), add extra resources to the device_t 
>    which match the "legacy" VGA resources, so that you claim exclusive
>    ownership of these resources.  You can do this with bus_set_resource.

Can I claim ISA resources while in a PCI probe? Resources are bus dependent
like the bus_xxx_resource() functions.

In fact, I want to add the linear buffer configuration trick for some S3 cards
which have linear frame buffering support but *only* 1.2 VESA. It uses some
extra ISA ports just after the standard VGA ones.

For this, I was thinking of newbusifying vga / vesa and fb and attach
my S3 trick to pci and vga. VGA would be a child of isa_vga, as currently,
vesa a child of VGA and fb a child of VESA and VGA. Of course in a VESA+VGA
configuration there would be two fb... one with vesa support, one without.

But this would make the hypothesis that the PCI probe is made before the ISA.
Which may not be the case (I don't know). As a matter of fact, the vga_S3
trick shall only be activated only if the PCI board is present.

I'm a bit confused with the current architecture of the VGA/VESA/FB drivers.
They call each other and not always in the same direction. Espacially the
FB and VGA. Should we have the VGA driver as a backend of the FB one?
Eventually with VESA between them.

Tell me if I'm wrong.

Nicholas

-- 
Nicolas.Souchu@alcove.fr
Alcôve - Open Source Software Engineer - http://www.alcove.fr


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001221094129.A20285>