radeon_hd: Fix bugs in external DP bridge code
* non-external encoder will never be a DP bridge. * use external encoder in places where needed. * ensure we look at proper encoder for isDPBridge.
This commit is contained in:
@@ -661,8 +661,7 @@ connector_probe()
|
||||
encoder->linkEnumeration
|
||||
= (encoderObjectRaw & ENUM_ID_MASK)
|
||||
>> ENUM_ID_SHIFT;
|
||||
encoder->isDPBridge
|
||||
= encoder_is_dp_bridge(encoderID);
|
||||
encoder->isDPBridge = false;
|
||||
|
||||
pll_limit_probe(&encoder->pll);
|
||||
}
|
||||
@@ -737,7 +736,7 @@ connector_is_dp(uint32 connectorIndex)
|
||||
{
|
||||
if (gConnector[connectorIndex]->type == VIDEO_CONNECTOR_DP
|
||||
|| gConnector[connectorIndex]->type == VIDEO_CONNECTOR_EDP
|
||||
|| gConnector[connectorIndex]->encoder.isDPBridge == true) {
|
||||
|| gConnector[connectorIndex]->encoderExternal.isDPBridge == true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -259,7 +259,7 @@ detect_displays()
|
||||
|
||||
// TODO: As DP aux transactions don't work yet, just use LVDS as a hack
|
||||
#if 0
|
||||
if (gConnector[id]->encoder.isDPBridge == true) {
|
||||
if (gConnector[id]->encoderExternal.isDPBridge == true) {
|
||||
// If this is a DisplayPort Bridge, setup ddc on bus
|
||||
// TRAVIS (LVDS) or NUTMEG (VGA)
|
||||
TRACE("%s: is bridge, performing bridge DDC setup\n", __func__);
|
||||
|
||||
@@ -535,6 +535,7 @@ status_t
|
||||
encoder_dig_setup(uint32 connectorIndex, uint32 pixelClock, int command)
|
||||
{
|
||||
radeon_shared_info &info = *gInfo->shared_info;
|
||||
connector_info* connector = gConnector[connectorIndex];
|
||||
|
||||
int index = 0;
|
||||
if (info.dceMajor >= 4)
|
||||
@@ -566,16 +567,14 @@ encoder_dig_setup(uint32 connectorIndex, uint32 pixelClock, int command)
|
||||
union digEncoderControl args;
|
||||
memset(&args, 0, sizeof(args));
|
||||
|
||||
uint32 encoderID = gConnector[connectorIndex]->encoder.objectID;
|
||||
bool isDPBridge = gConnector[connectorIndex]->encoder.isDPBridge;
|
||||
|
||||
bool linkB = gConnector[connectorIndex]->encoder.linkEnumeration
|
||||
bool isDPBridge = connector->encoderExternal.isDPBridge;
|
||||
bool linkB = connector->encoder.linkEnumeration
|
||||
== GRAPH_OBJECT_ENUM_ID2 ? true : false;
|
||||
|
||||
// determine DP panel mode
|
||||
uint32 panelMode;
|
||||
if (info.dceMajor >= 4 && isDPBridge) {
|
||||
if (encoderID == ENCODER_OBJECT_ID_NUTMEG)
|
||||
if (connector->encoderExternal.objectID == ENCODER_OBJECT_ID_NUTMEG)
|
||||
panelMode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
|
||||
else {
|
||||
// aka ENCODER_OBJECT_ID_TRAVIS or VIDEO_CONNECTOR_EDP
|
||||
@@ -615,7 +614,7 @@ encoder_dig_setup(uint32 connectorIndex, uint32 pixelClock, int command)
|
||||
args.v1.ucConfig |= ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ;
|
||||
}
|
||||
|
||||
switch (encoderID) {
|
||||
switch (connector->encoder.objectID) {
|
||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
|
||||
args.v1.ucConfig = ATOM_ENCODER_CONFIG_V2_TRANSMITTER1;
|
||||
break;
|
||||
|
||||
@@ -342,10 +342,15 @@ pll_adjust(pll_info* pll, uint8 crtcID)
|
||||
// original as pixel_clock will be adjusted
|
||||
|
||||
uint32 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
||||
uint32 encoderID = gConnector[connectorIndex]->encoder.objectID;
|
||||
connector_info* connector = gConnector[connectorIndex];
|
||||
|
||||
uint32 encoderID = connector->encoder.objectID;
|
||||
uint32 encoderMode = display_get_encoder_mode(connectorIndex);
|
||||
uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags;
|
||||
bool dpBridge = gConnector[connectorIndex]->encoder.isDPBridge;
|
||||
uint32 encoderFlags = connector->encoder.flags;
|
||||
|
||||
uint32 externalEncoderID = 0;
|
||||
if (connector->encoderExternal.isDPBridge)
|
||||
externalEncoderID = connector->encoderExternal.objectID;
|
||||
|
||||
if (info.dceMajor >= 3) {
|
||||
|
||||
@@ -434,8 +439,7 @@ pll_adjust(pll_info* pll, uint8 crtcID)
|
||||
}
|
||||
}
|
||||
|
||||
args.v3.sInput.ucExtTransmitterID
|
||||
= dpBridge ? encoderID : 0;
|
||||
args.v3.sInput.ucExtTransmitterID = externalEncoderID;
|
||||
|
||||
atom_execute_table(gAtomContext, index, (uint32*)&args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user