radeon_hd: Don't call TV encoder control improperly

* TV encoder was dropped on DCE5+
* (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)
  will improperly match DFP4 (0x2 | 0x8) = 0xA
* Bug reported to linux kernel driver
This commit is contained in:
Alexander von Gluck IV
2012-03-22 11:49:15 -05:00
parent bc83207890
commit 41cf61d1c9
2 changed files with 10 additions and 7 deletions
@@ -674,8 +674,8 @@ connector_probe()
}
// Set up information buses such as ddc
if ((connectorFlags
& (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) == 0) {
if (((connectorFlags & ATOM_DEVICE_TV_SUPPORT) == 0)
&& (connectorFlags & ATOM_DEVICE_CV_SUPPORT) == 0) {
for (j = 0; j < connectorObject->ucNumberOfObjects; j++) {
if (B_LENDIAN_TO_HOST_INT16(path->usConnObjectId)
== B_LENDIAN_TO_HOST_INT16(
@@ -295,11 +295,14 @@ encoder_mode_set(uint8 id, uint32 pixelClock)
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
encoder_analog_setup(connectorIndex, pixelClock, ATOM_ENABLE);
if ((encoderFlags
& (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) != 0) {
encoder_tv_setup(connectorIndex, pixelClock, ATOM_ENABLE);
} else {
encoder_tv_setup(connectorIndex, pixelClock, ATOM_DISABLE);
if (info.dceMajor < 5) {
// TV encoder was dropped in DCE 5
if ((encoderFlags & ATOM_DEVICE_TV_SUPPORT != 0)
|| (encoderFlags & ATOM_DEVICE_CV_SUPPORT) != 0) {
encoder_tv_setup(connectorIndex, pixelClock, ATOM_ENABLE);
} else {
encoder_tv_setup(connectorIndex, pixelClock, ATOM_DISABLE);
}
}
break;
case ENCODER_OBJECT_ID_INTERNAL_TMDS1: