diff mbox series

[5/9] drm/i915/ehl: All EHL ports are combo phys

Message ID 20190313211144.4842-5-rodrigo.vivi@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/9] drm/i915/ehl: Add EHL platform info and PCI IDs | expand

Commit Message

Rodrigo Vivi March 13, 2019, 9:11 p.m. UTC
From: Bob Paauwe <bob.j.paauwe@intel.com>

Unlike ICL, all of the output ports are combo phys so just return
true in is_port_combophy for all EHL ports to indicate that.

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Souza, Jose March 14, 2019, 8:27 p.m. UTC | #1
On Wed, 2019-03-13 at 14:11 -0700, Rodrigo Vivi wrote:
> From: Bob Paauwe <bob.j.paauwe@intel.com>
> 
> Unlike ICL, all of the output ports are combo phys so just return
> true in is_port_combophy for all EHL ports to indicate that.
> 
> Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 2b25098d47a9..920f647bd451 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6170,6 +6170,9 @@ 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))
> +		return port <= PORT_C;
> +
>  	if (INTEL_GEN(dev_priv) >= 11)
>  		return port <= PORT_B;
>  


You also need to change intel_port_is_tc(), several places only checks
for it and it would be broken for PORT_C in EHL.

bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port
port)
{
	if (INTEL_GEN(dev_priv) >= 11 && !IS_ELKHARTLAKE(dev_priv))
		return port >= PORT_C && port <= PORT_F;

	return false;
}
Lucas De Marchi March 14, 2019, 11 p.m. UTC | #2
On Wed, Mar 13, 2019 at 02:11:40PM -0700, Rodrigo Vivi wrote:
>From: Bob Paauwe <bob.j.paauwe@intel.com>
>
>Unlike ICL, all of the output ports are combo phys so just return
>true in is_port_combophy for all EHL ports to indicate that.
>
>Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
>Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

long term I want to remove most (all?) of the users of this function,
but right now it does what it needs to do.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/i915/intel_display.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>index 2b25098d47a9..920f647bd451 100644
>--- a/drivers/gpu/drm/i915/intel_display.c
>+++ b/drivers/gpu/drm/i915/intel_display.c
>@@ -6170,6 +6170,9 @@ 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))
>+		return port <= PORT_C;
>+
> 	if (INTEL_GEN(dev_priv) >= 11)
> 		return port <= PORT_B;
>
>-- 
>2.20.1
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2b25098d47a9..920f647bd451 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6170,6 +6170,9 @@  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))
+		return port <= PORT_C;
+
 	if (INTEL_GEN(dev_priv) >= 11)
 		return port <= PORT_B;