xf86-video-intel: Branch 'display-port' - src/i830_dp.c
Keith Packard
keithp at kemper.freedesktop.org
Thu Mar 19 15:49:46 PDT 2009
src/i830_dp.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 708b9d53e51fe3d415f0e69f1d4e1a64d9e6c383
Author: Keith Packard <keithp at keithp.com>
Date: Thu Mar 19 15:48:20 2009 -0700
Verify DP connection status by checking DPCD
The hot-plug bit is not a sufficient test for DP, so fetch the DPCD and make
sure someone is listening.
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/src/i830_dp.c b/src/i830_dp.c
index 86a8ef5..1005f9a 100644
--- a/src/i830_dp.c
+++ b/src/i830_dp.c
@@ -821,6 +821,8 @@ i830_dp_detect(xf86OutputPtr output)
struct i830_dp_priv *dev_priv = intel_output->dev_priv;
I830Ptr pI830 = I830PTR(pScrn);
uint32_t temp, bit;
+ xf86OutputStatus status;
+ uint8_t dpcd[4];
dev_priv->has_audio = FALSE;
@@ -862,13 +864,20 @@ i830_dp_detect(xf86OutputPtr output)
if ((temp & bit) == 0)
return XF86OutputStatusDisconnected;
+ status = XF86OutputStatusDisconnected;
+ if (i830_dp_aux_native_read(pScrn, dev_priv->output_reg,
+ 0, dpcd, sizeof (dpcd)) == sizeof (dpcd))
+ {
+ if (dpcd[0] != 0)
+ status = XF86OutputStatusConnected;
+ }
if (pI830->debug_modes)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"DisplayPort monitor detected on DP-%d\n",
(dev_priv->output_reg == DP_B) ? 1 :
(dev_priv->output_reg == DP_C) ? 2 : 3);
- return XF86OutputStatusConnected;
+ return status;
}
static void
More information about the xorg-commit
mailing list