[PATCH 3/3] drm/i915/icl: Fix TypeC legacy DP HPD handling

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

 



TypeC legacy DP ports can't be implied the same way we implied TypeC
legacy HDMI ports in the previous patch. So that we still have
functioning DP legacy ports, mark them as legacy at the first connect
event. After that we treat the port the same way as in the HDMI case,
that is keep it in legacy mode whenever we are not suspended.

Eventually - instead of the methods in this and the previous patch -
we'll depend on an explicit way to detect both HDMI and DP TypeC legacy
ports either via a VBT option or a HW/FW register.

Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: José Roberto de Souza <jose.souza@xxxxxxxxx>
Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_dp.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 19e49adab548..f5de0d079ab5 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5220,8 +5220,14 @@ static bool icl_tc_port_connected(struct drm_i915_private *dev_priv,
 	bool is_legacy, is_typec, is_tbt;
 	u32 dpsp;
 
-	is_legacy = intel_dig_port->tc_legacy_port ||
+	/*
+	 * TODO: Depend only on the tc_legacy_port flag to identify legacy
+	 * ports, once we have an explicit detection method for legacy mode
+	 * (via VBT or a HW/FW register).
+	 */
+	intel_dig_port->tc_legacy_port |=
 		I915_READ(SDEISR) & SDE_TC_HOTPLUG_ICP(tc_port);
+	is_legacy = intel_dig_port->tc_legacy_port;
 
 	/*
 	 * The spec says we shouldn't be using the ISR bits for detecting
-- 
2.13.2

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux