aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_encoders.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 1b557554696e..03f124d626c2 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -954,10 +954,15 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
954 int dp_lane_count = 0; 954 int dp_lane_count = 0;
955 int connector_object_id = 0; 955 int connector_object_id = 0;
956 int igp_lane_info = 0; 956 int igp_lane_info = 0;
957 int dig_encoder = dig->dig_encoder;
957 958
958 if (action == ATOM_TRANSMITTER_ACTION_INIT) 959 if (action == ATOM_TRANSMITTER_ACTION_INIT) {
959 connector = radeon_get_connector_for_encoder_init(encoder); 960 connector = radeon_get_connector_for_encoder_init(encoder);
960 else 961 /* just needed to avoid bailing in the encoder check. the encoder
962 * isn't used for init
963 */
964 dig_encoder = 0;
965 } else
961 connector = radeon_get_connector_for_encoder(encoder); 966 connector = radeon_get_connector_for_encoder(encoder);
962 967
963 if (connector) { 968 if (connector) {
@@ -973,7 +978,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
973 } 978 }
974 979
975 /* no dig encoder assigned */ 980 /* no dig encoder assigned */
976 if (dig->dig_encoder == -1) 981 if (dig_encoder == -1)
977 return; 982 return;
978 983
979 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_DP) 984 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_DP)
@@ -1023,7 +1028,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
1023 1028
1024 if (dig->linkb) 1029 if (dig->linkb)
1025 args.v3.acConfig.ucLinkSel = 1; 1030 args.v3.acConfig.ucLinkSel = 1;
1026 if (dig->dig_encoder & 1) 1031 if (dig_encoder & 1)
1027 args.v3.acConfig.ucEncoderSel = 1; 1032 args.v3.acConfig.ucEncoderSel = 1;
1028 1033
1029 /* Select the PLL for the PHY 1034 /* Select the PLL for the PHY
@@ -1073,7 +1078,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
1073 args.v3.acConfig.fDualLinkConnector = 1; 1078 args.v3.acConfig.fDualLinkConnector = 1;
1074 } 1079 }
1075 } else if (ASIC_IS_DCE32(rdev)) { 1080 } else if (ASIC_IS_DCE32(rdev)) {
1076 args.v2.acConfig.ucEncoderSel = dig->dig_encoder; 1081 args.v2.acConfig.ucEncoderSel = dig_encoder;
1077 if (dig->linkb) 1082 if (dig->linkb)
1078 args.v2.acConfig.ucLinkSel = 1; 1083 args.v2.acConfig.ucLinkSel = 1;
1079 1084
@@ -1100,7 +1105,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
1100 } else { 1105 } else {
1101 args.v1.ucConfig = ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL; 1106 args.v1.ucConfig = ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL;
1102 1107
1103 if (dig->dig_encoder) 1108 if (dig_encoder)
1104 args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER; 1109 args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER;
1105 else 1110 else
1106 args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER; 1111 args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER;