diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-09-27 08:58:23 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-09-27 08:58:23 +0000 |
commit | 154724cc4be1e951649c29e4abdbde964a8c112e (patch) | |
tree | 6846eb033d2866263c8953ca3fee3d447ea75871 /src | |
parent | 2174848266940e1896970c12717e106a4742dcbc (diff) |
Put back the print code to display the DDC information, and remove some bogus
DDC messages.
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_driver.c | 86 |
1 files changed, 47 insertions, 39 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 580a5d0c..e5d0bb1e 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2928,8 +2928,10 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags) pI830->vesa->monitor = vbeDoEDID(pI830->pVbe, pDDCModule); - if ((pScrn->monitor->DDC = pI830->vesa->monitor) != NULL) + if ((pScrn->monitor->DDC = pI830->vesa->monitor) != NULL) { + xf86PrintEDID(pI830->vesa->monitor); xf86SetDDCproperties(pScrn, pI830->vesa->monitor); + } xf86UnloadSubModule(pDDCModule); /* XXX Move this to a header. */ @@ -3096,23 +3098,25 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags) do { int Clock = 100000000; /* incredible value */ - for (pMon = pScrn->monitor->Modes; pMon != NULL; pMon = pMon->next) { - if ((pMon->HDisplay != p->HDisplay) || - (pMon->VDisplay != p->VDisplay) || - (pMon->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2))) - continue; + if (p->status == MODE_OK) { + for (pMon = pScrn->monitor->Modes; pMon != NULL; pMon = pMon->next) { + if ((pMon->HDisplay != p->HDisplay) || + (pMon->VDisplay != p->VDisplay) || + (pMon->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2))) + continue; - /* Find lowest supported Clock for this resolution */ - if (Clock > pMon->Clock) - Clock = pMon->Clock; - } + /* Find lowest supported Clock for this resolution */ + if (Clock > pMon->Clock) + Clock = pMon->Clock; + } - if (DDCclock < 2550 && Clock / 1000.0 > DDCclock) { - ErrorF("(%s,%s) mode clock %gMHz exceeds DDC maximum %dMHz\n", + if (DDCclock < 2550 && Clock / 1000.0 > DDCclock) { + ErrorF("(%s,%s) mode clock %gMHz exceeds DDC maximum %dMHz\n", p->name, pScrn->monitor->id, Clock/1000.0, DDCclock); - p->status = MODE_BAD; - } + p->status = MODE_BAD; + } + } p = p->next; } while (p != NULL && p != pScrn->modes); } @@ -3721,7 +3725,7 @@ static void I830SetCloneVBERefresh(ScrnInfoPtr pScrn, int mode, VbeCRTCInfoBlock clock = VBEGetPixelClock(pI830->pVbe, mode, block->PixelClock); #ifdef DEBUG ErrorF("Setting clock %.2fMHz, closest is %.2fMHz\n", - (double)block->PixelClock / 1000000.0, + (double)data->block->PixelClock / 1000000.0, (double)clock / 1000000.0); #endif if (clock) @@ -3810,6 +3814,7 @@ I830VESASetVBEMode(ScrnInfoPtr pScrn, int mode, VbeCRTCInfoBlock * block) "Set refresh rate to %dHz on Clone head.\n", pI830->CloneRefresh); } + SetPipeAccess(pScrn); } @@ -5048,9 +5053,10 @@ I830DetectMonitorChange(ScrnInfoPtr pScrn) xfree(pI830->vesa->monitor); pI830->vesa->monitor = vbeDoEDID(pI830->pVbe, pDDCModule); xf86UnloadSubModule(pDDCModule); - if ((pScrn->monitor->DDC = pI830->vesa->monitor) != NULL) + if ((pScrn->monitor->DDC = pI830->vesa->monitor) != NULL) { + xf86PrintEDID(pI830->vesa->monitor); xf86SetDDCproperties(pScrn, pI830->vesa->monitor); - else + } else /* No DDC, so get out of here, and continue to use the current settings */ return FALSE; @@ -5088,33 +5094,35 @@ I830DetectMonitorChange(ScrnInfoPtr pScrn) pScrn->display->virtualY, memsize, LOOKUP_BEST_REFRESH); -if (DDCclock > 0) { - p = pScrn->modes; - if (p == NULL) - return FALSE; - do { - int Clock = 100000000; /* incredible value */ + if (DDCclock > 0) { + p = pScrn->modes; + if (p == NULL) + return FALSE; + do { + int Clock = 100000000; /* incredible value */ - for (pMon = pScrn->monitor->Modes; pMon != NULL; pMon = pMon->next) { - if ((pMon->HDisplay != p->HDisplay) || - (pMon->VDisplay != p->VDisplay) || - (pMon->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2))) - continue; + if (p->status == MODE_OK) { + for (pMon = pScrn->monitor->Modes; pMon != NULL; pMon = pMon->next) { + if ((pMon->HDisplay != p->HDisplay) || + (pMon->VDisplay != p->VDisplay) || + (pMon->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2))) + continue; - /* Find lowest supported Clock for this resolution */ - if (Clock > pMon->Clock) - Clock = pMon->Clock; - } + /* Find lowest supported Clock for this resolution */ + if (Clock > pMon->Clock) + Clock = pMon->Clock; + } - if (DDCclock < 2550 && Clock / 1000.0 > DDCclock) { - ErrorF("(%s,%s) mode clock %gMHz exceeds DDC maximum %dMHz\n", + if (DDCclock < 2550 && Clock / 1000.0 > DDCclock) { + ErrorF("(%s,%s) mode clock %gMHz exceeds DDC maximum %dMHz\n", p->name, pScrn->monitor->id, Clock/1000.0, DDCclock); - p->status = MODE_BAD; - } - p = p->next; - } while (p != NULL && p != pScrn->modes); -} + p->status = MODE_BAD; + } + } + p = p->next; + } while (p != NULL && p != pScrn->modes); + } pScrn->displayWidth = displayWidth; /* restore old displayWidth */ |