Re: [PATCH] Provide control of active VGA device on PCI systems
flat view
From: James Simmons <hidden>
Date: 2005-02-22 04:07:30
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.
This is not a bad patch but could you please merge that code into vgastate.c and uses the vga io functions in include/video/vga.h This way drivers can choose to link to the vga functions themselves. The bonus is there is code in vgastate.c to save the state and restore the vga text state with a fbdev device. You can for example with the NVIDIA fbdev driver load it and do a open on /dev/fbX and it will go to the graphics state. On the last close of /dev/fbX it will go back to the vga text state it was in before the first open. With your code it would make it even more functional. ------------------------------------------------------- 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