drm/i915/ddi: fix intel_display_port_aux_power_domain() after HDMI detect
Subsystems (2)
PATCH 1/2 drm/i915/ddi: fix intel_display_port_aux_power_domain() after HDMI detect
Due to the current sharing of the DDI encoder between DP and HDMI connectors we can run the DP detection after the HDMI detection has already set the shared encoder's type. For now solve this keeping the current behavior and running the detection in this case too. For a proper solution Ville suggested to split the encoder into an HDMI and DP one, that can be done as a follow-up.
This issue triggers the WARN in intel_display_port_aux_power_domain() and was introduced in:
commit 25f78f58e5bfb46a270ce4d690fb49dc104558b1
Author: Ville Syrjälä <[email protected]> Date: Mon Nov 16 15:01:04 2015 +0100
drm/i915: Clean up AUX power domain handling
--- drivers/gpu/drm/i915/intel_display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +8 -1
@@ -5230,7 +5230,14 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder)switch (intel_encoder->type) {case INTEL_OUTPUT_UNKNOWN : -/* Only DDI platforms should ever use this output type */ +case INTEL_OUTPUT_HDMI : +/* +* Only DDI platforms should ever use these output types. +* We can get here after the HDMI detect code has already set +* the type of the shared encoder. Since we can't be sure +* what's the status of the given connectors, play safe and +* run the DP detection too. +*/ WARN_ON_ONCE (!HAS_DDI (dev));case INTEL_OUTPUT_DISPLAYPORT :case INTEL_OUTPUT_EDP :
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: add MISSING_CASE to a few port/aux power domain helpers
MISSING_CASE() would have been useful to track down a recent problem in intel_display_port_aux_power_domain(), so add it there and a few related helpers. This was also suggested by Ville in his review of the latest DMC/DC changes, we forgot to address that.
--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -3
@@ -5166,7 +5166,7 @@ static enum intel_display_power_domain port_to_power_domain(enum port port)case PORT_E :return POWER_DOMAIN_PORT_DDI_E_LANES ;default : -WARN_ON_ONCE (1 ); +MISSING_CASE (port);return POWER_DOMAIN_PORT_OTHER ; } }
@@ -5186,7 +5186,7 @@ static enum intel_display_power_domain port_to_aux_power_domain(enum port port)/* FIXME: Check VBT for actual wiring of PORT E */ return POWER_DOMAIN_AUX_D ;default : -WARN_ON_ONCE (1 ); +MISSING_CASE (port);return POWER_DOMAIN_AUX_A ; } }
@@ -5247,7 +5247,7 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder) intel_dig_port =enc_to_mst (&intel_encoder->base)->primary;return port_to_aux_power_domain (intel_dig_port->port);default : -WARN_ON_ONCE (1 ); +MISSING_CASE (intel_encoder->type);return POWER_DOMAIN_AUX_A ; } }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: add MISSING_CASE to a few port/aux power domain helpers
Quoted 6 lines · Imre Deak
MISSING_CASE()would have been useful to track down a recent problem inintel_display_port_aux_power_domain(), so add it there and a few related helpers. This was also suggested by Ville in his review of the latest DMC/DC changes, we forgot to address that.Signed-off-by Imre Deak <[email protected]>
Quoted 37 lines
--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +3
-3@@ -5166,7 +5166,7 @@ static enum intel_display_power_domain port_to_power_domain(enum port port)case PORT_E :return POWER_DOMAIN_PORT_DDI_E_LANES ;default : -WARN_ON_ONCE (1 ); +MISSING_CASE (port);return POWER_DOMAIN_PORT_OTHER ; } }@@ -5186,7 +5186,7 @@ static enum intel_display_power_domain port_to_aux_power_domain(enum port port)/* FIXME: Check VBT for actual wiring of PORT E */ return POWER_DOMAIN_AUX_D ;default : -WARN_ON_ONCE (1 ); +MISSING_CASE (port);return POWER_DOMAIN_AUX_A ; } }@@ -5247,7 +5247,7 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder) intel_dig_port =enc_to_mst (&intel_encoder->base)->primary;return port_to_aux_power_domain (intel_dig_port->port);default : -WARN_ON_ONCE (1 ); +MISSING_CASE (intel_encoder->type);return POWER_DOMAIN_AUX_A ; } }Signature · 1 line
2.5.0
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: add MISSING_CASE to a few port/aux power domain helpers
In reply to Imre DeakQuoted 6 lines · Imre Deak
MISSING_CASE()would have been useful to track down a recent problem inintel_display_port_aux_power_domain(), so add it there and a few related helpers. This was also suggested by Ville in his review of the latest DMC/DC changes, we forgot to address that.Signed-off-by Imre Deak <[email protected]>
Quoted 38 lines
--- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +3
-3@@ -5166,7 +5166,7 @@ static enum intel_display_power_domain port_to_power_domain(enum port port)case PORT_E :return POWER_DOMAIN_PORT_DDI_E_LANES ;default : -WARN_ON_ONCE (1 ); +MISSING_CASE (port);return POWER_DOMAIN_PORT_OTHER ; } }@@ -5186,7 +5186,7 @@ static enum intel_display_power_domain port_to_aux_power_domain(enum port port)/* FIXME: Check VBT for actual wiring of PORT E */ return POWER_DOMAIN_AUX_D ;default : -WARN_ON_ONCE (1 ); +MISSING_CASE (port);return POWER_DOMAIN_AUX_A ; } }@@ -5247,7 +5247,7 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder) intel_dig_port =enc_to_mst (&intel_encoder->base)->primary;return port_to_aux_power_domain (intel_dig_port->port);default : -WARN_ON_ONCE (1 ); +MISSING_CASE (intel_encoder->type);return POWER_DOMAIN_AUX_A ; } }Signature · 1 line
2.5.0
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: add MISSING_CASE to a few port/aux power domain helpers
Quoted 9 lines · Patrik Jakobsson
Quoted 8 lines · Imre Deak
MISSING_CASE()would have been useful to track down a recent problem inintel_display_port_aux_power_domain(), so add it there and a few related
helpers. This was also suggested by Ville in his review of the latest
DMC/DC changes, we forgot to address that.
Quoted 3 lines
Quoted 1 line
Signed-off-by Imre Deak <[email protected]>Reviewed-by Patrik Jakobsson <[email protected]>
Pushed both patches to dinq, thanks for the review.
Quoted 33 lines
Quoted 33 lines
---
drivers/gpu/drm/i915/intel_display.c | 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -5166,7 +5166,7 @@ static enum intel_display_power_domain port_to_power_domain(enum port port)case
PORT_E:
returnPOWER_DOMAIN_PORT_DDI_E_LANES; default:drivers/gpu/drm/i915/intel_display.c +1
-1-WARN_ON_ONCE (1 ); +MISSING_CASE (port);return
POWER_DOMAIN_PORT_OTHER;
}
}drivers/gpu/drm/i915/intel_display.c +0
-0@@ -5186,7 +5186,7 @@ static enum intel_display_power_domain port_to_aux_power_domain(enum port port) /* FIXME: Check VBT for actual wiring of PORT E */ return POWER_DOMAIN_AUX_D;default:
drivers/gpu/drm/i915/intel_display.c +1
-1-WARN_ON_ONCE (1 ); +MISSING_CASE (port);return
POWER_DOMAIN_AUX_A;
}
}drivers/gpu/drm/i915/intel_display.c +0
-0@@ -5247,7 +5247,7 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder)
intel_dig_port= enc_to_mst(&intel_encoder->base)-Quoted 1 line
primary;
Quoted 8 lines
Quoted 8 lines
return port_to_aux_power_domain(intel_dig_port-
Quoted 1 line
port);
default:
drivers/gpu/drm/i915/intel_display.c +1
-1-WARN_ON_ONCE (1 ); +MISSING_CASE (intel_encoder->type);return
POWER_DOMAIN_AUX_A;
}
}
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx