diff options
author | Dave Airlie <airlied@linux.ie> | 2007-01-28 19:40:12 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-01-29 20:27:20 +1100 |
commit | 6eb69e737864d06dc6d4fbb4cd85a027cbb7643a (patch) | |
tree | 8f43b82d2cb04b0fde8f507dc2ee867f27c087b9 /src/ch7xxx/ch7xxx.c | |
parent | effe579e691b044e3ce59b41b5c0eaaac4368dda (diff) |
ch7xxx: actually power up the chip around connection detection
Diffstat (limited to 'src/ch7xxx/ch7xxx.c')
-rw-r--r-- | src/ch7xxx/ch7xxx.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c index 9e2a0055..161aebf4 100644 --- a/src/ch7xxx/ch7xxx.c +++ b/src/ch7xxx/ch7xxx.c @@ -183,9 +183,20 @@ static xf86OutputStatus ch7xxx_detect(I2CDevPtr d) { struct ch7xxx_priv *dev_priv = d->DriverPrivate.ptr; - CARD8 cdet; + CARD8 cdet, gpio, orig_pm, pm; + + ch7xxx_read(dev_priv, CH7xxx_PM, &orig_pm); + + pm = orig_pm; + pm &= ~CH7xxx_PM_FPD; + pm |= CH7xxx_PM_DVIL | CH7xxx_PM_DVIP; + + ch7xxx_write(dev_priv, CH7xxx_PM, pm); + ch7xxx_read(dev_priv, CH7xxx_CONNECTION_DETECT, &cdet); + ch7xxx_write(dev_priv, CH7xxx_PM, orig_pm); + if (cdet & CH7xxx_CDET_DVI) return XF86OutputStatusConnected; return XF86OutputStatusDisconnected; |