On Mon, 13 Sep 2004 02:11:52 +0200, Simon 'corecode' Schubert
<[EMAIL PROTECTED]> wrote:
> pci_request_regions() seems to allocate all possible IO and mem regions
> defined in the PCI BARs. I understand that putting this code in
> drm_probe presents an easy way to get the reservations, although I have
> some concerns:
> 
> What if the card/driver in effect doesn't use all regions? Maybe using
> pci_request_regions() is the way to go in linux, then please forget
> this inquiry. In the (few) BSD kernel PCI driver code I've seen, they
> all reserve exactly the range(s) they need, not all ranges covered by
> the BARs (though this could of course be the same).
> 
> Wouldn't it be better/cleaner/more work to have each specific driver to
> request exactly the regions it wants to use?

Reserving everything goes with the one device/one driver mentality.
The code only reserves resources for a specific PCI function, it won't
reserve resources from the other functions on a multi-function PCI
card. For example on the radeon it only reserves the resources of the
first device, not the secondary one.

What would be an example of a card where reserving everything causes a problem?

-- 
Jon Smirl
[EMAIL PROTECTED]


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to