[PATCH 5/5] drm/i915/ilk: Don't attempt to register eDP if LVDS was detected
Imre Deak
imre.deak at intel.com
Fri Jun 17 14:58:03 UTC 2016
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 75d07d8..300af7e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5382,8 +5382,22 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
if (!is_edp(intel_dp))
return true;
+ /*
+ * On ILK we may get here with LVDS already registered. Since the
+ * driver uses the only internal power sequencer available for both
+ * eDP and LVDS bail out early in this case to prevent interfering
+ * with an already powered-on LVDS power sequencer.
+ */
+ for_each_intel_encoder(dev, intel_encoder) {
+ if (intel_encoder->type == INTEL_OUTPUT_LVDS) {
+ DRM_INFO("LVDS was detected, not registering eDP\n");
+ return false;
+ }
+ }
+
pps_lock(intel_dp);
intel_edp_panel_vdd_sanitize(intel_dp);
+ intel_dp_init_panel_power_sequencer_registers(dev, intel_dp);
pps_unlock(intel_dp);
/* Cache DPCD and EDID for edp. */
@@ -5400,11 +5414,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
return false;
}
- /* We now know it's not a ghost, init power sequence regs. */
- pps_lock(intel_dp);
- intel_dp_init_panel_power_sequencer_registers(dev, intel_dp);
- pps_unlock(intel_dp);
-
mutex_lock(&dev->mode_config.mutex);
edid = drm_get_edid(connector, &intel_dp->aux.ddc);
if (edid) {
--
2.5.0
More information about the Intel-gfx-trybot
mailing list