<br><br><div><span class="gmail_quote">On 11/16/07, <b class="gmail_sendername">David Nusinow</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Stephane,<br><br>On Thu, Nov 15, 2007 at 06:23:23PM +0100, Stephane Marchesin wrote:<br>> On 11/15/07, David Nusinow <dnusinow@<a href="http://speakeasy.net">speakeasy.net</a>> wrote:<br>><br>> Hi all,
<br>> The attached patch uses the symbols in the pci-reworked drivers to<br>> determine the correct video driver to load when none is specified by the<br>> config file. Before committing it though, I'd like some advice about
<br>> certain aspects I'm not happy about:<br>><br>> Hi,<br>><br>> Actually, I don't think it's so much a good idea. It makes sense for the<br>> drivers to move away from long, hard to maintain, pci id lists, and use
<br>> smarter card detection. So that won't work in this case. FWIW we're doing<br>> that already.<br><br>How do you envision doing this? I haven't seen any code in the server to<br>allow this yet. I could see it working if the drivers provided hooks for
<br>the server to allow them to scan for themselves (perhaps the probe function<br>would be sufficient) but the issue that I see is that most distros install<br>every driver available by default. If the server has to allow each driver
<br>to scan for appropriate cards at startup, I'd imagine this would slow<br>things up quite a bit. Do you have a very different solution in mind?</blockquote><div><br>Xorg lets you examine the devices on startup. You just have to figure out what's yours and what you can support (in our case, that requires figuring out if the card is a vga device, and if so mapping a couple of regs temporarily to figure out the card family).
<br><br>The net gain from this approach is that we don't have to maintain a pciid list any more, and we can also support future cards of the same generation out of the box. Asking the card directly for its ID also saves the day in the case of bridged cards, and avoids nasty hacks for those.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The issue I'm trying to address is that pretty much any distro that tries
<br>to ship a xorg.conf spends a lot of effort figuring out which driver to<br>load. I'd like to move that logic all upstream, to the server, drivers,<br>hal, or whatever else. The pci-rework stuff, afaik, did have this model in
<br>mind, and it's essentially based off the linux kernel. I agree that the pci<br>id's are a pain to manage, so something else might be better, and I'd be<br>happy to work on that, but I don't really understand what you have in mind.
</blockquote><div><br>It can also be done without PCI-rework, but it's surely cleaner with it. <br><br>Look for the nvprobe function :<br><a href="http://cgit.freedesktop.org/nouveau/xf86-video-nouveau/tree/src/nv_driver.c">