Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293816
b: refs/heads/master
c: 11fe126
h: refs/heads/master
v: v3
  • Loading branch information
Tvrtko Ursulin authored and Dave Airlie committed Mar 20, 2012
1 parent d8b9d9d commit df36a7e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c1b2d2da3451f5c8dd59bd7e05bd9729d2aee05
refs/heads/master: 11fe1266253a96c4d4ac9c07918372a98248c62e
27 changes: 27 additions & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,27 @@ static int radeon_dvi_get_modes(struct drm_connector *connector)
return ret;
}

static bool radeon_check_hpd_status_unchanged(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
enum drm_connector_status status;

/* We only trust HPD on R600 and newer ASICS. */
if (rdev->family >= CHIP_R600
&& radeon_connector->hpd.hpd != RADEON_HPD_NONE) {
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
status = connector_status_connected;
else
status = connector_status_disconnected;
if (connector->status == status)
return true;
}

return false;
}

/*
* DVI is complicated
* Do a DDC probe, if DDC probe passes, get the full EDID so
Expand All @@ -851,6 +872,9 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
enum drm_connector_status ret = connector_status_disconnected;
bool dret = false;

if (!force && radeon_check_hpd_status_unchanged(connector))
return connector->status;

if (radeon_connector->ddc_bus)
dret = radeon_ddc_probe(radeon_connector);
if (dret) {
Expand Down Expand Up @@ -1254,6 +1278,9 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
struct drm_encoder *encoder = radeon_best_single_encoder(connector);

if (!force && radeon_check_hpd_status_unchanged(connector))
return connector->status;

if (radeon_connector->edid) {
kfree(radeon_connector->edid);
radeon_connector->edid = NULL;
Expand Down

0 comments on commit df36a7e

Please sign in to comment.