Index: src/via_driver.c =================================================================== --- src/via_driver.c (wersja 829) +++ src/via_driver.c (kopia robocza) @@ -1566,35 +1566,7 @@ ViaI2CInit(pScrn); } - if (!xf86LoadSubModule(pScrn, "ddc")) { - VIAFreeRec(pScrn); - return FALSE; - } else { - if (pVia->pI2CBus1) { - pVia->DDC1 = xf86DoEDID_DDC2(pScrn->scrnIndex, pVia->pI2CBus1); - if (pVia->DDC1) { - xf86PrintEDID(pVia->DDC1); - xf86SetDDCproperties(pScrn, pVia->DDC1); - } - } - } - - ViaOutputsDetect(pScrn); - if (!ViaOutputsSelect(pScrn)) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No outputs possible.\n"); - VIAFreeRec(pScrn); - return FALSE; - } - - /* Might not belong here temporary fix for bug fix */ - ViaPreInitCRTCConfig(pScrn); - - if (!pVia->UseLegacyModeSwitch) { - if (pBIOSInfo->Panel->IsActive) - ViaPanelPreInit(pScrn); - } - if (pBIOSInfo->Panel->IsActive && ((pVia->Chipset == VIA_K8M800) || (pVia->Chipset == VIA_VM800))) { @@ -1620,6 +1592,51 @@ " Using builtin code to set modes.\n"); } + if (!xf86LoadSubModule(pScrn, "ddc")) { + VIAFreeRec(pScrn); + return FALSE; + } else { + if (pVia->pVbe) { + pVia->DDC1 = vbeDoEDID(pVia->pVbe, NULL); + if (pVia->DDC1) { + xf86PrintEDID(pVia->DDC1); + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "DDC detected a %s at vbe:\n", pVia->DDC1->features.input_type ? + "DFP" : "CRT"); + xf86SetDDCproperties(pScrn, pVia->DDC1); + } + } else { + if (pVia->pI2CBus1) { + pVia->DDC1 = xf86DoEDID_DDC2(pScrn->scrnIndex, pVia->pI2CBus1); + if (pVia->DDC1) { + xf86PrintEDID(pVia->DDC1); + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "DDC detected a %s at I2C 1:\n", pVia->DDC1->features.input_type ? + "DFP" : "CRT"); + xf86SetDDCproperties(pScrn, pVia->DDC1); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No EDID on I2C 1\n"); + + } + } + } + } + + ViaOutputsDetect(pScrn); + if (!ViaOutputsSelect(pScrn)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No outputs possible.\n"); + VIAFreeRec(pScrn); + return FALSE; + } + + /* Might not belong here temporary fix for bug fix */ + ViaPreInitCRTCConfig(pScrn); + + if (!pVia->UseLegacyModeSwitch) { + if (pBIOSInfo->Panel->IsActive) + ViaPanelPreInit(pScrn); + } + if (pVia->pVbe) { if (!ViaVbeModePreInit(pScrn)) { Index: src/via_dri.c =================================================================== --- src/via_dri.c (wersja 829) +++ src/via_dri.c (kopia robocza) @@ -267,6 +267,11 @@ pVIADRI = pDRIInfo->devPrivate; pVia->agpSize = 0; +/* For AMD64 */ +#ifdef __x86_64__ + return FALSE; +#endif + if (drmAgpAcquire(pVia->drmFD) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAgpAcquire failed %d\n", errno);