> Subject: [PATCH v2 14/15] drm/i915/display: convert W/As in
> skl_universal_plane.c to new framework
> 
> Convert the low-hanging fruits of workaround checks to the workaround
> framework.  Instead of having display structure checks for the workarounds all
> over, concentrate the checks in intel_wa.c.

*intel_display_wa.c

> 
> Acked-by: Jani Nikula <[email protected]>
> Signed-off-by: Luca Coelho <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_display_wa.c    | 4 ++++
>  drivers/gpu/drm/i915/display/intel_display_wa.h    | 1 +
>  drivers/gpu/drm/i915/display/skl_universal_plane.c | 6 +++---
>  3 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c
> b/drivers/gpu/drm/i915/display/intel_display_wa.c
> index 783e1383ff89..20216514c085 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c
> @@ -79,6 +79,10 @@ bool __intel_display_wa(struct intel_display *display,
> enum intel_display_wa wa,
>       case INTEL_DISPLAY_WA_13012396614:
>               return DISPLAY_VERx100(display) == 3000 ||
>                       DISPLAY_VERx100(display) == 3500;
> +     case INTEL_DISPLAY_WA_14010477008:
> +             return display->platform.dg1 || display->platform.rocketlake
> ||
> +                     (display->platform.tigerlake &&
> +                      IS_DISPLAY_STEP(display, STEP_A0, STEP_D0));
>       case INTEL_DISPLAY_WA_14010480278:
>               return (IS_DISPLAY_VER(display, 10, 12));
>       case INTEL_DISPLAY_WA_14010547955:
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h
> b/drivers/gpu/drm/i915/display/intel_display_wa.h
> index 35d8df4c75a2..784baf66222b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h
> @@ -30,6 +30,7 @@ enum intel_display_wa {
>       INTEL_DISPLAY_WA_1409120013,
>       INTEL_DISPLAY_WA_1409767108,
>       INTEL_DISPLAY_WA_13012396614,
> +     INTEL_DISPLAY_WA_14010477008,
>       INTEL_DISPLAY_WA_14010480278,
>       INTEL_DISPLAY_WA_14010547955,
>       INTEL_DISPLAY_WA_14010685332,
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 746e942cafd2..9f31c609271f 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -17,6 +17,7 @@
>  #include "intel_display_regs.h"
>  #include "intel_display_types.h"
>  #include "intel_display_utils.h"
> +#include "intel_display_wa.h"
>  #include "intel_dpt.h"
>  #include "intel_fb.h"
>  #include "intel_fbc.h"
> @@ -1217,7 +1218,7 @@ static u32 skl_plane_ctl(const struct intel_plane_state
> *plane_state)
>               plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
> 
>       /* Wa_22012358565:adl-p */
> -     if (DISPLAY_VER(display) == 13)
> +     if (intel_display_wa(display, 22012358565))

I feel like you missed to add this WA no in the enum and corresponding 
intel_display_wa function

Regards,
Suraj Kandpal 

>               plane_ctl |= adlp_plane_ctl_arb_slots(plane_state);
> 
>       return plane_ctl;
> @@ -2793,8 +2794,7 @@ static bool tgl_plane_has_mc_ccs(struct intel_display
> *display,
>                                enum plane_id plane_id)
>  {
>       /* Wa_14010477008 */
> -     if (display->platform.dg1 || display->platform.rocketlake ||
> -         (display->platform.tigerlake && IS_DISPLAY_STEP(display, STEP_A0,
> STEP_D0)))
> +     if (intel_display_wa(display, 14010477008))
>               return false;
> 
>       return plane_id < PLANE_6;
> --
> 2.51.0

Reply via email to