Re: [PATCH] Provide control of active VGA device on PCI systems
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-02-20 08:24:18
On Sun, 2005-02-20 at 00:50 -0500, Jon Smirl wrote:
This patch adds a 'vga' attribute to each framebuffer device on PCI systems. For non-PCI hardware it does nothing. If you have multiple VGA cards loaded, and you have framebuffer drivers loaded for each, you can then set 0/1 into the VGA attributes to move VGA console around to the different screens. This is almost everything needed to implement reset of secondary cards. ROM access is already in the kernel. This code is needed to make sure you don't end up with multiple VGA devices enabled. All that is left is to construct the proper hotplug event and fix up my user space reset program.
HI Jon ! Looks good, but in the grand scheme of thing, it would be nice to extend the functionality to more than just userspace reset: that is proper arbitration of VGA access between X, vgacon, etc... (The goal is to have X stop messing around with PCI at all, just probe things via sysfs or whatever new model we might provide, but not actually play with PCI resources directly nor modify bridge VGA enables, and have it properly arbitrate with anything else wanting to use the VGA IOs, including kernel services like vgacon). That would require at least a kernel-side API in addition to the userland one you are proposing, plus eventually some arbitration between clients... I have no time at the moment to help you there unfortunately, and I don't yet have a clear idea of what kind of API to provide for the actual ownership control, maybe something like the DRM lock ? Ben. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click