Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269732
b: refs/heads/master
c: d0d0a22
h: refs/heads/master
v: v3
  • Loading branch information
Alex Deucher authored and Dave Airlie committed Oct 10, 2011
1 parent 806ae19 commit dd68968
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f0a26128d66ef81613fe923d5c288942844ccdc
refs/heads/master: d0d0a225e6ad43314c9aa7ea081f76adc5098ad4
23 changes: 20 additions & 3 deletions trunk/drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
dret = radeon_ddc_probe(radeon_connector,
radeon_connector->requires_extended_probe);
if (dret) {
radeon_connector->detected_by_load = false;
if (radeon_connector->edid) {
kfree(radeon_connector->edid);
radeon_connector->edid = NULL;
Expand All @@ -750,12 +751,21 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
} else {

/* if we aren't forcing don't do destructive polling */
if (!force)
return connector->status;
if (!force) {
/* only return the previous status if we last
* detected a monitor via load.
*/
if (radeon_connector->detected_by_load)
return connector->status;
else
return ret;
}

if (radeon_connector->dac_load_detect && encoder) {
encoder_funcs = encoder->helper_private;
ret = encoder_funcs->detect(encoder, connector);
if (ret == connector_status_connected)
radeon_connector->detected_by_load = true;
}
}

Expand Down Expand Up @@ -897,6 +907,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
dret = radeon_ddc_probe(radeon_connector,
radeon_connector->requires_extended_probe);
if (dret) {
radeon_connector->detected_by_load = false;
if (radeon_connector->edid) {
kfree(radeon_connector->edid);
radeon_connector->edid = NULL;
Expand Down Expand Up @@ -964,8 +975,13 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
(connector->connector_type == DRM_MODE_CONNECTOR_HDMIA))
goto out;

/* if we aren't forcing don't do destructive polling */
if (!force) {
ret = connector->status;
/* only return the previous status if we last
* detected a monitor via load.
*/
if (radeon_connector->detected_by_load)
ret = connector->status;
goto out;
}

Expand All @@ -989,6 +1005,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
ret = encoder_funcs->detect(encoder, connector);
if (ret == connector_status_connected) {
radeon_connector->use_digital = false;
radeon_connector->detected_by_load = true;
}
}
break;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ struct radeon_connector {
struct edid *edid;
void *con_priv;
bool dac_load_detect;
bool detected_by_load; /* if the connection status was determined by load */
uint16_t connector_object_id;
struct radeon_hpd hpd;
struct radeon_router router;
Expand Down

0 comments on commit dd68968

Please sign in to comment.