diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-06-03 16:39:06 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-06-05 02:34:13 -0400 |
commit | f3aeceac61b6e2f3167717ea1793472108e47564 (patch) | |
tree | 53548d8928108f10f772f02899fab7199e2625a4 /drivers/gpu/drm/radeon/radeon_encoders.c | |
parent | fe6f0bd03d697835e76dd18d232ba476c65b8282 (diff) |
drm/radeon/kms/atom: fix PHY init
The PHY was not initialized correctly after
ac89af1e1010640db072416c786f97391b85790f since
the function bailed early as an encoder was not
assigned. The encoder isn't necessary for PHY init
so just assign to 0 for init so that the table
is executed.
Reported-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Tested-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_encoders.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_encoders.c | 17 |
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 1b557554696..03f124d626c 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; |