VGA arbitration: API proposal

Alan Cox alan at lxorguk.ukuu.org.uk
Sat Mar 5 05:43:21 PST 2005


On Sad, 2005-03-05 at 04:46, Jon Smirl wrote:
> mark all drivers as VGA or not
> only allow a single card in the system that is marked as requiring VGA
> require fbdev/fbcon on the non-VGA cards

Why ?

> if there is a second VGA required card, print a big message and refuse to boot
> discourage any further writing of code that uses VGA

Doesn't work in the real world.

There is a fairly easy vga API for the kernel and I proposed pretty much
that with the vga class driver stuff I sent folks to play with.

All you actually need is

	/* Caller must ensure devices are VGA */
	vga_conflicts(struct pci_dev *card1, struct pci_dev *card2)
	vga_set_routing(struct pci_dev *card)

That is sufficient to encapsulate the low level wonders of the system.
PC
class devices have a vga_conflicts of "return 1" while the SGI's can do
smarter stuff. For most platforms vga_set_routing() becomes a pci
library call to shared code.

At the higher level there are some small complexities I can find no way
to hide, one of which is that if one VGA device is locked in use you
must be very very careful if and where you sleep waiting for VGA
control. The practicalities of multiple kernel side vga consoles for
example are unpleasant.

Alan




More information about the xorg mailing list