drm/radeon/kms: rework DP bridge checks
[linux-2.6.git] / drivers / gpu / drm / radeon / atombios_crtc.c
index 4901179..9bb3d6f 100644 (file)
@@ -558,7 +558,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
                                bpc = connector->display_info.bpc;
                        encoder_mode = atombios_get_encoder_mode(encoder);
                        if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) ||
-                           radeon_encoder_is_dp_bridge(encoder)) {
+                           (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)) {
                                if (connector) {
                                        struct radeon_connector *radeon_connector = to_radeon_connector(connector);
                                        struct radeon_connector_atom_dig *dig_connector =
@@ -656,11 +656,11 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
                                                args.v3.sInput.ucDispPllConfig |=
                                                        DISPPLL_CONFIG_DUAL_LINK;
                                }
-                               if (radeon_encoder_is_dp_bridge(encoder)) {
-                                       struct drm_encoder *ext_encoder = radeon_atom_get_external_encoder(encoder);
-                                       struct radeon_encoder *ext_radeon_encoder = to_radeon_encoder(ext_encoder);
-                                       args.v3.sInput.ucExtTransmitterID = ext_radeon_encoder->encoder_id;
-                               } else
+                               if (radeon_encoder_get_dp_bridge_encoder_id(encoder) !=
+                                   ENCODER_OBJECT_ID_NONE)
+                                       args.v3.sInput.ucExtTransmitterID =
+                                               radeon_encoder_get_dp_bridge_encoder_id(encoder);
+                               else
                                        args.v3.sInput.ucExtTransmitterID = 0;
 
                                atom_execute_table(rdev->mode_info.atom_context,