From: Ville Syrjälä Date: Thu, 16 Oct 2014 18:27:27 +0000 (+0300) Subject: drm/i915: Warn if trying to register eDP on port != B/C on vlv/chv X-Git-Tag: MMI-PSA29.97-13-9~10979^2~64^2~120 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c17ed5b5a46ec715620b0548a187d3ed98f4cf0b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: Warn if trying to register eDP on port != B/C on vlv/chv Only ports B and C have the power sequencer and backlight controls, so complain if we ever try to register an eDP connector on some other port. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index b474a29d00d5..3f1858065a1c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -5203,6 +5203,11 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, if (type == DRM_MODE_CONNECTOR_eDP) intel_encoder->type = INTEL_OUTPUT_EDP; + /* eDP only on port B and/or C on vlv/chv */ + if (WARN_ON(IS_VALLEYVIEW(dev) && is_edp(intel_dp) && + port != PORT_B && port != PORT_C)) + return false; + DRM_DEBUG_KMS("Adding %s connector on port %c\n", type == DRM_MODE_CONNECTOR_eDP ? "eDP" : "DP", port_name(port));