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>
This commit is contained in:
@@ -1856,6 +1856,9 @@ intel_dp_init(struct drm_device *dev, int output_reg)
|
|||||||
if (!intel_dp)
|
if (!intel_dp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
intel_dp->output_reg = output_reg;
|
||||||
|
intel_dp->dpms_mode = -1;
|
||||||
|
|
||||||
intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
|
intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
|
||||||
if (!intel_connector) {
|
if (!intel_connector) {
|
||||||
kfree(intel_dp);
|
kfree(intel_dp);
|
||||||
@@ -1895,10 +1898,6 @@ intel_dp_init(struct drm_device *dev, int output_reg)
|
|||||||
connector->interlace_allowed = true;
|
connector->interlace_allowed = true;
|
||||||
connector->doublescan_allowed = 0;
|
connector->doublescan_allowed = 0;
|
||||||
|
|
||||||
intel_dp->output_reg = output_reg;
|
|
||||||
intel_dp->has_audio = false;
|
|
||||||
intel_dp->dpms_mode = DRM_MODE_DPMS_ON;
|
|
||||||
|
|
||||||
drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
|
drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs,
|
||||||
DRM_MODE_ENCODER_TMDS);
|
DRM_MODE_ENCODER_TMDS);
|
||||||
drm_encoder_helper_add(&intel_encoder->base, &intel_dp_helper_funcs);
|
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)
|
|||||||
ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV,
|
ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV,
|
||||||
intel_dp->dpcd,
|
intel_dp->dpcd,
|
||||||
sizeof(intel_dp->dpcd));
|
sizeof(intel_dp->dpcd));
|
||||||
|
ironlake_edp_panel_vdd_off(intel_dp);
|
||||||
if (ret == sizeof(intel_dp->dpcd)) {
|
if (ret == sizeof(intel_dp->dpcd)) {
|
||||||
if (intel_dp->dpcd[0] >= 0x11)
|
if (intel_dp->dpcd[0] >= 0x11)
|
||||||
dev_priv->no_aux_handshake = intel_dp->dpcd[3] &
|
dev_priv->no_aux_handshake = intel_dp->dpcd[3] &
|
||||||
DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
|
DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
|
||||||
} else {
|
} else {
|
||||||
|
/* if this fails, presume the device is a ghost */
|
||||||
DRM_ERROR("failed to retrieve link info\n");
|
DRM_ERROR("failed to retrieve link info\n");
|
||||||
|
intel_dp_destroy(&intel_connector->base);
|
||||||
|
intel_dp_encoder_destroy(&intel_dp->base.base);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
ironlake_edp_panel_vdd_off(intel_dp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
intel_encoder->hot_plug = intel_dp_hot_plug;
|
intel_encoder->hot_plug = intel_dp_hot_plug;
|
||||||
|
Reference in New Issue
Block a user