Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262520
b: refs/heads/master
c: 71ba900
h: refs/heads/master
v: v3
  • Loading branch information
Adam Jackson authored and Keith Packard committed Jul 25, 2011
1 parent c7c478e commit ccd7fa2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 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: ac66ae8346fff704301e24ac55da1d76020660b2
refs/heads/master: 71ba9000e673d6171a52f2a8b14e0419087f7199
33 changes: 15 additions & 18 deletions trunk/drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,11 +1595,23 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
}
}

static enum drm_connector_status
i915_dp_detect_common(struct intel_dp *intel_dp)
{
enum drm_connector_status status = connector_status_disconnected;

if (intel_dp_aux_native_read_retry(intel_dp, 0x000, intel_dp->dpcd,
sizeof (intel_dp->dpcd)) &&
(intel_dp->dpcd[DP_DPCD_REV] != 0))
status = connector_status_connected;

return status;
}

static enum drm_connector_status
ironlake_dp_detect(struct intel_dp *intel_dp)
{
enum drm_connector_status status;
bool ret;

/* Can't disconnect eDP, but you can close the lid... */
if (is_edp(intel_dp)) {
Expand All @@ -1609,21 +1621,14 @@ ironlake_dp_detect(struct intel_dp *intel_dp)
return status;
}

status = connector_status_disconnected;
ret = intel_dp_aux_native_read_retry(intel_dp,
0x000, intel_dp->dpcd,
sizeof (intel_dp->dpcd));
if (ret && intel_dp->dpcd[DP_DPCD_REV] != 0)
status = connector_status_connected;
return status;
return i915_dp_detect_common(intel_dp);
}

static enum drm_connector_status
g4x_dp_detect(struct intel_dp *intel_dp)
{
struct drm_device *dev = intel_dp->base.base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
enum drm_connector_status status;
uint32_t temp, bit;

switch (intel_dp->output_reg) {
Expand All @@ -1645,15 +1650,7 @@ g4x_dp_detect(struct intel_dp *intel_dp)
if ((temp & bit) == 0)
return connector_status_disconnected;

status = connector_status_disconnected;
if (intel_dp_aux_native_read(intel_dp, 0x000, intel_dp->dpcd,
sizeof (intel_dp->dpcd)) == sizeof (intel_dp->dpcd))
{
if (intel_dp->dpcd[DP_DPCD_REV] != 0)
status = connector_status_connected;
}

return status;
return i915_dp_detect_common(intel_dp);
}

/**
Expand Down

0 comments on commit ccd7fa2

Please sign in to comment.