Initial version of PCI access library

Christoph Hellwig hch at lst.de
Mon Feb 20 10:53:48 PST 2006


On Mon, Feb 20, 2006 at 10:03:44AM -0800, Jesse Barnes wrote:
> 
> Internally, the server does an iteration scheme similar to what your 
> library provides (or at least some part of it did last time I looked, 
> Egbert can provide more details).  But I think the important thing is 
> the interface exposed to the drivers, and they typically just want to 
> bind to a device based on vendor and device ID (though maybe a small 
> survey of drivers is in order to make sure we provide the right 
> interfaces).  That's why in the initial thread about PCI access I 
> argued for a simpler device matching scheme, similar to the one Linux 
> provides to its drivers.

I think the most important thing about the driver interface is that
it should be a callback scheme where the core calls the driver for
every found devices instead of the driver calling some kind of iterator
code.  From experience with Linux kernel drivers the latter leads to
rather horrible spaghetti code, not to mention that such a scheme
doesn't work at all for dyanmic devices additions or removals.



More information about the xorg mailing list