ch7xxx: fix output detection as per datasheet, have no DVI to test this.

This commit is contained in:
Dave Airlie 2007-01-21 20:23:13 +11:00
parent c68dae2705
commit effe579e69
2 changed files with 10 additions and 2 deletions

View File

@ -182,7 +182,13 @@ out:
static xf86OutputStatus
ch7xxx_detect(I2CDevPtr d)
{
return XF86OutputStatusUnknown;
struct ch7xxx_priv *dev_priv = d->DriverPrivate.ptr;
CARD8 cdet;
ch7xxx_read(dev_priv, CH7xxx_CONNECTION_DETECT, &cdet);
if (cdet & CH7xxx_CDET_DVI)
return XF86OutputStatusConnected;
return XF86OutputStatusDisconnected;
}
static ModeStatus

View File

@ -49,7 +49,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define CH7xxx_IDF_HSP (1<<3)
#define CH7xxx_IDF_VSP (1<<4)
#define CH7301_CONNECTION_DETECT 0x20
#define CH7xxx_CONNECTION_DETECT 0x20
#define CH7xxx_CDET_DVI (1<<5)
#define CH7301_DAC_CNTL 0x21
#define CH7301_HOTPLUG 0x23
#define CH7xxx_TCTL 0x31