[Intel-gfx] [PATCH v2 18/25] drm/i915/tgl: extend intel_port_is_combophy/tc

Souza, Jose jose.souza at intel.com
Tue Jul 9 19:54:42 UTC 2019


On Mon, 2019-07-08 at 16:16 -0700, Lucas De Marchi wrote:
> 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.

Reviewed-by: José Roberto de Souza <jose.souza at intel.com>

> 
> 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>
> ---
>  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 d1148786920e..e224dcf60e31 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;
>  }
>  


More information about the Intel-gfx mailing list