aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_connectors.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-23 18:02:35 -0500
committerDave Airlie <airlied@redhat.com>2009-12-08 10:22:42 +1000
commit4143e919ea999c9356ae4f71b5a3a80e075290d5 (patch)
treea73412bd65201398aa364146f70b35e1ea6b43bb /drivers/gpu/drm/radeon/radeon_connectors.c
parent6a93cb250a60af1bb7b4070949f8546a2fdc52ef (diff)
drm/radeon/kms: store sink type in atom dig connector
This will be used laster when the encoder and transmitters are set up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_connectors.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 98634ce5ba10..b51e38386cc0 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -908,13 +908,9 @@ static int radeon_dp_get_modes(struct drm_connector *connector)
static enum drm_connector_status radeon_dp_detect(struct drm_connector *connector)
{
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
- struct drm_encoder *encoder = NULL;
- struct drm_encoder_helper_funcs *encoder_funcs;
- struct drm_mode_object *obj;
- int i;
enum drm_connector_status ret = connector_status_disconnected;
- int sink_type;
- bool dret;
+ struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
+ u8 sink_type;
if (radeon_connector->edid) {
kfree(radeon_connector->edid);
@@ -924,8 +920,17 @@ static enum drm_connector_status radeon_dp_detect(struct drm_connector *connecto
sink_type = radeon_dp_getsinktype(radeon_connector);
if (sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
radeon_dp_getdpcd(radeon_connector);
+ radeon_dig_connector->dp_sink_type = sink_type;
ret = connector_status_connected;
+ } else {
+ radeon_i2c_do_lock(radeon_connector->ddc_bus, 1);
+ if (radeon_ddc_probe(radeon_connector)) {
+ radeon_dig_connector->dp_sink_type = sink_type;
+ ret = connector_status_connected;
+ }
+ radeon_i2c_do_lock(radeon_connector->ddc_bus, 0);
}
+
return ret;
}