diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2011-10-31 13:58:47 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-11-01 17:04:39 +0100 |
commit | 1d33e1fc8dcce667a70387b666a8b6f60153d90f (patch) | |
tree | 83ce0cbf593323e00e3fcf2bdf83bdc1a4a2d5ab /drivers/gpu/drm/radeon/radeon_encoders.c | |
parent | drm/radeon/kms: use defined constants for crtc/hpd count instead of hard-code... (diff) | |
download | linux-1d33e1fc8dcce667a70387b666a8b6f60153d90f.tar.xz linux-1d33e1fc8dcce667a70387b666a8b6f60153d90f.zip |
drm/radeon/kms: rework DP bridge checks
Return the encoder id rather than a boolean. This is needed
for differentiate between multiple DP bridge chips.
Signed-off-by: Alex Deucher <alexander.deucher@amd.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 | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index eb3f6dc6df83..9838865e223b 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c @@ -266,7 +266,7 @@ struct drm_encoder *radeon_atom_get_external_encoder(struct drm_encoder *encoder return NULL; } -bool radeon_encoder_is_dp_bridge(struct drm_encoder *encoder) +u16 radeon_encoder_get_dp_bridge_encoder_id(struct drm_encoder *encoder) { struct drm_encoder *other_encoder = radeon_atom_get_external_encoder(encoder); @@ -368,7 +368,7 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, if (ASIC_IS_DCE3(rdev) && ((radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) || - radeon_encoder_is_dp_bridge(encoder))) { + (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE))) { struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); radeon_dp_set_link_config(connector, mode); } @@ -658,7 +658,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder) struct radeon_connector_atom_dig *dig_connector; /* dp bridges are always DP */ - if (radeon_encoder_is_dp_bridge(encoder)) + if (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE) return ATOM_ENCODER_MODE_DP; /* DVO is always DVO */ @@ -1638,7 +1638,7 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder) break; case 2: args.v2.ucCRTC = radeon_crtc->crtc_id; - if (radeon_encoder_is_dp_bridge(encoder)) { + if (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE) { struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS) @@ -2099,7 +2099,8 @@ static void radeon_atom_encoder_prepare(struct drm_encoder *encoder) if ((radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) || - radeon_encoder_is_dp_bridge(encoder)) { + (radeon_encoder_get_dp_bridge_encoder_id(encoder) != + ENCODER_OBJECT_ID_NONE)) { struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; if (dig) dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder); |