summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-11-26 16:32:12 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2009-01-14 10:59:02 +0800
commit335d6bbdfd882eb98dc6ebd785ad2963abc6566d (patch)
treed30bdd498b3ebc2ae39c7fca8e5e8bbce5609a3b /src
parent28a44ad59eec9a6421f4ed0de5614599ac17b0d6 (diff)
Fix LVDS EDID to match all possible default modes
If the EDID data from the LVDS doesn't indicate support for a wide range of continuous frequencies, it will not match any of the default modes although our LVDS scaler logic ignores refresh rates when programming LVDS modes. Fix this by smashing the compute EDID data to open up the sync rates. Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 3354e660b0744976871683ce226f17e873f26b50)
Diffstat (limited to 'src')
-rw-r--r--src/i830_lvds.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 1799eab1..3714142d 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -788,6 +788,36 @@ i830_lvds_get_modes(xf86OutputPtr output)
DisplayModePtr modes;
edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
+
+ /* Our LVDS scaler can hit any size, so mark the EDID data as
+ * supporting continuous timings
+ */
+ if (edid_mon) {
+ int i, j = -1;
+ edid_mon->features.msc |= 0x1;
+
+ /* Either find a DS_RANGES block, or replace a DS_VENDOR block,
+ * smashing it into a DS_RANGES block with wide open refresh to
+ * match all default modes
+ */
+ for (i = 0; i < sizeof (edid_mon->det_mon) / sizeof (edid_mon->det_mon[0]); i++)
+ {
+ if (edid_mon->det_mon[i].type >= DS_VENDOR && j == -1)
+ j = i;
+ if (edid_mon->det_mon[i].type == DS_RANGES) {
+ j = i;
+ break;
+ }
+ }
+ if (j != -1) {
+ struct monitor_ranges *ranges = &edid_mon->det_mon[j].section.ranges;
+ edid_mon->det_mon[j].type = DS_RANGES;
+ ranges->min_v = 0;
+ ranges->max_v = 200;
+ ranges->min_h = 0;
+ ranges->max_h = 200;
+ }
+ }
xf86OutputSetEDID (output, edid_mon);
modes = xf86OutputGetEDIDModes (output);