? log Index: src/ct_driver.c =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-chips/src/ct_driver.c,v retrieving revision 1.3 diff -u -r1.3 ct_driver.c --- src/ct_driver.c 7 Mar 2009 11:22:09 -0000 1.3 +++ src/ct_driver.c 30 Jun 2009 06:46:07 -0000 @@ -480,14 +480,14 @@ { PCI_VENDOR_CHIPSTECH, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } static const struct pci_id_match chips_device_match[] = { - CHIPS_DEVICE_MATCH(PCI_CHIP_65545, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65548, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65550, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65554, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65555, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_68554, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_69000, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_69030, 0), + CHIPS_DEVICE_MATCH(PCI_CHIP_65545, CHIPS_CT65545), + CHIPS_DEVICE_MATCH(PCI_CHIP_65548, CHIPS_CT65548), + CHIPS_DEVICE_MATCH(PCI_CHIP_65550, CHIPS_CT65550), + CHIPS_DEVICE_MATCH(PCI_CHIP_65554, CHIPS_CT65554), + CHIPS_DEVICE_MATCH(PCI_CHIP_65555, CHIPS_CT65555), + CHIPS_DEVICE_MATCH(PCI_CHIP_68554, CHIPS_CT68554), + CHIPS_DEVICE_MATCH(PCI_CHIP_69000, CHIPS_CT69000), + CHIPS_DEVICE_MATCH(PCI_CHIP_69030, CHIPS_CT69030), { 0, 0, 0 }, }; #endif @@ -813,7 +813,7 @@ if (!setupDone) { setupDone = TRUE; - xf86AddDriver(&CHIPS, module, 0); + xf86AddDriver(&CHIPS, module, HaveDriverFuncs); /* * Modules that this driver always requires can be loaded here @@ -900,7 +900,6 @@ intptr_t match_data) { ScrnInfoPtr pScrn = NULL; - EntityInfoPtr pEnt; CHIPSPtr cPtr; /* Allocate a ScrnInfoRec and claim the slot */ @@ -921,12 +920,16 @@ pScrn->FreeScreen = CHIPSFreeScreen; pScrn->ValidMode = CHIPSValidMode; + if (!CHIPSGetRec(pScrn)) { + return FALSE; + } + cPtr = CHIPSPTR(pScrn); + cPtr->Chipset = match_data; /* * For cards that can do dual head per entity, mark the entity * as sharable. */ - pEnt = xf86GetEntityInfo(entity_num); - if (pEnt->chipset == CHIPS_CT69030) { + if (match_data == CHIPS_CT69030) { CHIPSEntPtr cPtrEnt = NULL; DevUnion *pPriv; @@ -1202,7 +1205,11 @@ for (i = 0; inumEntities; i++) { cPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[i]); if (cPtr->pEnt->resources) return FALSE; - cPtr->Chipset = cPtr->pEnt->chipset; + /* If we are using libpciaccess this is already set in CHIPSPciProbe. + * If we are using something else we need to set it here. + */ + if (!cPtr->Chipset) + cPtr->Chipset = cPtr->pEnt->chipset; pScrn->chipset = (char *)xf86TokenToString(CHIPSChipsets, cPtr->pEnt->chipset); if ((cPtr->Chipset == CHIPS_CT64200) ||