From 0f774d28737667fde7cb1ef15bb459c87f1879b2 Mon Sep 17 00:00:00 2001 From: Stuart Bennett Date: Tue, 6 Jan 2009 16:23:33 +0000 Subject: [PATCH] bodge-in continuous timings when the scaler is in use. waiting for resolution of http://bugs.freedesktop.org/show_bug.cgi?id=19247 or http://marc.info/?l=dri-devel&m=123053570717146&w=2 to see if anyone comes up with a better solution. a pity the xserver has no idea of scalers and so each driver ends up with this hack. --- src/nv_output.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/nv_output.c b/src/nv_output.c index e079f68..87fd932 100644 --- a/src/nv_output.c +++ b/src/nv_output.c @@ -219,6 +219,19 @@ nv_output_detect(xf86OutputPtr output) return ret; } +static void munge_edid_for_scaler(xf86OutputPtr output, xf86MonPtr edid) +{ + /* the digital scaler is not limited to modes given in the EDID, so + * enable the GTF bit so the xserver thinks continuous timing is + * available and adds the standard modes */ + + edid->features.msc |= 1; + xf86OutputSetEDID(output, edid); + + /* FIXME: add/modify a sync ranges block to allow full range of modes, + * a la http://bugs.freedesktop.org/attachment.cgi?id=21548 ?? */ +} + static DisplayModePtr get_native_mode_from_edid(xf86OutputPtr output, DisplayModePtr edid_modes) { @@ -279,6 +292,10 @@ nv_output_get_edid_modes(xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; DisplayModePtr edid_modes; + if (nv_encoder->dcb->type == OUTPUT_LVDS || + (nv_encoder->dcb->type == OUTPUT_TMDS && nv_encoder->scaling_mode != SCALE_PANEL)) + munge_edid_for_scaler(output, nv_connector->edid); + if (!(edid_modes = xf86OutputGetEDIDModes(output))) return edid_modes; -- 1.5.4.4