diff mbox

[07/24] drm/i915/icl: Add DDI HDMI level selection for ICL

Message ID 20180522002558.29262-8-paulo.r.zanoni@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zanoni, Paulo R May 22, 2018, 12:25 a.m. UTC
From: Manasi Navare <manasi.d.navare@intel.com>

This patch adds a proper HDMI DDI entry level for vswing
programming sequences on ICL.

Spec doesn't specify any default for HDMI tables,
so let's pick the last entry as the default for now
to stay consistent with older platform like CNL.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Lucas De Marchi May 25, 2018, 4:26 p.m. UTC | #1
On Mon, May 21, 2018 at 05:25:41PM -0700, Paulo Zanoni wrote:
> From: Manasi Navare <manasi.d.navare@intel.com>
> 
> This patch adds a proper HDMI DDI entry level for vswing
> programming sequences on ICL.
> 
> Spec doesn't specify any default for HDMI tables,
> so let's pick the last entry as the default for now
> to stay consistent with older platform like CNL.
> 
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 1665bc588241..d8ae82001f83 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -915,7 +915,14 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
>  
>  	level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift;
>  
> -	if (IS_CANNONLAKE(dev_priv)) {
> +	if (IS_ICELAKE(dev_priv)) {
> +		if (port == PORT_A || port == PORT_B)

This should be using the helper you introduced in patch 3. Either a
'if (!intel_port_is_tc()' or add a 'if (intel_port_is_combo)'.

With that,

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

Lucas De Marchi

> +			icl_get_combo_buf_trans(dev_priv, port,
> +						INTEL_OUTPUT_HDMI, &n_entries);
> +		else
> +			n_entries = ARRAY_SIZE(icl_mg_phy_ddi_translations);
> +		default_entry = n_entries - 1;
> +	} else if (IS_CANNONLAKE(dev_priv)) {
>  		cnl_get_buf_trans_hdmi(dev_priv, &n_entries);
>  		default_entry = n_entries - 1;
>  	} else if (IS_GEN9_LP(dev_priv)) {
> -- 
> 2.14.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Zanoni, Paulo R June 1, 2018, 10:32 p.m. UTC | #2
Em Sex, 2018-05-25 às 09:26 -0700, Lucas De Marchi escreveu:
> On Mon, May 21, 2018 at 05:25:41PM -0700, Paulo Zanoni wrote:
> > From: Manasi Navare <manasi.d.navare@intel.com>
> > 
> > This patch adds a proper HDMI DDI entry level for vswing
> > programming sequences on ICL.
> > 
> > Spec doesn't specify any default for HDMI tables,
> > so let's pick the last entry as the default for now
> > to stay consistent with older platform like CNL.
> > 
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > b/drivers/gpu/drm/i915/intel_ddi.c
> > index 1665bc588241..d8ae82001f83 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -915,7 +915,14 @@ static int intel_ddi_hdmi_level(struct
> > drm_i915_private *dev_priv, enum port por
> >  
> >  	level = dev_priv-
> > >vbt.ddi_port_info[port].hdmi_level_shift;
> >  
> > -	if (IS_CANNONLAKE(dev_priv)) {
> > +	if (IS_ICELAKE(dev_priv)) {
> > +		if (port == PORT_A || port == PORT_B)
> 
> This should be using the helper you introduced in patch 3. Either a
> 'if (!intel_port_is_tc()' or add a 'if (intel_port_is_combo)'.
> 
> With that,
> 
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

I don't think the !intel_port_is_tc() is a good call, and we don't have
the intel_port_is_combo() as part of the ICL series, although we could
have done it. Perhaps when we actually submit the patch adding
intel_port_is_combo() then we can fix this issue on that patch? It
would also help justifying the patch's existence.

> 
> Lucas De Marchi
> 
> > +			icl_get_combo_buf_trans(dev_priv, port,
> > +						INTEL_OUTPUT_HDMI,
> > &n_entries);
> > +		else
> > +			n_entries =
> > ARRAY_SIZE(icl_mg_phy_ddi_translations);
> > +		default_entry = n_entries - 1;
> > +	} else if (IS_CANNONLAKE(dev_priv)) {
> >  		cnl_get_buf_trans_hdmi(dev_priv, &n_entries);
> >  		default_entry = n_entries - 1;
> >  	} else if (IS_GEN9_LP(dev_priv)) {
> > -- 
> > 2.14.3
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lucas De Marchi June 11, 2018, 11:51 p.m. UTC | #3
On Fri, Jun 1, 2018 at 3:32 PM Paulo Zanoni <paulo.r.zanoni@intel.com> wrote:
>
> Em Sex, 2018-05-25 às 09:26 -0700, Lucas De Marchi escreveu:
> > On Mon, May 21, 2018 at 05:25:41PM -0700, Paulo Zanoni wrote:
> > > From: Manasi Navare <manasi.d.navare@intel.com>
> > >
> > > This patch adds a proper HDMI DDI entry level for vswing
> > > programming sequences on ICL.
> > >
> > > Spec doesn't specify any default for HDMI tables,
> > > so let's pick the last entry as the default for now
> > > to stay consistent with older platform like CNL.
> > >
> > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > Cc: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
> > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++++-
> > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > > b/drivers/gpu/drm/i915/intel_ddi.c
> > > index 1665bc588241..d8ae82001f83 100644
> > > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > > @@ -915,7 +915,14 @@ static int intel_ddi_hdmi_level(struct
> > > drm_i915_private *dev_priv, enum port por
> > >
> > >     level = dev_priv-
> > > >vbt.ddi_port_info[port].hdmi_level_shift;
> > >
> > > -   if (IS_CANNONLAKE(dev_priv)) {
> > > +   if (IS_ICELAKE(dev_priv)) {
> > > +           if (port == PORT_A || port == PORT_B)
> >
> > This should be using the helper you introduced in patch 3. Either a
> > 'if (!intel_port_is_tc()' or add a 'if (intel_port_is_combo)'.
> >
> > With that,
> >
> > Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
> I don't think the !intel_port_is_tc() is a good call, and we don't have
> the intel_port_is_combo() as part of the ICL series, although we could
> have done it. Perhaps when we actually submit the patch adding
> intel_port_is_combo() then we can fix this issue on that patch? It

ok, I stand my r-b without it.

Lucas De Marchi

> would also help justifying the patch's existence.
>
> >
> > Lucas De Marchi
> >
> > > +                   icl_get_combo_buf_trans(dev_priv, port,
> > > +                                           INTEL_OUTPUT_HDMI,
> > > &n_entries);
> > > +           else
> > > +                   n_entries =
> > > ARRAY_SIZE(icl_mg_phy_ddi_translations);
> > > +           default_entry = n_entries - 1;
> > > +   } else if (IS_CANNONLAKE(dev_priv)) {
> > >             cnl_get_buf_trans_hdmi(dev_priv, &n_entries);
> > >             default_entry = n_entries - 1;
> > >     } else if (IS_GEN9_LP(dev_priv)) {
> > > --
> > > 2.14.3
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 1665bc588241..d8ae82001f83 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -915,7 +915,14 @@  static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
 
 	level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift;
 
-	if (IS_CANNONLAKE(dev_priv)) {
+	if (IS_ICELAKE(dev_priv)) {
+		if (port == PORT_A || port == PORT_B)
+			icl_get_combo_buf_trans(dev_priv, port,
+						INTEL_OUTPUT_HDMI, &n_entries);
+		else
+			n_entries = ARRAY_SIZE(icl_mg_phy_ddi_translations);
+		default_entry = n_entries - 1;
+	} else if (IS_CANNONLAKE(dev_priv)) {
 		cnl_get_buf_trans_hdmi(dev_priv, &n_entries);
 		default_entry = n_entries - 1;
 	} else if (IS_GEN9_LP(dev_priv)) {