Skip to contentSkip to conversation

drm/i915: don't try and probe dpcd if we have no dp configured

PATCH In review Dave Airlie 2 participants 2 messages Aug 1, 2014

Subsystems (2)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: don't try and probe dpcd if we have no dp configured

On hsw/bdw VBT can signal no DP on a digital connector, so when we get a hotplug irq in that situation, don't continue if we haven't actually got a DP output register configured.

This fixes an oops where the aux mutex isn't initialised.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81856

---
 drivers/gpu/drm/i915/intel_dp.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +3 -0
index e7a7953..691d169 100644
@@ -3966,6 +3966,9 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 		if (!ibx_digital_port_connected(dev_priv, intel_dig_port))
 			goto mst_fail;
 
+		if (!intel_dp->output_reg)
+			goto mst_fail;
+
 		if (!intel_dp_get_dpcd(intel_dp)) {
 			goto mst_fail;
 		}
Signature · 1 line
1.9.3
#1 lore raw
Quoted 18 lines · Dave Airlie

On hsw/bdw VBT can signal no DP on a digital connector, so when we get a hotplug irq in that situation, don't continue if we haven't actually got a DP output register configured.

This fixes an oops where the aux mutex isn't initialised.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81856

---
 drivers/gpu/drm/i915/intel_dp.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +0 -0
index e7a7953..691d169 100644

drivers/gpu/drm/i915/intel_dp.c intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) · line 3971

Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +3 -0
@@ -3966,6 +3966,9 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 		if (!ibx_digital_port_connected(dev_priv, intel_dig_port))
 			goto mst_fail;
 
+		if (!intel_dp->output_reg)
+			goto mst_fail;
+

What about just not setting the hpd_pulse function pointer when it's not a DP connector?

Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +0 -0
 		if (!intel_dp_get_dpcd(intel_dp)) {
 			goto mst_fail;
 		}
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC