Intel video driver question - cards second function
Jedrzej Solecki
jedrzej.solecki at student.put.poznan.pl
Sat Sep 15 10:21:39 PDT 2007
Hello,
I am reading the xfree86 video Intel driver source code and I have one
question (maybe stupid - I'm just a newbie:)).
I am asking about this piece of code (src/i810_driver.c:I810Probe()):
/*
* Mobile platforms may have both function 0 and 1 active, but they
* are handled as a single entity. To make sure that the function 1
* entity isn't assigned to a screen, check for and claim it here
* first.
*
* XXX If function 1's resources are ever needed, they'll need to be
* added to the screen and marked active.
*/
for (ppPci = VideoInfo; ppPci != NULL && *ppPci != NULL; ppPci++) {
if ((*ppPci)->vendor == PCI_VENDOR_INTEL &&
(*ppPci)->func == 1) {
for (id = I810PciChipsets; id->PCIid != -1; id++) {
if (id->PCIid == (*ppPci)->chipType) {
/* Claim slot */
if (xf86CheckPciSlot((*ppPci)->bus, (*ppPci)->device,
(*ppPci)->func)) {
xf86ClaimPciSlot((*ppPci)->bus, (*ppPci)->device,
(*ppPci)->func, drv, id->PCIid,
NULL, FALSE);
}
break;
}
}
}
}
I have a notebook with the 945GM controller with active functions 0
and 1. I would like to ask if this code:
/* Claim slot */
if (xf86CheckPciSlot((*ppPci)->bus, (*ppPci)->device,
(*ppPci)->func)) {
xf86ClaimPciSlot((*ppPci)->bus, (*ppPci)->device,
(*ppPci)->func, drv, id->PCIid,
NULL, FALSE);
should be executed in this case.
If yes then something is wrong because it doesn't:)
With the first function (PCI:0:2:0) this condition:
(*ppPci)->func == 1)
is not met and that's OK.
For the second funtion (1) this condition:
if (id->PCIid == (*ppPci)->chipType)
is never met because I810PciChipsets does not contain the
"(*ppPci)->chipType" value. There is only "PCI_CHIP_I945_GM
0x27A2" defined in the common.h .
But the second function's (PCI:0:2:1) chipType value is 0x27A6 which
is not defined in the common.h.
I would like to ask if this is not there on purpose and I
misunderstood this part of code or if there is something wrong:)
lspci -n:
00:02.0 0300: 8086:27a2 (rev 03)
00:02.1 0380: 8086:27a6 (rev 03)
Jedrek
More information about the xorg
mailing list