Thread (3 messages) 3 messages, 2 authors, 2009-05-20

Re: [PATCH 2/2] viafb: use proper pci config API

From: Harald Welte <hidden>
Date: 2009-05-20 02:28:05

On Tue, May 19, 2009 at 11:24:27PM +0200, Krzysztof Helt wrote:
On Tue, 19 May 2009 16:35:34 +0800
Harald Welte [off-list ref] wrote:
quoted
This patch alters viafb to use the proper Linux in-kernel API to access
PCI configuration space, rather than poking at I/O ports by itself.

It also removes a minor inconsistency with naming of constants for the
PCI device ID of the FUNCTION3 devices.

Signed-off-by: Harald Welte <redacted>
Can  you pass the pdev pointer from the probe function
here and skip the whole searching of the PCI device?
No.  The FUNCTION3 device that we're searching is the SDRAM controller
function integrated in the north bridge, not the integrated graphics.

Only the PCI config space of the SDRAM controller contains the information
about the size of the graphics memory.

I was thinking of a 1:1 mapping between <pci device id for the graphics> : <pci
device id for FUNCTION3>, but I'm not entirely sure if this is always correct
or if there is some hardware that has the ID of one SDRAM controller and a
different integrated graphics chipet, especially in legacy products.

So for that reason I decided not to change the logic for searching the
FUNCTION3, merely altering the pci config space access function.

Regards,
-- 
- Harald Welte [off-list ref]	    http://linux.via.com.tw/
============================================================================
VIA Open Source Liaison

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help