--- Dave Airlie <[EMAIL PROTECTED]> wrote:
> > the Linux probe failed did I fallback to the manual scheme. A parallel
> method
> > could be used on BSD. The only reason you need the manual scheme is if FB is
> > already loaded and has the PCI ID registered.
> >
> > You want to use the kernel probe scheme first. If the kernel probe suceeds
> it
> > will mark the hardware in use. The fallback scheme is a trick to use the
> > hardware without informing the kernel.
> 
> yes but it is also the current behaviour and changing it in a stable
> kernel series is probably not acceptable... I know I wouldnt :-)

I don't view this as changing the behavior, no program or user will ever be able
to tell the difference. Use the probe method from the kernel first. If FB is not
loaded it will work. If the kernel probes a DRM device increment a count. Kernel
probing will automatically mark the device in use. To make this work you just
need the PCI ID tables in a form you can handle to the kernel.

If the count is zero then FB is loaded. The count will be zero since FB has
already reserved the PC IDs for the DRM devices. If the device is marked in use
the kernel won't probe it again (like it should since the kernel is sane is only
supports one driver per device). In that case fallback to steath mode and run
the list of PC IDs manually like the existing code does.

The only way this fails is for the case of two PCI cards of the identical
hardware. In this case FB will load on the first and not on the second and mess
up the count scheme. All that will happen is that both cards end up in stealth
mode and the second one is not marked in use. This is a flaw in FB not a problem
in DRM. Things will still work but if you want to fix it, unload FB. 

You have to implement the kernel probe scheme if you want to implement hotplug.
Hotplug works by loading the driver and getting access to the PCI IDs it
supports. If no applicable cards are in the system the driver just sits there.
Later when the card is plugged in the PCI ID lists are scanned to find the right
driver. The current drivers don't pass the kernel a PCI ID list so they can't
hotplug.

The patch I posted implemented fixes for all of this. 



=====
Jon Smirl
[EMAIL PROTECTED]


        
                
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to