radeon_hd: Repair external encoder dpms call
* I was right that this didn't look right. * Now we set up the internal encoder, then the external one if valid. * Make sure we optionally set up external encoder if desired on UNIPHY
This commit is contained in:
@@ -1561,7 +1561,7 @@ encoder_dpms_set(uint8 crtcID, int mode)
|
|||||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
|
||||||
encoder_dpms_set_dig(crtcID, mode);
|
encoder_dpms_set_dig(crtcID, mode);
|
||||||
return;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DDI:
|
case ENCODER_OBJECT_ID_INTERNAL_DDI:
|
||||||
index = GetIndexIntoMasterTable(COMMAND, DVOOutputControl);
|
index = GetIndexIntoMasterTable(COMMAND, DVOOutputControl);
|
||||||
@@ -1604,6 +1604,8 @@ encoder_dpms_set(uint8 crtcID, int mode)
|
|||||||
// default, none on purpose
|
// default, none on purpose
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we have an index, we need to execute a table.
|
||||||
|
if (index >= 0) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case B_DPMS_ON:
|
case B_DPMS_ON:
|
||||||
args.ucAction = ATOM_ENABLE;
|
args.ucAction = ATOM_ENABLE;
|
||||||
@@ -1615,7 +1617,6 @@ encoder_dpms_set(uint8 crtcID, int mode)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= 0) {
|
|
||||||
atom_execute_table(gAtomContext, index, (uint32*)&args);
|
atom_execute_table(gAtomContext, index, (uint32*)&args);
|
||||||
if (info.dceMajor < 5) {
|
if (info.dceMajor < 5) {
|
||||||
if ((encoderFlags & ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
if ((encoderFlags & ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
||||||
@@ -1627,13 +1628,8 @@ encoder_dpms_set(uint8 crtcID, int mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: I feel as though what is below may be incorrect...
|
// If an external encoder exists, we should flip it on as well
|
||||||
* AMD: the ext encoder will only show up in conjunction with an internal
|
if (gConnector[connectorIndex]->encoderExternal.valid == true)
|
||||||
* encoder, the pipeline generally looks like crtc -> dvo -> ext encoder
|
|
||||||
* or crtc -> uniphy -> ext encoder
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (encoder_is_external(encoderID))
|
|
||||||
encoder_dpms_set_external(crtcID, mode);
|
encoder_dpms_set_external(crtcID, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1721,7 +1717,7 @@ encoder_dpms_set_external(uint8 crtcID, int mode)
|
|||||||
|
|
||||||
radeon_shared_info &info = *gInfo->shared_info;
|
radeon_shared_info &info = *gInfo->shared_info;
|
||||||
uint32 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
uint32 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
||||||
pll_info* pll = &gConnector[connectorIndex]->encoder.pll;
|
pll_info* pll = &gConnector[connectorIndex]->encoderExternal.pll;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case B_DPMS_ON:
|
case B_DPMS_ON:
|
||||||
|
|||||||
Reference in New Issue
Block a user