tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: libpciaccess support for has_kernel_driver method

Christos Zoulas writes:
> In article <>,
> matthew green  <> wrote:
> >
> >hi folks.
> >
> >
> >something really nasty happens on drmkms kernels if the "vesa" xorg
> >driver is loaded.  they're not compatible and won't become that way.
> >
> >the way xf86-video-vesa handles this is by a libpciaccess call to
> >determine if the device has a kernel driver attached.  i've implemented
> >this below via 3 parts:
> >
> >     - new pciio.h ioctl to get driver name
> >
> >     - new libpci function to export this
> >
> >     - new libpciaccess code for has_kernel_driver method.  this
> >       code explicitly ignores "vga" driver as being bound, but
> >       any other name will work.
> >
> >each built on top of the other.  i've tested it both with drmkms
> >kernel and non-drmkms kernel, both with and without forcing vesa
> >driver to be used in xorg.conf, and it works as expected.
> >
> >
> >
> >
> >comments?  i'd like to get this in ASAP.
> LGTM... Is having a fixed size buffer ioctl better than passing the
> userland buffer and length to the kernel?

good question.  that fixed size has been in place for 20 years
and i'm not sure it will ever change, so i'm inclined to say
"not really".

also, Martin said:
> Wouldn't it be better to query the device properties for a "I am incompatible
> with DRM" property and have the vesa kernel driver set that explicitly?

i'm not sure.  your idea sounds slightly less-ugly, but the
current code can also make "pcictl list" show drivers attached
(i have code for this already), and could be used in lspci for
netbsd to make "lspci -v" show drivers (no code, i got lost
trying to figure it out so far.)

several other drivers also use this functionality, not that we
have kernel drivers for them..

thanks for looking!


Home | Main Index | Thread Index | Old Index