VGA Arbiter

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Oct 26 20:11:59 PDT 2007


On Fri, 2007-10-26 at 19:39 -0700, Keith Packard wrote:
> On Sat, 2007-10-27 at 11:35 +1000, Benjamin Herrenschmidt wrote:
> 
> > The interface was something I quickly threw together, it doesn't
> > necessarily have to be that way. In fact, I wonder if a sysfs file might
> > be better. Anyway, it's good to have a proof of concept to work from.
> 
> Does this have to be visible from user mode at all? With kernel mode
> modesetting and graphics access, would it not be better to just provide
> this as a library to the internal graphics drivers and avoid exposing it
> to user mode?

Well, it does have an in-kernel API. I did the user API so we can use it
soonish for X + pci-rework by hooking the X arbiter to it, so that all
the drivers that have not been ported to kernel modesetting work (which
is quite a few of them at this stage :-)

> > This is important because you cannot reliably use interrupts for
> > example, like the DRM does on these, if your MMIO decoding can be
> > switched off by another cards driver trying to get to its own legacy IOs
> > or memory space.
> 
> With the arbitrartion handled from within the kernel, I'm wondering if
> we can't make even interrupts work...

I think I thought about it. There are locking issues though. I'll have
to dbl check what I came up with back then. However, I'd rather avoid
it. It's much better to just take yourself out of the arbitration after
you have done what you have to do with the legacy VGA registers so you
stay undisturbed by whatever other cards do. All not totally mummified
video cards can be totally driven off pure remapped MMIO after a bit of
initial fiddling afaik.

Ben.





More information about the xorg mailing list