diff options
author | Dave Airlie <airlied@linux.ie> | 2010-01-29 15:10:33 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2010-01-29 15:10:33 +1000 |
commit | 5c11264517d1b9808415d47e9dedc345610f0f86 (patch) | |
tree | 90157fda92fe952c5aa429f5dd5842d5890702f6 /src | |
parent | 872a11fa9efb0b76cef83089ea1bb80792b94930 (diff) |
radeon: further digital encoder cleanups.
this just cleans up a few more bits of the digital encoder setup.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/atombios_output.c | 47 |
1 files changed, 10 insertions, 37 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index ff428fd9..6a769b0a 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -582,28 +582,10 @@ atombios_output_dig_encoder_setup(xf86OutputPtr output, int action) memset(&disp_data,0, sizeof(disp_data)); - if (IS_DCE32_VARIANT) { - if (radeon_output->dig_encoder) - index = GetIndexIntoMasterTable(COMMAND, DIG2EncoderControl); - else - index = GetIndexIntoMasterTable(COMMAND, DIG1EncoderControl); - } else { - switch (radeon_encoder->encoder_id) { - case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: - /* doesn't really matter which dig encoder we pick as long as it's - * not already in use - */ - if (radeon_output->dig_encoder) - index = GetIndexIntoMasterTable(COMMAND, DIG2EncoderControl); - else - index = GetIndexIntoMasterTable(COMMAND, DIG1EncoderControl); - break; - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: - /* Only dig2 encoder can drive LVTMA */ - index = GetIndexIntoMasterTable(COMMAND, DIG2EncoderControl); - break; - } - } + if (radeon_output->dig_encoder) + index = GetIndexIntoMasterTable(COMMAND, DIG2EncoderControl); + else + index = GetIndexIntoMasterTable(COMMAND, DIG1EncoderControl); atombios_get_command_table_version(info->atomBIOS, index, &major, &minor); @@ -766,15 +748,13 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action, uint8_t disp_data.v1.usPixelClock = cpu_to_le16(clock / 10); } + if (radeon_output->dig_encoder) + disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER; + else + disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER; + switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: - /* doesn't really matter which dig encoder we pick as long as it's - * not already in use - */ - if (radeon_output->dig_encoder) - disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER; - else - disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER; if (info->IsIGP) { if (clock > 165000) { if (radeon_output->igp_lane_info & 0x3) @@ -793,10 +773,6 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action, uint8_t } } break; - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: - /* Only dig2 encoder can drive LVTMA */ - disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER; - break; } if (clock > 165000) disp_data.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_8LANE_LINK; @@ -1466,15 +1442,12 @@ atombios_set_output_crtc_source(xf86OutputPtr output) case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: if (radeon_output->dig_encoder) crtc_src_param2.ucEncoderID = ASIC_INT_DIG2_ENCODER_ID; else crtc_src_param2.ucEncoderID = ASIC_INT_DIG1_ENCODER_ID; break; - case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: - /* Only dig2 encoder can drive LVTMA */ - crtc_src_param2.ucEncoderID = ASIC_INT_DIG2_ENCODER_ID; - break; case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: if (radeon_output->active_device & (ATOM_DEVICE_TV_SUPPORT)) crtc_src_param2.ucEncoderID = ASIC_INT_TV_ENCODER_ID; |