[Intel-gfx] [PATCH] SDVO: check EDID info for DVI-I
Zhenyu Wang
zhenyu.z.wang at intel.com
Fri Feb 13 07:05:35 CET 2009
For SDVO DVI-I, check EDID info for digital output,
otherwise mark it to be disconnected as analog output
is driven by VGA then.
---
src/i830_sdvo.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 1fbf8dc..508a467 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1507,7 +1507,9 @@ i830_sdvo_check_hdmi_encode (xf86OutputPtr output)
static xf86OutputStatus
i830_sdvo_detect(xf86OutputPtr output)
{
- uint8_t response[2];
+ I830OutputPrivatePtr intel_output = output->driver_private;
+ struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
+ uint16_t response;
uint8_t status;
i830_sdvo_write_cmd(output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
@@ -1516,10 +1518,22 @@ i830_sdvo_detect(xf86OutputPtr output)
if (status != SDVO_CMD_STATUS_SUCCESS)
return XF86OutputStatusUnknown;
- if (response[0] != 0 || response[1] != 0)
- return XF86OutputStatusConnected;
- else
+ if (response == 0)
return XF86OutputStatusDisconnected;
+
+ if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
+ {
+ xf86MonPtr edid_mon;
+ /* Check EDID in DVI-I case */
+ i830_sdvo_set_control_bus_switch(output, dev_priv->ddc_bus);
+ edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
+ if (!edid_mon || !DIGITAL(edid_mon->features.input_type)) {
+ xfree(edid_mon);
+ return XF86OutputStatusDisconnected;
+ }
+ xfree(edid_mon);
+ }
+ return XF86OutputStatusConnected;
}
static DisplayModePtr
--
1.5.6.5
More information about the Intel-gfx
mailing list