Hi folks,
I had some problems to get the VIA driver to work
with NetBSD 1.6.1 and 4.3.99.15.
After some debugging I found that there is a
element in the VIABIOSInfoRec named pUTUSERSETTING, but I cannot find where
this pointer is initialized.
The problem occured first in
via_bios.c: Bool
VIAFindModeUseBIOSTable(VIABIOSInfoPtr pBIOSInfo)
.
.
.
pBIOSInfo->pUTUSERSETTING->DefaultSetting = FALSE;
<-----!
and since the value is NULL, it no wonder that the
server crashes with segmentation fault.
To test this I allocated some memory:
via_driver.c:
static Bool VIAGetRec(ScrnInfoPtr
pScrn)
{ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAGetRec\n")); if (pScrn->driverPrivate) return TRUE; pScrn->driverPrivate =
xnfcalloc(sizeof(VIARec), 1);
((VIARec *)(pScrn->driverPrivate))->pBIOSInfo = xnfcalloc(sizeof(VIABIOSInfoRec), 1); ((VIARec *)(pScrn->driverPrivate))->pBIOSInfo->pModeTable = xnfcalloc(sizeof(VIAModeTableRec), 1); ((VIARec *)(pScrn->driverPrivate))->pBIOSInfo->pUTUSERSETTING = <----------! xnfcalloc(sizeof(UTUSERSETTING), 1); <--------! /* initial value in VIARec
*/
((VIARec *)(pScrn->driverPrivate))->SavedReg.mode = 0xFF; ((VIARec *)(pScrn->driverPrivate))->ModeReg.mode = 0xFF; ((VIARec
*)(pScrn->driverPrivate))->pBIOSInfo->FirstInit = TRUE;
return TRUE;
} /* VIAGetRec */
After this change the via driver seems to work, but
I have not checked everything yet. Maybe this element should be initialized in
another way.
Who is responible for this driver? XFree86 or
VIA?
- Jan
|