VGA Arbiter
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Oct 26 21:12:32 PDT 2007
Ok, I had a look at my old code and I'm wondering how it works as a
module since you need to have the PCI code call
vga_arbiter_add_pci_device()
and
vga_arbiter_del_pci_device()
For it to register VGA devices.
Now, the good news is that I recently added to the generic device core a
notifier to be notified of devices being added/removed (and drivers
being bound/unbound as well) for a given bus type.
Look at bus_{un}register_notifier() in linux/device.h
You can register a notifier on pci_bus_type, and react to the messages
BUS_NOTIFY_ADD_DEVICE and BUS_NOTIFY_DEL_DEVICE. You can then cast the
struct device * argument to a pci device with to_pci_dev()
Ben.
More information about the xorg
mailing list