From a65c578ccd42378ae3ac13391469635a8b493f91 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 12 Feb 2011 10:33:12 +0000 Subject: [PATCH] drm/i915/dp: Sanity check eDP existence Some hardware claims to have both an LVDS panel and an eDP output. Whilst this may be true in a rare case, more often it is just broken hardware. If we see an eDP device we know that it must be connected and so we can confirm its existence with a simple probe. This is a combination of mainline commits: 3d3dc149eda48566619d165f6b34e5eeca00edf1 48898b038b69ef4801f0e059026c8f6920684677 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34165 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24822 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_dp.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 51cb4e3..27e2088 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1917,7 +1917,11 @@ intel_dp_init(struct drm_device *dev, int output_reg) dev_priv->no_aux_handshake = intel_dp->dpcd[3] & DP_NO_AUX_HANDSHAKE_LINK_TRAINING; } else { - DRM_ERROR("failed to retrieve link info\n"); + /* if this fails, presume the device is a ghost */ + DRM_INFO("failed to retrieve link info, disabling eDP\n"); + intel_dp_encoder_destroy(&intel_dp->base.base); + intel_dp_destroy(&intel_connector->base); + return; } if (!was_on) ironlake_edp_panel_off(dev); -- 1.7.4.1