diff options
author | Stuart Bennett <stuart@freedesktop.org> | 2009-04-03 00:57:19 +0100 |
---|---|---|
committer | Stuart Bennett <stuart@freedesktop.org> | 2009-04-03 01:00:28 +0100 |
commit | e2aa03794420324ae5a682bbc415a79a4d830f7e (patch) | |
tree | b0ba896c0ed880798a2a09f1985fc3f9ff1a3acb /src/nv_output.c | |
parent | 6965663ddcc8dd3330842d3c4c4eb4cbf4e4fc39 (diff) |
randr12: fall back to standard timings when finding native mode (rh#492819)
Diffstat (limited to 'src/nv_output.c')
-rw-r--r-- | src/nv_output.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nv_output.c b/src/nv_output.c index 592b06a..efc2bc4 100644 --- a/src/nv_output.c +++ b/src/nv_output.c @@ -249,7 +249,6 @@ get_native_mode_from_edid(xf86OutputPtr output, DisplayModePtr edid_modes) DisplayModePtr mode; for (i = 0; i < DET_TIMINGS; i++) { - /* We only look at detailed timings atm */ if (nv_connector->edid->det_mon[i].type != DT) continue; /* Selecting only based on width ok? */ @@ -258,9 +257,15 @@ get_native_mode_from_edid(xf86OutputPtr output, DisplayModePtr edid_modes) max_v_active = nv_connector->edid->det_mon[i].section.d_timings.v_active; } } - if (!(max_h_active && max_v_active)) { + if (!max_h_active || !max_v_active) /* what kind of a joke EDID is this? */ + for (i = 0; i < STD_TIMINGS; i++) + if (nv_connector->edid->timings2[i].hsize > max_h_active) { + max_h_active = nv_connector->edid->timings2[i].hsize; + max_v_active = nv_connector->edid->timings2[i].vsize; + } + if (!max_h_active || !max_v_active) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "No EDID detailed timings available for finding native mode\n"); + "EDID too broken for finding native mode\n"); return NULL; } |