diff mbox series

[v2] drm/i915: Sort newer to older platforms.

Message ID 20190221214430.27095-1-rodrigo.vivi@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/i915: Sort newer to older platforms. | expand

Commit Message

Rodrigo Vivi Feb. 21, 2019, 9:44 p.m. UTC
No functional change. Just a reorg to match the preferred
behavior.

v2: missing else (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Ville Syrjälä Feb. 21, 2019, 9:48 p.m. UTC | #1
On Thu, Feb 21, 2019 at 01:44:30PM -0800, Rodrigo Vivi wrote:
> No functional change. Just a reorg to match the preferred
> behavior.
> 
> v2: missing else (Ville)
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Looks correct enough.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index ad81691fa7bf..6bd724c7a6de 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -2575,14 +2575,14 @@ static u8 intel_hdmi_ddc_pin(struct drm_i915_private *dev_priv,
>  		return info->alternate_ddc_pin;
>  	}
>  
> -	if (IS_CHERRYVIEW(dev_priv))
> -		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
> -	else if (IS_GEN9_LP(dev_priv))
> -		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
> +	if (HAS_PCH_ICP(dev_priv))
> +		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
>  	else if (HAS_PCH_CNP(dev_priv))
>  		ddc_pin = cnp_port_to_ddc_pin(dev_priv, port);
> -	else if (HAS_PCH_ICP(dev_priv))
> -		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
> +	else if (IS_GEN9_LP(dev_priv))
> +		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
> +	else if (IS_CHERRYVIEW(dev_priv))
> +		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
>  	else
>  		ddc_pin = g4x_port_to_ddc_pin(dev_priv, port);
>  
> -- 
> 2.20.1
Lucas De Marchi Feb. 21, 2019, 11:13 p.m. UTC | #2
On Thu, Feb 21, 2019 at 01:44:30PM -0800, Rodrigo Vivi wrote:
>No functional change. Just a reorg to match the preferred
>behavior.
>
>v2: missing else (Ville)
>
>Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

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

Lucas De Marchi

>---
> drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>index ad81691fa7bf..6bd724c7a6de 100644
>--- a/drivers/gpu/drm/i915/intel_hdmi.c
>+++ b/drivers/gpu/drm/i915/intel_hdmi.c
>@@ -2575,14 +2575,14 @@ static u8 intel_hdmi_ddc_pin(struct drm_i915_private *dev_priv,
> 		return info->alternate_ddc_pin;
> 	}
>
>-	if (IS_CHERRYVIEW(dev_priv))
>-		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
>-	else if (IS_GEN9_LP(dev_priv))
>-		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
>+	if (HAS_PCH_ICP(dev_priv))
>+		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
> 	else if (HAS_PCH_CNP(dev_priv))
> 		ddc_pin = cnp_port_to_ddc_pin(dev_priv, port);
>-	else if (HAS_PCH_ICP(dev_priv))
>-		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
>+	else if (IS_GEN9_LP(dev_priv))
>+		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
>+	else if (IS_CHERRYVIEW(dev_priv))
>+		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
> 	else
> 		ddc_pin = g4x_port_to_ddc_pin(dev_priv, port);
>
>-- 
>2.20.1
>
Rodrigo Vivi Feb. 22, 2019, 9:25 p.m. UTC | #3
On Thu, Feb 21, 2019 at 11:48:58PM +0200, Ville Syrjälä wrote:
> On Thu, Feb 21, 2019 at 01:44:30PM -0800, Rodrigo Vivi wrote:
> > No functional change. Just a reorg to match the preferred
> > behavior.
> > 
> > v2: missing else (Ville)
> > 
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> Looks correct enough.
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

pushed to dinq, thanks for the reviews

> 
> > ---
> >  drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index ad81691fa7bf..6bd724c7a6de 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -2575,14 +2575,14 @@ static u8 intel_hdmi_ddc_pin(struct drm_i915_private *dev_priv,
> >  		return info->alternate_ddc_pin;
> >  	}
> >  
> > -	if (IS_CHERRYVIEW(dev_priv))
> > -		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
> > -	else if (IS_GEN9_LP(dev_priv))
> > -		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
> > +	if (HAS_PCH_ICP(dev_priv))
> > +		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
> >  	else if (HAS_PCH_CNP(dev_priv))
> >  		ddc_pin = cnp_port_to_ddc_pin(dev_priv, port);
> > -	else if (HAS_PCH_ICP(dev_priv))
> > -		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
> > +	else if (IS_GEN9_LP(dev_priv))
> > +		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
> > +	else if (IS_CHERRYVIEW(dev_priv))
> > +		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
> >  	else
> >  		ddc_pin = g4x_port_to_ddc_pin(dev_priv, port);
> >  
> > -- 
> > 2.20.1
> 
> -- 
> Ville Syrjälä
> Intel
> _______________________________________________
> 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_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index ad81691fa7bf..6bd724c7a6de 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2575,14 +2575,14 @@  static u8 intel_hdmi_ddc_pin(struct drm_i915_private *dev_priv,
 		return info->alternate_ddc_pin;
 	}
 
-	if (IS_CHERRYVIEW(dev_priv))
-		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
-	else if (IS_GEN9_LP(dev_priv))
-		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
+	if (HAS_PCH_ICP(dev_priv))
+		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
 	else if (HAS_PCH_CNP(dev_priv))
 		ddc_pin = cnp_port_to_ddc_pin(dev_priv, port);
-	else if (HAS_PCH_ICP(dev_priv))
-		ddc_pin = icl_port_to_ddc_pin(dev_priv, port);
+	else if (IS_GEN9_LP(dev_priv))
+		ddc_pin = bxt_port_to_ddc_pin(dev_priv, port);
+	else if (IS_CHERRYVIEW(dev_priv))
+		ddc_pin = chv_port_to_ddc_pin(dev_priv, port);
 	else
 		ddc_pin = g4x_port_to_ddc_pin(dev_priv, port);