diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-12 05:33:12 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-07 06:06:02 -0500 |
commit | 3d3dc149eda48566619d165f6b34e5eeca00edf1 (patch) | |
tree | ae12c801729053a5e6639ef46746ba07d8f8e9a4 /drivers/gpu | |
parent | a7a75c8f70d6f6a2f16c9f627f938bbee2d32718 (diff) |
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.
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 3216adcf54d2..d29e33f815d7 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1856,6 +1856,9 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
1856 | if (!intel_dp) | 1856 | if (!intel_dp) |
1857 | return; | 1857 | return; |
1858 | 1858 | ||
1859 | intel_dp->output_reg = output_reg; | ||
1860 | intel_dp->dpms_mode = -1; | ||
1861 | |||
1859 | intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL); | 1862 | intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL); |
1860 | if (!intel_connector) { | 1863 | if (!intel_connector) { |
1861 | kfree(intel_dp); | 1864 | kfree(intel_dp); |
@@ -1895,10 +1898,6 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
1895 | connector->interlace_allowed = true; | 1898 | connector->interlace_allowed = true; |
1896 | connector->doublescan_allowed = 0; | 1899 | connector->doublescan_allowed = 0; |
1897 | 1900 | ||
1898 | intel_dp->output_reg = output_reg; | ||
1899 | intel_dp->has_audio = false; | ||
1900 | intel_dp->dpms_mode = DRM_MODE_DPMS_ON; | ||
1901 | |||
1902 | drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs, | 1901 | drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs, |
1903 | DRM_MODE_ENCODER_TMDS); | 1902 | DRM_MODE_ENCODER_TMDS); |
1904 | drm_encoder_helper_add(&intel_encoder->base, &intel_dp_helper_funcs); | 1903 | drm_encoder_helper_add(&intel_encoder->base, &intel_dp_helper_funcs); |
@@ -1951,14 +1950,18 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
1951 | ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV, | 1950 | ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV, |
1952 | intel_dp->dpcd, | 1951 | intel_dp->dpcd, |
1953 | sizeof(intel_dp->dpcd)); | 1952 | sizeof(intel_dp->dpcd)); |
1953 | ironlake_edp_panel_vdd_off(intel_dp); | ||
1954 | if (ret == sizeof(intel_dp->dpcd)) { | 1954 | if (ret == sizeof(intel_dp->dpcd)) { |
1955 | if (intel_dp->dpcd[0] >= 0x11) | 1955 | if (intel_dp->dpcd[0] >= 0x11) |
1956 | dev_priv->no_aux_handshake = intel_dp->dpcd[3] & | 1956 | dev_priv->no_aux_handshake = intel_dp->dpcd[3] & |
1957 | DP_NO_AUX_HANDSHAKE_LINK_TRAINING; | 1957 | DP_NO_AUX_HANDSHAKE_LINK_TRAINING; |
1958 | } else { | 1958 | } else { |
1959 | /* if this fails, presume the device is a ghost */ | ||
1959 | DRM_ERROR("failed to retrieve link info\n"); | 1960 | DRM_ERROR("failed to retrieve link info\n"); |
1961 | intel_dp_destroy(&intel_connector->base); | ||
1962 | intel_dp_encoder_destroy(&intel_dp->base.base); | ||
1963 | return; | ||
1960 | } | 1964 | } |
1961 | ironlake_edp_panel_vdd_off(intel_dp); | ||
1962 | } | 1965 | } |
1963 | 1966 | ||
1964 | intel_encoder->hot_plug = intel_dp_hot_plug; | 1967 | intel_encoder->hot_plug = intel_dp_hot_plug; |