aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-27 13:01:46 -0500
committerDave Airlie <airlied@redhat.com>2009-12-07 19:22:48 -0500
commit9fa05c98d69eb77c82e59b5e434ca63bba230ba0 (patch)
tree05c1cf57b3fc1456d82d5f65e90a512780ecabc8 /drivers
parente8696330e2a95e1b5872550dcf3ed04aecaf96b3 (diff)
drm/radeon/kms: fix DP detect
only return connected if there is actually a monitor connected. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/atombios_dp.c6
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c7
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c6
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h2
4 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index e1cbd5049f86..75977a46ba1c 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -440,7 +440,7 @@ u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector)
440 dig_connector->dp_i2c_bus->rec.i2c_id, 0); 440 dig_connector->dp_i2c_bus->rec.i2c_id, 0);
441} 441}
442 442
443void radeon_dp_getdpcd(struct radeon_connector *radeon_connector) 443bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
444{ 444{
445 struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv; 445 struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;
446 u8 msg[25]; 446 u8 msg[25];
@@ -456,10 +456,10 @@ void radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
456 printk("%02x ", msg[i]); 456 printk("%02x ", msg[i]);
457 printk("\n"); 457 printk("\n");
458 } 458 }
459 return; 459 return true;
460 } 460 }
461 dig_connector->dpcd[0] = 0; 461 dig_connector->dpcd[0] = 0;
462 return; 462 return false;
463} 463}
464 464
465void radeon_dp_set_link_config(struct drm_connector *connector, 465void radeon_dp_set_link_config(struct drm_connector *connector,
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 9c57633a4f45..563847213609 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -936,9 +936,10 @@ static enum drm_connector_status radeon_dp_detect(struct drm_connector *connecto
936 936
937 sink_type = radeon_dp_getsinktype(radeon_connector); 937 sink_type = radeon_dp_getsinktype(radeon_connector);
938 if (sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { 938 if (sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
939 radeon_dp_getdpcd(radeon_connector); 939 if (radeon_dp_getdpcd(radeon_connector)) {
940 radeon_dig_connector->dp_sink_type = sink_type; 940 radeon_dig_connector->dp_sink_type = sink_type;
941 ret = connector_status_connected; 941 ret = connector_status_connected;
942 }
942 } else { 943 } else {
943 radeon_i2c_do_lock(radeon_connector->ddc_bus, 1); 944 radeon_i2c_do_lock(radeon_connector->ddc_bus, 1);
944 if (radeon_ddc_probe(radeon_connector)) { 945 if (radeon_ddc_probe(radeon_connector)) {
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index a1c2804b694d..62c929e5b089 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -339,10 +339,8 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
339 339
340 if (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) { 340 if (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
341 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; 341 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
342 if (dig->dp_i2c_bus) { 342 if (dig->dp_i2c_bus)
343 radeon_connector->edid = drm_get_edid(&radeon_connector->base, &dig->dp_i2c_bus->adapter); 343 radeon_connector->edid = drm_get_edid(&radeon_connector->base, &dig->dp_i2c_bus->adapter);
344 DRM_INFO("got edid %p from DP\n", radeon_connector->edid);
345 }
346 } 344 }
347 if (!radeon_connector->ddc_bus) 345 if (!radeon_connector->ddc_bus)
348 return -1; 346 return -1;
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 7d03e3971498..a2633628dbb8 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -375,7 +375,7 @@ extern void radeon_dp_set_link_config(struct drm_connector *connector,
375extern void dp_link_train(struct drm_encoder *encoder, 375extern void dp_link_train(struct drm_encoder *encoder,
376 struct drm_connector *connector); 376 struct drm_connector *connector);
377extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector); 377extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector);
378extern void radeon_dp_getdpcd(struct radeon_connector *radeon_connector); 378extern bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector);
379extern void atombios_dig_transmitter_setup(struct drm_encoder *encoder, 379extern void atombios_dig_transmitter_setup(struct drm_encoder *encoder,
380 int action, uint8_t lane_num, 380 int action, uint8_t lane_num,
381 uint8_t lane_set); 381 uint8_t lane_set);