[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-chips: Changes to 'upstream-unstable'



 man/chips.man   |    2 
 src/ct_driver.c |  148 +++++++-------------------------------------------------
 2 files changed, 21 insertions(+), 129 deletions(-)

New commits:
commit 722267e99012d0b8bbd7f22eaeac99e85bf48e0c
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Sun Jul 19 10:37:37 2009 +0200

    Fix PCI card probe and chipset detection.
    
    it appears that the chips&technologies X driver was partially broken
    during libpciaccess conversion. Thanks to the analysis by Marien Swart
    in bug #18122 and a similar fix by Mark Kettenis for the radeon
    driver.
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>

diff --git a/src/ct_driver.c b/src/ct_driver.c
index 6ecc89e..998c590 100644
--- a/src/ct_driver.c
+++ b/src/ct_driver.c
@@ -480,14 +480,14 @@ static DisplayModeRec ChipsNTSCMode = {
   { 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
@@ -722,7 +722,7 @@ chipsSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 
     if (!setupDone) {
 	setupDone = TRUE;
-        xf86AddDriver(&CHIPS, module, 0);
+        xf86AddDriver(&CHIPS, module, HaveDriverFuncs);
 
 	/*
 	 * Modules that this driver always requires can be loaded here
@@ -801,7 +801,6 @@ CHIPSPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
 	    intptr_t match_data)
 {
     ScrnInfoPtr pScrn = NULL;
-    EntityInfoPtr pEnt;
     CHIPSPtr cPtr;
 
     /* Allocate a ScrnInfoRec and claim the slot */
@@ -822,12 +821,16 @@ CHIPSPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
 	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;
 
@@ -1102,7 +1105,11 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
     for (i = 0; i<pScrn->numEntities; 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) ||

commit 6c6b0933da2fb08e0804647f736b0155909d6348
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu May 28 14:51:29 2009 -0400

    Remove useless loader symbol lists.

diff --git a/src/ct_driver.c b/src/ct_driver.c
index 4bc5e68..6ecc89e 100644
--- a/src/ct_driver.c
+++ b/src/ct_driver.c
@@ -691,97 +691,6 @@ static const OptionInfoRec ChipsHiQVOptions[] = {
     { -1,			NULL,		OPTV_NONE,	{0}, FALSE }
 };
 
-/*
- * List of symbols from other modules that this module references.  This
- * list is used to tell the loader that it is OK for symbols here to be
- * unresolved providing that it hasn't been told that they haven't been
- * told that they are essential via a call to xf86LoaderReqSymbols() or
- * xf86LoaderReqSymLists().  The purpose is this is to avoid warnings about
- * unresolved symbols that are not required.
- */
-
-static const char *vgahwSymbols[] = {
-    "vgaHWAllocDefaultRegs",
-    "vgaHWFreeHWRec",
-    "vgaHWGetHWRec",
-    "vgaHWGetIOBase",
-    "vgaHWGetIndex",
-    "vgaHWHBlankKGA",
-    "vgaHWInit",
-    "vgaHWLock",
-    "vgaHWMapMem",
-    "vgaHWProtect",
-    "vgaHWRestore",
-    "vgaHWSave",
-    "vgaHWUnlock",
-    "vgaHWVBlankKGA",
-    "vgaHWddc1SetSpeedWeak",
-    NULL
-};
-
-#ifdef XFree86LOADER
-static const char *miscfbSymbols[] = {
-#ifdef HAVE_XF1BPP
-    "xf1bppScreenInit",
-#endif
-#ifdef HAVE_XF4BPP
-    "xf4bppScreenInit",
-#endif
-    "cfb8_16ScreenInit",
-    NULL
-};
-#endif
-
-static const char *fbSymbols[] = {
-    "fbScreenInit",
-    "fbPictureInit",
-    NULL
-};
-
-static const char *xaaSymbols[] = {
-    "XAACreateInfoRec",
-    "XAADestroyInfoRec",
-    "XAAInit",
-    "XAAInitDualFramebufferOverlay",
-    "XAAStippleScanlineFuncMSBFirst",
-    NULL
-};
-
-static const char *ramdacSymbols[] = {
-    "xf86CreateCursorInfoRec",
-    "xf86DestroyCursorInfoRec",
-    "xf86InitCursor",
-    NULL
-};
-
-static const char *ddcSymbols[] = {
-    "xf86DoEDID_DDC1",
-    "xf86DoEDID_DDC2",
-    "xf86PrintEDID",
-    "xf86SetDDCproperties",
-    NULL
-};
-
-static const char *i2cSymbols[] = {
-    "xf86CreateI2CBusRec",
-    "xf86I2CBusInit",
-    "xf86I2CFindBus",
-    "xf86I2CProbeAddress",
-    NULL
-};
-
-static const char *shadowSymbols[] = {
-    "ShadowFBInit",
-    NULL
-};
-
-static const char *vbeSymbols[] = {
-    "VBEInit",
-    "vbeDoEDID",
-    "vbeFree",
-    NULL
-};
-
 #ifdef XFree86LOADER
 
 static MODULESETUPPROTO(chipsSetup);
@@ -821,14 +730,6 @@ chipsSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 	 */
 
 	/*
-	 * Tell the loader about symbols from other modules that this module
-	 * might refer to.
-	 */
-	LoaderRefSymLists(vgahwSymbols, miscfbSymbols, fbSymbols, xaaSymbols,
-			  ramdacSymbols, ddcSymbols, i2cSymbols,
-			  shadowSymbols, vbeSymbols, NULL);
-
-	/*
 	 * The return value must be non-NULL on success even though there
 	 * is no TearDownProc.
 	 */
@@ -1182,7 +1083,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
     /* The vgahw module should be loaded here when needed */
     if (!xf86LoadSubModule(pScrn, "vgahw"))
 	return FALSE;
-    xf86LoaderReqSymLists(vgahwSymbols, NULL);
 
     /* Allocate the ChipsRec driverPrivate */
     if (!CHIPSGetRec(pScrn)) {
@@ -1225,7 +1125,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 #if 0
     if (xf86LoadSubModule(pScrn, "int10")) {
  	xf86Int10InfoPtr pInt;
-	xf86LoaderReqSymLists(int10Symbols, NULL);
 #if 1
 	xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
 	pInt = xf86InitInt10(cPtr->pEnt->index);
@@ -1235,7 +1134,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 #endif
 
     if (xf86LoadSubModule(pScrn, "vbe")) {
-	xf86LoaderReqSymLists(vbeSymbols, NULL);
 	cPtr->pVbe =  VBEInit(NULL,cPtr->pEnt->index);
     }
     
@@ -1407,7 +1305,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	    CHIPSFreeRec(pScrn);
 	    return FALSE;
 	}	
-	xf86LoaderReqSymbols("xf1bppScreenInit", NULL);
 	break;
 #endif
 #ifdef HAVE_XF4BPP
@@ -1418,7 +1315,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	    CHIPSFreeRec(pScrn);
 	    return FALSE;
 	}	
-	xf86LoaderReqSymbols("xf4bppScreenInit", NULL);
 	break;
 #endif
     case 16:
@@ -1429,7 +1325,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	        CHIPSFreeRec(pScrn);
 		return FALSE;
 	    }	
-	    xf86LoaderReqSymbols("cfb8_16bppScreenInit", NULL);
 	    break;
 	}
     default:
@@ -1439,7 +1334,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	    CHIPSFreeRec(pScrn);
 	    return FALSE;
 	}	
-	xf86LoaderReqSymLists(fbSymbols, NULL);
 	break;
     }
     
@@ -1450,7 +1344,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	    CHIPSFreeRec(pScrn);
 	    return FALSE;
 	}
-	xf86LoaderReqSymLists(xaaSymbols, NULL);
     }
 
     if (cPtr->Flags & ChipsShadowFB) {
@@ -1460,7 +1353,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	    CHIPSFreeRec(pScrn);
 	    return FALSE;
 	}
-	xf86LoaderReqSymLists(shadowSymbols, NULL);
     }
     
     if (cPtr->Accel.UseHWCursor) {
@@ -1470,7 +1362,6 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
 	    CHIPSFreeRec(pScrn);
 	    return FALSE;
 	}
-	xf86LoaderReqSymLists(ramdacSymbols, NULL);
     }
 
     if (cPtr->Flags & ChipsLinearSupport) 
@@ -2029,8 +1920,6 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags)
 	Bool ddc_done = FALSE;
 	xf86MonPtr pMon;
 	
-	xf86LoaderReqSymLists(ddcSymbols, NULL);
-
 	if (cPtr->pVbe) {
 	    if ((pMon 
 		 = xf86PrintEDID(vbeDoEDID(cPtr->pVbe, pVbeModule))) != NULL) {
@@ -2041,8 +1930,6 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags)
 
 	if (!ddc_done)
 	    if (xf86LoadSubModule(pScrn, "i2c")) {
-		xf86LoaderReqSymLists(i2cSymbols,NULL);
-	    
 		if (chips_i2cInit(pScrn)) {
 		    if ((pMon = xf86PrintEDID(xf86DoEDID_DDC2(pScrn->scrnIndex,
 						      cPtr->I2C))) != NULL)
@@ -3003,7 +2890,6 @@ chipsPreInitWingine(ScrnInfoPtr pScrn, int flags)
     }
     
     if (xf86LoadSubModule(pScrn, "ddc")) {
-	xf86LoaderReqSymLists(ddcSymbols, NULL);
 	if (cPtr->pVbe)
 	    xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(cPtr->pVbe, NULL)));
     }
@@ -3776,7 +3662,6 @@ chipsPreInit655xx(ScrnInfoPtr pScrn, int flags)
 		       "Memory clock option not supported for this chipset\n");
     
     if (xf86LoadSubModule(pScrn, "ddc")) {
-	xf86LoaderReqSymLists(ddcSymbols, NULL);
 	if (cPtr->pVbe)
 	    xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(cPtr->pVbe, NULL)));
     }

commit a8d0e8c0665be8d1004458c464a453cf251823ce
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 16:26:30 2009 -0800

    Remove xorgconfig & xorgcfg from See Also list in man page

diff --git a/man/chips.man b/man/chips.man
index a0a9427..3f8cfe1 100644
--- a/man/chips.man
+++ b/man/chips.man
@@ -217,7 +217,7 @@ of what the BIOS is saying set this option to off. Don't set it to off
 if a panel is connected.
 Default: value probed by BIOS.
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
 .PP
 You are also recommended to read the README.chips file that comes with all
 __xservername__ distributions, which discusses the


Reply to: