There is no dedicated aux channel for port E on SKL. Instead the VBT describes which of the other aux channels to use. When grabbing an aux power domain for port E we need to take this into account. Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Signed-off-by: Patrik Jakobsson <patrik.jakobsson@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++---- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0743337..86c89d4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5212,8 +5212,11 @@ static enum intel_display_power_domain port_to_power_domain(enum port port) } } -static enum intel_display_power_domain port_to_aux_power_domain(enum port port) +static enum intel_display_power_domain port_to_aux_power_domain( + struct drm_i915_private *dev_priv, enum port port) { + enum port alternate_port; + switch (port) { case PORT_A: return POWER_DOMAIN_AUX_A; @@ -5224,7 +5227,14 @@ static enum intel_display_power_domain port_to_aux_power_domain(enum port port) case PORT_D: return POWER_DOMAIN_AUX_D; case PORT_E: - /* FIXME: Check VBT for actual wiring of PORT E */ + if (IS_SKYLAKE(dev_priv)) { + alternate_port = skl_porte_aux_port(dev_priv); + if (alternate_port != PORT_E) + return port_to_aux_power_domain(dev_priv, + alternate_port); + WARN_ON_ONCE(alternate_port == PORT_E); + } + return POWER_DOMAIN_AUX_D; default: MISSING_CASE(port); @@ -5263,6 +5273,7 @@ enum intel_display_power_domain intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder) { struct drm_device *dev = intel_encoder->base.dev; + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_digital_port *intel_dig_port; switch (intel_encoder->type) { @@ -5279,10 +5290,10 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder) case INTEL_OUTPUT_DISPLAYPORT: case INTEL_OUTPUT_EDP: intel_dig_port = enc_to_dig_port(&intel_encoder->base); - return port_to_aux_power_domain(intel_dig_port->port); + return port_to_aux_power_domain(dev_priv, intel_dig_port->port); case INTEL_OUTPUT_DP_MST: intel_dig_port = enc_to_mst(&intel_encoder->base)->primary; - return port_to_aux_power_domain(intel_dig_port->port); + return port_to_aux_power_domain(dev_priv, intel_dig_port->port); default: MISSING_CASE(intel_encoder->type); return POWER_DOMAIN_AUX_A; diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f2bfca0..81eb558 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1070,7 +1070,7 @@ static i915_reg_t ilk_aux_data_reg(struct drm_i915_private *dev_priv, * On SKL we don't have Aux for port E so we rely * on VBT to set a proper alternate aux channel. */ -static enum port skl_porte_aux_port(struct drm_i915_private *dev_priv) +enum port skl_porte_aux_port(struct drm_i915_private *dev_priv) { const struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[PORT_E]; diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 8fae824..1ef2c0e 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1248,6 +1248,7 @@ void intel_dp_hot_plug(struct intel_encoder *intel_encoder); void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv); uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes); void intel_plane_destroy(struct drm_plane *plane); +enum port skl_porte_aux_port(struct drm_i915_private *dev_priv); void intel_edp_drrs_enable(struct intel_dp *intel_dp); void intel_edp_drrs_disable(struct intel_dp *intel_dp); void intel_edp_drrs_invalidate(struct drm_device *dev, -- 2.5.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx