diff options
author | Keith Packard <keithp@keithp.com> | 2008-11-26 16:32:12 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2009-01-13 10:22:00 +0800 |
commit | 3354e660b0744976871683ce226f17e873f26b50 (patch) | |
tree | 7f37af41e366beed8b2df55fd50899a5edcc2241 /src/i830_lvds.c | |
parent | f1e9ca4e4fb3ddb083252aea79c67c5e5e71f29c (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>
Diffstat (limited to 'src/i830_lvds.c')
-rw-r--r-- | src/i830_lvds.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c index df92dea1..3796727d 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -907,6 +907,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); |