[Intel-gfx] [CI 13/21] drm/i915/tgl: extend intel_port_is_combophy/tc
Lucas De Marchi
lucas.demarchi at intel.com
Thu Jul 11 00:38:25 UTC 2019
From: Mahesh Kumar <mahesh1.kumar at intel.com>
TGL has 3 combophy ports, so extend check for tigerlake in
intel_port_is_combophy/tc function.
Cc: Mika Kahola <mika.kahola at intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: José Roberto de Souza <jose.souza at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190708231629.9296-19-lucas.demarchi@intel.com
---
drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index db01ea08f30b..a7b6a7918c3d 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6676,10 +6676,10 @@ bool intel_port_is_combophy(struct drm_i915_private *dev_priv, enum port port)
if (port == PORT_NONE)
return false;
- if (IS_ELKHARTLAKE(dev_priv))
+ if (IS_ELKHARTLAKE(dev_priv) || INTEL_GEN(dev_priv) >= 12)
return port <= PORT_C;
- if (INTEL_GEN(dev_priv) >= 11)
+ if (IS_GEN(dev_priv, 11))
return port <= PORT_B;
return false;
@@ -6687,7 +6687,10 @@ bool intel_port_is_combophy(struct drm_i915_private *dev_priv, enum port port)
bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port port)
{
- if (INTEL_GEN(dev_priv) >= 11 && !IS_ELKHARTLAKE(dev_priv))
+ if (INTEL_GEN(dev_priv) >= 12)
+ return port >= PORT_D && port <= PORT_I;
+
+ if (IS_GEN(dev_priv, 11) && !IS_ELKHARTLAKE(dev_priv))
return port >= PORT_C && port <= PORT_F;
return false;
@@ -6698,6 +6701,9 @@ enum tc_port intel_port_to_tc(struct drm_i915_private *dev_priv, enum port port)
if (!intel_port_is_tc(dev_priv, port))
return PORT_TC_NONE;
+ if (INTEL_GEN(dev_priv) >= 12)
+ return port - PORT_D;
+
return port - PORT_C;
}
--
2.21.0
More information about the Intel-gfx
mailing list