Re: Patch to control VGA bus routing and active VGA device.

From: Jon Smirl
Date: Sat Jan 22 2005 - 14:06:38 EST


On Tue, 18 Jan 2005 13:06:03 -0800, Jesse Barnes <jbarnes@xxxxxxxxxxxx> wrote:
> On Tuesday, January 18, 2005 11:38 am, H. Peter Anvin wrote:
> > > On Monday, January 17, 2005 7:43 pm, Jon Smirl wrote:
> > > > Attached is a patch to control VGA bus routing and the active VGA
> > > > device. It works by adding sysfs attributes to bridge and VGA devices.
> > > > The bridge attribute is read only and indicates if the bridge is
> > > > routing VGA. The attribute on the device has four values:
> > >
> > > How is it supposed to work? Is VGA routing determined by the chipset?
> > > Is it separate from other legacy I/O and memory addresses?
> >
> > Yes, there are special control bits in any PCI bridge header for the
> > VGA ports.
>
> Well, not all of them, which is why I asked. Though obviously this patch will
> need some very platform specific bits at any rate.

What is a case of where the VGA forwarding bit isn't in the bridge
control? It's part of the PCI spec to have it.

There are two components to this, bus routing and card control. When
each VGA device is on it's own bus the card specific control code
isn't required. Instead you can control the active VGA by shutting
down the bus routing. It's only when you have multiple cards on the
same bus that you need the card specific control.

But the point of this code is to allow reset of secondary cards. After
resetting a secondary card it will be left as the active VGA device
instead of the boot one. This moves your console from screen to
screen. Instead I want to remember the active device, run reset, and
then restore the original console.

In my machine I have one PCI and one AGP card. Bus routing is
sufficient to choose between the two. Opteron systems with AGP cards
on local buses can also use this code. Another example is where the
primary VGA device is on AGP and there are multiple PCI cards. You
just want all of the PCI VGA devices turned off.

We ultimately need both pieces of code, VGA bus routing, and card
specific VGA enabling code. Even without the card specific code the
routing code is still useful.

--
Jon Smirl
jonsmirl@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/