[Linux-fbdev-devel] Re: Who is stomping PCI config space?

Egbert Eich eich at suse.de
Sat Mar 5 11:07:13 PST 2005


Benjamin Herrenschmidt writes:
 > On Fri, 2005-03-04 at 12:58 -0500, Jon Smirl wrote:
 > > In the past Jesse Barnes has suggested a completely different approach
 > > to VGA sharing. Instead of each VT trying to control which VGA device
 > > is enabled we keep them all turned off. Then on each access we turn
 > > VGA support on just long enough for the access and then turn it back
 > > off.
 > 
 > That's what I had in mind too.

If we can control this.
However if we can there is not much difference which apporach we take.

 > 
 > > To make this work we have to have a kernel based 'token' for who has
 > > the VGA at the moment. This scheme lets multiuser systems work. For
 > > big IA64 machines which can support multiple simultaneous VGAs we just
 > > have multiple tokens.
 > 
 > That means that the arbitrer must need to know how to enable/disable VGA
 > decoding on a per-card basis (when it's possible at all), or active
 > collaboration with the kernel driver. Also, you can't prevent the
 > interrupts from happening unless you also disable them on your card.
 > 
 > > We would just ban VGA access from interrupt context, if you really
 > > needed VGA access you would use a workqueue which can be scheduled
 > > from the interrupt. None of my driver work needs VGA access from
 > > interrupt context, is this true for all drivers? I need access to the
 > > video hardware, but not access to the VGA support.
 > 
 > It's not enough.
 > 
 > There is a variety of cases where the only way to turn off VGA access is
 > to turn off IO & MEM decoding completely on the card...

That's the apporach we took when we implemented this in X. 
It was the safest bet.

Egbert.



More information about the xorg mailing list