summaryrefslogtreecommitdiff
path: root/src/rhd_edid.c
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2007-10-23 18:12:54 +0200
committerLuc Verhaegen <libv@skynet.be>2007-10-23 18:12:54 +0200
commite663d884c9e98bd2fc6d0af36d3cef4ca4c226c1 (patch)
tree2db3fbeefbe2f1c2efd5f32417bb1b521d64c53f /src/rhd_edid.c
parent292a4f4ba057d57d388da1cd5ee7e5f9f53176cc (diff)
Improve detection of reduced blanking monitors.
We now cycle through the EDID provided modes list to find reduced blanking modes. If found, the driver will now allow reduced blanking for this monitor. In case this still fails, we now have Option "ForceReduced", to force reduced blanking on all or no monitors.
Diffstat (limited to 'src/rhd_edid.c')
-rw-r--r--src/rhd_edid.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/rhd_edid.c b/src/rhd_edid.c
index ba16ae1..1262ccf 100644
--- a/src/rhd_edid.c
+++ b/src/rhd_edid.c
@@ -221,6 +221,23 @@ EDIDGuessRangesFromModes(struct rhdMonitor *Monitor, DisplayModePtr Modes)
}
/*
+ * Determine whether this monitor does allow reduced blanking.
+ * Do not set it to false, to allow the user to specify this too.
+ */
+static void
+EDIDReducedAllowed(struct rhdMonitor *Monitor, DisplayModePtr Modes)
+{
+ DisplayModePtr Mode;
+
+ for (Mode = Modes; Mode; Mode = Mode->next)
+ if (((Mode->HTotal - Mode->HDisplay) == 160) &&
+ ((Mode->HSyncEnd - Mode->HDisplay) == 80) &&
+ ((Mode->HSyncEnd - Mode->HSyncStart) == 32) &&
+ ((Mode->VSyncStart - Mode->VDisplay) == 3))
+ Monitor->ReducedAllowed = TRUE;
+}
+
+/*
* Fill out rhdMonitor with xf86MonPtr information.
*/
void
@@ -237,12 +254,6 @@ RHDMonitorEDIDSet(struct rhdMonitor *Monitor, xf86MonPtr EDID)
snprintf(Monitor->Name, 9, "%s-%04X", EDID->vendor.name,
EDID->vendor.prod_id);
- /* If this is a digital display, then we can use reduced blanking
- * What about my VMP 453? */
- if (EDID->features.input_type)
- Monitor->ReducedAllowed = TRUE;
- /* Allow the user to also enable this through config */
-
/* Add established timings */
Mode = EDIDModesFromEstablished(Monitor->scrnIndex, &EDID->timings1);
Modes = RHDModesAdd(Modes, Mode);
@@ -304,7 +315,7 @@ RHDMonitorEDIDSet(struct rhdMonitor *Monitor, xf86MonPtr EDID)
if (Modes) {
EDIDGuessRangesFromModes(Monitor, Modes);
-
+ EDIDReducedAllowed(Monitor, Modes);
Monitor->Modes = RHDModesAdd(Monitor->Modes, Modes);
}
}