[PATCH] drm/i915: Get alternate aux for port E from VBT.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If VBT states that it uses an alternate aux for port E,
let's use it since even on new platforms there is no
dedicated aux for port E and it is being used for VGA
with DP-to-VGA converter by some OEMs.

Let's assume that port A is in use for eDP so let's
keep the default to port D to minimize the changes
on the behaviour.

Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_dp.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2d42d09428c9..c856567d4529 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5905,6 +5905,9 @@ intel_dp_init_connector_port_info(struct intel_digital_port *intel_dig_port)
 {
 	struct intel_encoder *encoder = &intel_dig_port->base;
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
+	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+	const struct ddi_vbt_port_info *info =
+		&dev_priv->vbt.ddi_port_info[intel_dig_port->port];
 
 	switch (intel_dig_port->port) {
 	case PORT_A:
@@ -5925,9 +5928,9 @@ intel_dp_init_connector_port_info(struct intel_digital_port *intel_dig_port)
 		break;
 	case PORT_E:
 		encoder->hpd_pin = HPD_PORT_E;
-
-		/* FIXME: Check VBT for actual wiring of PORT E */
-		intel_dp->aux_power_domain = POWER_DOMAIN_AUX_D;
+		intel_dp->aux_power_domain = POWER_DOMAIN_AUX_A +
+			info->alternate_aux_channel ?
+			info->alternate_aux_channel : POWER_DOMAIN_AUX_D;
 		break;
 	default:
 		MISSING_CASE(intel_dig_port->port);
-- 
2.13.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux