From: Egbert E. <ei...@pd...> - 2004-05-11 18:51:01
|
Alan Cox writes: > On Llu, 2004-05-10 at 12:46, Egbert Eich wrote: > > Yes, we will most likely need OS dependent non-chipset specific wrappers, > > but those are cheap to do - a lot cheaper than code dealing directly > > with chipset quirks. > > Well the minimal kernel side stuff required to make hot plug work > is going to be > > - Use the kernel to do PCI stuff (esp VGA_EN !) > - Map PCI objects (video ram, registers, etc) from files that allow > the kernel to know what PCI device is in use > - Handle the device vanishing rudely (ie polls for busy need to time > out etc) > > With frame buffers the ability to switch mode cleanly is helpful because > of two things > - SAK (Secure Attention Key) - need to get back to a sane mode > (Can be mostly done in user space) Provided your driver is able to set up a sane mode. This may not always be the case - regarddless where the driver lives. > - Panic/Crash cases > > Clean context switching also makes VT switch a lot neater Right. Admittedly the Xserver does a lot more HW banging than it ought to. All the resource management stuff that I've implemented in user space should really live inside the kernel. When I wrote most of the stuff 4-5 years ago there was simply no way to get this into the kernel. I was suggesting this however there was noone who was interested. Later it turned out to be very convenient to have it in user space. This way other OSes benefitted from this. > > AGP/3D obviously adds a ton more, but if you were simply wanting to get > hotplug friendly X working with a generic old 2D card very little is > needed kernel side > For the text console to be usable you possibly want to be able to 1. move the fb start address for scrolling 2. to do some basik 2D accel for fast text drawing Also your framebuffer may not be completely linear. (I'n not talking about VGA banking, but it seems like modern HW may not be able to map in all video memory at the same time). Egbert. |