summaryrefslogtreecommitdiff
path: root/src/savage_driver.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-05-21 16:00:40 -0400
committerAdam Jackson <ajax@redhat.com>2008-05-21 16:00:40 -0400
commitfd20f5ddc2ef5945a757f6afedff5fb6214b607e (patch)
tree549d2991296d2d98ae6d48b70ed121dff7b96b00 /src/savage_driver.c
parent09c4dcc658b07f2672388eb4ab5fee3ebe190fc9 (diff)
Fake sync ranges for panels with no EDID.
Red Hat bug #243589.
Diffstat (limited to 'src/savage_driver.c')
-rw-r--r--src/savage_driver.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c
index eb06519..1b94d1f 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -1211,6 +1211,30 @@ static void SavageGetPanelInfo(ScrnInfoPtr pScrn)
psav->PanelX = panelX;
psav->PanelY = panelY;
+ do {
+ DisplayModePtr native = xf86CVTMode(panelX, panelY, 60.0, 0, 0);
+ if (!native)
+ break;
+
+ if (!pScrn->monitor->nHsync) {
+ pScrn->monitor->nHsync = 1;
+ pScrn->monitor->hsync[0].lo = 31.5;
+ pScrn->monitor->hsync[0].hi = (float)native->Clock /
+ (float)native->HTotal;
+ }
+ if (!pScrn->monitor->nVrefresh) {
+ pScrn->monitor->nVrefresh = 1;
+ pScrn->monitor->vrefresh[0].lo = 56.0;
+ pScrn->monitor->vrefresh[0].hi = (float)native->Clock * 1000.0 /
+ (float)native->HTotal /
+ (float)native->VTotal;
+ }
+ if (!pScrn->monitor->maxPixClock)
+ pScrn->monitor->maxPixClock = native->Clock;
+
+ xfree(native);
+ } while (0);
+
if( psav->LCDClock > 0.0 )
{
psav->maxClock = psav->LCDClock * 1000.0;