VGA arbitration: API proposal

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Mar 5 13:53:15 PST 2005


> 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.

What you propose would be the low level platform side. It is useful to
possibly do smart stuff, but not necessary per-se, we can start with a
generic implementation that assume that they all conflict, as long as we
have proper arbitration.

See also my note about devices that can be programmed to stop decoding
the legacy VGA space, in which case, they get out of the VGA conflict
story and can safely run at all time with interrupts etc...

Ben.




More information about the xorg mailing list