diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-11-05 00:51:11 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-11-05 00:51:11 -0500 |
commit | 873897c54429e230a23011a9dd2f1069f4eb7752 (patch) | |
tree | 81410aebf8d7bd846af02c20b99551b7fd2ebc5b | |
parent | 3028374488cc0f34942ac372c8d05cf15898a613 (diff) |
DCE3+: call transmitter init on mode set
Generally this is done at post, but might not always
be done with softboot or for connectors on docking
stations.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | src/atombios_output.c | 41 | ||||
-rw-r--r-- | src/radeon_atombios.c | 5 | ||||
-rw-r--r-- | src/radeon_output.c | 1 | ||||
-rw-r--r-- | src/radeon_probe.h | 2 |
4 files changed, 32 insertions, 17 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index 4db5d0c..d85c3f6 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -646,15 +646,19 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action) disp_data.v1.ucAction = action; if (IS_DCE32_VARIANT) { - if (radeon_output->MonType == MT_DP) { - disp_data.v2.usPixelClock = - cpu_to_le16(dp_link_clock_for_mode_clock(clock)); - disp_data.v2.acConfig.fDPConnector = 1; - } else if (clock > 165000) { - disp_data.v2.usPixelClock = cpu_to_le16((clock / 2) / 10); - disp_data.v2.acConfig.fDualLinkConnector = 1; + if (action == ATOM_TRANSMITTER_ACTION_INIT) { + disp_data.v2.usInitInfo = radeon_output->connector_object_id; } else { - disp_data.v2.usPixelClock = cpu_to_le16(clock / 10); + if (radeon_output->MonType == MT_DP) { + disp_data.v2.usPixelClock = + cpu_to_le16(dp_link_clock_for_mode_clock(clock)); + disp_data.v2.acConfig.fDPConnector = 1; + } else if (clock > 165000) { + disp_data.v2.usPixelClock = cpu_to_le16((clock / 2) / 10); + disp_data.v2.acConfig.fDualLinkConnector = 1; + } else { + disp_data.v2.usPixelClock = cpu_to_le16(clock / 10); + } } if (dig_block) disp_data.v2.acConfig.ucEncoderSel = 1; @@ -684,13 +688,17 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action) } else { disp_data.v1.ucConfig = ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL; - if (radeon_output->MonType == MT_DP) - disp_data.v1.usPixelClock = - cpu_to_le16(dp_link_clock_for_mode_clock(clock)); - else if (clock > 165000) - disp_data.v1.usPixelClock = cpu_to_le16((clock / 2) / 10); - else - disp_data.v1.usPixelClock = cpu_to_le16(clock / 10); + if (action == ATOM_TRANSMITTER_ACTION_INIT) { + disp_data.v1.usInitInfo = radeon_output->connector_object_id; + } else { + if (radeon_output->MonType == MT_DP) + disp_data.v1.usPixelClock = + cpu_to_le16(dp_link_clock_for_mode_clock(clock)); + else if (clock > 165000) + disp_data.v1.usPixelClock = cpu_to_le16((clock / 2) / 10); + else + disp_data.v1.usPixelClock = cpu_to_le16(clock / 10); + } switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: @@ -1488,7 +1496,7 @@ atombios_output_mode_set(xf86OutputPtr output, radeon_encoder_ptr radeon_encoder = radeon_get_encoder(output); RADEONInfoPtr info = RADEONPTR(output->scrn); if (radeon_encoder == NULL) - return; + return; radeon_output->pixel_clock = adjusted_mode->Clock; radeon_output->dig_block = radeon_crtc->crtc_id; @@ -1520,6 +1528,7 @@ atombios_output_mode_set(xf86OutputPtr output, /* setup and enable the encoder and transmitter */ atombios_output_dig_encoder_setup(output, ATOM_ENABLE); + atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_INIT); atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_SETUP); atombios_output_dig_transmitter_setup(output, ATOM_TRANSMITTER_ACTION_ENABLE); break; diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index 1f4b9dc..f3c88bc 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -1873,10 +1873,13 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn) ct = (slot_config >> 16) & 0xff; info->BiosConnector[i].ConnectorType = object_connector_convert[ct]; + info->BiosConnector[i].connector_object_id = ct; info->BiosConnector[i].igp_lane_info = slot_config & 0xffff; } - } else + } else { info->BiosConnector[i].ConnectorType = object_connector_convert[con_obj_id]; + info->BiosConnector[i].connector_object_id = con_obj_id; + } if (info->BiosConnector[i].ConnectorType == CONNECTOR_NONE) { info->BiosConnector[i].valid = FALSE; diff --git a/src/radeon_output.c b/src/radeon_output.c index 6e00ab8..9d9a16c 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -2860,6 +2860,7 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) radeon_output->load_detection = info->BiosConnector[i].load_detection; radeon_output->linkb = info->BiosConnector[i].linkb; radeon_output->connector_id = info->BiosConnector[i].connector_object; + radeon_output->connector_object_id = info->BiosConnector[i].connector_object_id; /* Technically HDMI-B is a glorfied DL DVI so the bios is correct, * but this can be confusing to users when it comes to output names, diff --git a/src/radeon_probe.h b/src/radeon_probe.h index 0ae3a87..12e73ef 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -239,6 +239,7 @@ typedef struct { Bool load_detection; Bool linkb; uint16_t connector_object; + uint16_t connector_object_id; } RADEONBIOSConnector; typedef struct _RADEONOutputPrivateRec { @@ -254,6 +255,7 @@ typedef struct _RADEONOutputPrivateRec { Bool linkb; RADEONConnectorType ConnectorType; + uint16_t connector_object_id; RADEONDviType DVIType; RADEONMonitorType MonType; |