diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2013-07-31 19:16:45 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-01-07 17:24:57 +0000 |
commit | d6c8d7509727060b8e2358b9ed1c0e17b2ec3401 (patch) | |
tree | 2ee9f23a0bf7e87fcc118f9494bc10db1a7e0de4 | |
parent | 95c2287465138ac251bf792f354cee3626e76b44 (diff) |
xfree86: Use the TMDS maximum frequency to prune modes
Instead of only relying on the Range section, we can do better on
HDMI to find out what is the max dot clock the monitor supports. The
HDMI CEA vendor block adds a TMDS max freq we can use.
This makes X not prune 4k resolutions on HDMI.
v2: Replace X_INFO by X_PROBED in the message that prints the max
TMDS frequency (Chris Wilson)
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index a441fd16a..42fdad9e2 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1676,6 +1676,7 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) if (edid_monitor) { struct det_monrec_parameter p; struct disp_features *features = &edid_monitor->features; + struct cea_data_block *hdmi_db; /* if display is not continuous-frequency, don't add default modes */ if (!GTF_SUPPORTED(features->msc)) @@ -1688,6 +1689,16 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) p.sync_source = &sync_source; xf86ForEachDetailedBlock(edid_monitor, handle_detailed_monrec, &p); + + /* Look at the CEA HDMI vendor block for the max TMDS freq */ + hdmi_db = xf86MonitorFindHDMIBlock(edid_monitor); + if (hdmi_db && hdmi_db->len >= 7) { + int tmds_freq = hdmi_db->u.vendor.hdmi.max_tmds_clock * 5000; + xf86DrvMsg(scrn->scrnIndex, X_PROBED, + "HDMI max TMDS frequency %dKHz\n", tmds_freq); + if (tmds_freq > max_clock) + max_clock = tmds_freq; + } } if (xf86GetOptValFreq(output->options, OPTION_MIN_CLOCK, |