VGA arbitration: API proposal

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Mar 6 14:17:55 PST 2005


On Sun, 2005-03-06 at 16:57 -0500, Jon Smirl wrote:
> Does it make sense to work towards the goal of eliminating VGA use (if
> hardware allows) except for early boot and system recovery?

Yes. We already pretty much don't use it on ATI. I added an option to
recent X.org to remove the remaining bits in ATI. For nVidia, I think
they use the VGA CRTC registers for mode settings, but they are remapped
somewhere in MMIO space (correct me if I'm wrong here), so they use the
vgahw library but not the legacy VGA IOs.

> For example, current ATI/Nvidia/Intel hardware can completely disable
> VGA. But most x86 users boot with these cards using VGAcon. Could we
> fix things so that fbcon would automatically be used for these cards
> instead of VGAcon?

Well, I'd rather keep vgacon the default or at least a valid option for
now. There are still issues with fbcon/fbdev, from monitor detection not
always working as expected, to bugs in the drivers or drivers not
handling very recent chips ...

I think we can just move on with a proper arbiter, and have vgacon use
it. That would work, and keep us compatible with old stuff.

> I might even take this one step further and eliminate VGAcon as
> something that loads automatically. Instead I would require every
> video card to load a fbdev driver. One fbdev driver would be for VGA
> devices. It would support a single instance only. This fbdev VGA
> driver could probably work with fbcon, allowing VGAcon to be
> eliminated.

Not realistic yet unfortunately. We must first have a set of fully
working drivers that are good enough before we even think about getting
rid of vgacon.

> The new model would be something like this:
> 1) all video cards need a driver
> 2) one fbdev driver is a generic VGA one, it is exclusive
> 3) cards that can work without VGA have their own drivers
> 4) everyone shares fbcon
> 5) VGAcon is still around but if loaded fbdev drivers will refuse to
> load, force VGAcon use at boot time with kernel parameter vgacon=yes.
> 
> Driver #2 implements Ben's locking scheme.
> Driver #2 can shut down long enough to post type #3 cards
> If a Driver #3 has to use VGA ports (hopefully none do) the locking is in-place
> Jesse can relax the exclusive rule on IA64 to one per bus
> 
-- 
Benjamin Herrenschmidt <benh at kernel.crashing.org>




More information about the xorg mailing list