diff mbox series

drm/i915/display: Fix IP version of the WAs

Message ID 20231128102451.825242-1-balasubramani.vivekanandan@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Fix IP version of the WAs | expand

Commit Message

Vivekanandan, Balasubramani Nov. 28, 2023, 10:24 a.m. UTC
WAs 14011508470, 14011503030 were applied on IP versions beyond which
they are applicable. Fixed the IP version checks for these workarounds.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Gustavo Sousa Nov. 28, 2023, 12:28 p.m. UTC | #1
Quoting Balasubramani Vivekanandan (2023-11-28 07:24:51-03:00)
>WAs 14011508470, 14011503030 were applied on IP versions beyond which
>they are applicable. Fixed the IP version checks for these workarounds.
>
>Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
>---
> drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
>index 18ff7f3639ff..5f091502719b 100644
>--- a/drivers/gpu/drm/i915/display/intel_display_power.c
>+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
>@@ -1697,14 +1697,14 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
>         if (resume)
>                 intel_dmc_load_program(dev_priv);
> 
>-        /* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p */
>-        if (DISPLAY_VER(dev_priv) >= 12)
>+        /* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p,dg2 */

Nit: I with those who think the platform tags attached to the lineage number are
unnecessary.

Either way,

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

>+        if (IS_DISPLAY_IP_RANGE(dev_priv, IP_VER(12, 0), IP_VER(13, 0)))
>                 intel_de_rmw(dev_priv, GEN11_CHICKEN_DCPR_2, 0,
>                              DCPR_CLEAR_MEMSTAT_DIS | DCPR_SEND_RESP_IMM |
>                              DCPR_MASK_LPMODE | DCPR_MASK_MAXLATENCY_MEMUP_CLR);
> 
>         /* Wa_14011503030:xelpd */
>-        if (DISPLAY_VER(dev_priv) >= 13)
>+        if (DISPLAY_VER(dev_priv) == 13)
>                 intel_de_write(dev_priv, XELPD_DISPLAY_ERR_FATAL_MASK, ~0);
> }
> 
>-- 
>2.25.1
>
Matt Roper Nov. 28, 2023, 4:03 p.m. UTC | #2
On Tue, Nov 28, 2023 at 03:54:51PM +0530, Balasubramani Vivekanandan wrote:
> WAs 14011508470, 14011503030 were applied on IP versions beyond which
> they are applicable. Fixed the IP version checks for these workarounds.
> 
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 18ff7f3639ff..5f091502719b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -1697,14 +1697,14 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
>  	if (resume)
>  		intel_dmc_load_program(dev_priv);
>  
> -	/* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p */
> -	if (DISPLAY_VER(dev_priv) >= 12)
> +	/* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p,dg2 */
> +	if (IS_DISPLAY_IP_RANGE(dev_priv, IP_VER(12, 0), IP_VER(13, 0)))
>  		intel_de_rmw(dev_priv, GEN11_CHICKEN_DCPR_2, 0,
>  			     DCPR_CLEAR_MEMSTAT_DIS | DCPR_SEND_RESP_IMM |
>  			     DCPR_MASK_LPMODE | DCPR_MASK_MAXLATENCY_MEMUP_CLR);
>  
>  	/* Wa_14011503030:xelpd */
> -	if (DISPLAY_VER(dev_priv) >= 13)
> +	if (DISPLAY_VER(dev_priv) == 13)
>  		intel_de_write(dev_priv, XELPD_DISPLAY_ERR_FATAL_MASK, ~0);
>  }
>  
> -- 
> 2.25.1
>
Matt Roper Nov. 29, 2023, 7:53 p.m. UTC | #3
On Tue, Nov 28, 2023 at 08:03:31AM -0800, Matt Roper wrote:
> On Tue, Nov 28, 2023 at 03:54:51PM +0530, Balasubramani Vivekanandan wrote:
> > WAs 14011508470, 14011503030 were applied on IP versions beyond which
> > they are applicable. Fixed the IP version checks for these workarounds.
> > 
> > Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> 
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

And applied to drm-intel-next.  Thanks for the patch.


Matt

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> > index 18ff7f3639ff..5f091502719b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> > @@ -1697,14 +1697,14 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
> >  	if (resume)
> >  		intel_dmc_load_program(dev_priv);
> >  
> > -	/* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p */
> > -	if (DISPLAY_VER(dev_priv) >= 12)
> > +	/* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p,dg2 */
> > +	if (IS_DISPLAY_IP_RANGE(dev_priv, IP_VER(12, 0), IP_VER(13, 0)))
> >  		intel_de_rmw(dev_priv, GEN11_CHICKEN_DCPR_2, 0,
> >  			     DCPR_CLEAR_MEMSTAT_DIS | DCPR_SEND_RESP_IMM |
> >  			     DCPR_MASK_LPMODE | DCPR_MASK_MAXLATENCY_MEMUP_CLR);
> >  
> >  	/* Wa_14011503030:xelpd */
> > -	if (DISPLAY_VER(dev_priv) >= 13)
> > +	if (DISPLAY_VER(dev_priv) == 13)
> >  		intel_de_write(dev_priv, XELPD_DISPLAY_ERR_FATAL_MASK, ~0);
> >  }
> >  
> > -- 
> > 2.25.1
> > 
> 
> -- 
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 18ff7f3639ff..5f091502719b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -1697,14 +1697,14 @@  static void icl_display_core_init(struct drm_i915_private *dev_priv,
 	if (resume)
 		intel_dmc_load_program(dev_priv);
 
-	/* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p */
-	if (DISPLAY_VER(dev_priv) >= 12)
+	/* Wa_14011508470:tgl,dg1,rkl,adl-s,adl-p,dg2 */
+	if (IS_DISPLAY_IP_RANGE(dev_priv, IP_VER(12, 0), IP_VER(13, 0)))
 		intel_de_rmw(dev_priv, GEN11_CHICKEN_DCPR_2, 0,
 			     DCPR_CLEAR_MEMSTAT_DIS | DCPR_SEND_RESP_IMM |
 			     DCPR_MASK_LPMODE | DCPR_MASK_MAXLATENCY_MEMUP_CLR);
 
 	/* Wa_14011503030:xelpd */
-	if (DISPLAY_VER(dev_priv) >= 13)
+	if (DISPLAY_VER(dev_priv) == 13)
 		intel_de_write(dev_priv, XELPD_DISPLAY_ERR_FATAL_MASK, ~0);
 }