diff options
author | Egbert Eich <eich@suse.de> | 2005-02-07 11:56:31 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2005-02-07 11:56:31 +0000 |
commit | 31a4191a97f538b2c6d4b8036796f06443f783c1 (patch) | |
tree | eacc1f235bd2d568d395d823e442aad77c73aee7 /src | |
parent | a103496e08f699b609be875827ecf1f3afa45e68 (diff) |
Check the pixel clock choosen for a specific refresh rate
against the maximally allowed pixel clock when choosing
mode lines for VBESetVBEMode() and VESA BIOS version >= 3.0
(Bugzilla #2486).
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_modes.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/i830_modes.c b/src/i830_modes.c index 853683df..9b78866c 100644 --- a/src/i830_modes.c +++ b/src/i830_modes.c @@ -396,9 +396,15 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id, pMode->type = M_T_BUILTIN; status = xf86CheckModeForMonitor(pMode, pScrn->monitor); - if (status == MODE_OK) - modeOK = TRUE; - else + if (status == MODE_OK) { + if (major >= 3) { + if (pMode->Clock * 1000 <= mode->MaxPixelClock) + modeOK = TRUE; + else + modeOK = FALSE; + } else + modeOK = TRUE; + } else modeOK = FALSE; pMode->status = status; } else { @@ -643,7 +649,15 @@ i830SetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe) data->mode |= (1 << 11); data->block->RefreshRate = ((double)(data->block->PixelClock) / (double)(pMode->HTotal * pMode->VTotal)) * 100; - +#ifdef DEBUG + ErrorF("Video Modeline: ID: 0x%x Name: %s %i %i %i %i - " + " %i %i %i %i %.2f MHz Refresh: %.2f Hz\n", + data->mode, pMode->name, pMode->HDisplay, pMode->HSyncStart, + pMode->HSyncEnd, pMode->HTotal, pMode->VDisplay, + pMode->VSyncStart,pMode->VSyncEnd,pMode->VTotal, + (double)data->block->PixelClock/1000000.0, + (double)data->block->RefreshRate/100); +#endif pMode = pMode->next; } while (pMode != pScrn->modes); } |