diff options
author | Adam Jackson <ajax@redhat.com> | 2009-06-25 13:49:18 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-06-25 13:49:18 -0400 |
commit | 7d1d968fdc8de1e0ab0be916a1f3a4a398af47aa (patch) | |
tree | fb8b8268b3e884a8804f1ab12b6311d313d9aec4 /src/radeon_output.c | |
parent | 96581746eea2f4e29a04f9266ec9649f25480424 (diff) |
Cosmetic cleanup to digital output detection
No functional change, but this logic would need extending anyway for
DisplayID, so unify it now.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r-- | src/radeon_output.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index e307bf0e..40c0699f 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -209,6 +209,12 @@ radeon_set_active_device(xf86OutputPtr output) } } +static Bool +monitor_is_digital(xf86MonPtr MonInfo) +{ + return (MonInfo->rawData[0x14] & 0x80) != 0; +} + static RADEONMonitorType radeon_ddc_connected(xf86OutputPtr output) { @@ -235,7 +241,7 @@ radeon_ddc_connected(xf86OutputPtr output) case CONNECTOR_DVI_D: case CONNECTOR_HDMI_TYPE_A: if (radeon_output->shared_ddc) { - if (MonInfo->rawData[0x14] & 0x80) /* if it's digital and DVI/HDMI/etc. */ + if (monitor_is_digital(MonInfo)) MonType = MT_DFP; else MonType = MT_NONE; @@ -250,7 +256,7 @@ radeon_ddc_connected(xf86OutputPtr output) MonType = MT_DFP; case CONNECTOR_HDMI_TYPE_B: case CONNECTOR_DVI_I: - if (MonInfo->rawData[0x14] & 0x80) /* if it's digital and DVI */ + if (monitor_is_digital(MonInfo)) MonType = MT_DFP; else MonType = MT_CRT; @@ -259,7 +265,7 @@ radeon_ddc_connected(xf86OutputPtr output) case CONNECTOR_DVI_A: default: if (radeon_output->shared_ddc) { - if (MonInfo->rawData[0x14] & 0x80) /* if it's digital and VGA */ + if (monitor_is_digital(MonInfo)) MonType = MT_NONE; else MonType = MT_CRT; |