On 5/25/06, Jeff Garzik <jeff@xxxxxxxxxx> wrote:* Review Dave Airlie's posts, he's been pretty spot-on in this thread.
There needs to be a lowlevel driver that handles PCI functionality, and
registers itself with the fbdev and DRM layers. The fbdev/DRM
registrations need to be aware of each other. Once that is done, work
will proceed more rapidly.
Controlling which driver is bound to the hardware is an easy problem
that a low level driver handles nicely. But controlling binding
doesn't really fix anything. All of the drivers binding to it still
have to duplicate all of the code for things like VRAM allocation, GPU
start/stop, mode setting, etc. That's because the second level drivers
can't count on the other drivers being loaded. The giant mess of whose
state is loaded into the hardware still exists too. Just consider the
simple problem of who EOI's an interrupt.
I would instead start by making fbdev the low level driver. DRM could
then bind to it and redundant code in DRM could be removed. 90% of the
code in fbdev is always needed. Hopefully X could be convinced to use
the services offered by the fbdev/DRM pair. New memory management code
would be added to this base driver since everyone needs it. Fbdev
would also pick up the ability to reset secondary cards at boot.