@@ -1819,18 +1819,20 @@ i830_sdvo_detect(xf86OutputPtr output)
}
}
+ status = XF86OutputStatusConnected;
if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
{
xf86MonPtr edid_mon;
/* Check EDID in DVI-I case */
edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
- if (edid_mon && !DIGITAL(edid_mon->features.input_type)) {
- xfree(edid_mon);
- return XF86OutputStatusDisconnected;
+ if (edid_mon == NULL || !DIGITAL(edid_mon->features.input_type)) {
+ status = XF86OutputStatusDisconnected;
}
- xfree(edid_mon);
+
+ if (edid_mon)
+ xfree(edid_mon);
}
- return XF86OutputStatusConnected;
+ return status;
}
static DisplayModePtr
We send sdvo attach command to check sdvo output status, it is good enough for most cases. However we also should care about the similar case on 4X platform, which also share DDC bus with other analog devices. The patch fixed bug on MP965-D. When plugged VGA by DVI-I output, it shows sdvo dvi is detected incorrectly. Signed-off-by: Ma Ling <ling.ma@intel.com> --- src/i830_sdvo.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)