> Subject: [PATCH v2 07/15] drm/i915/display: convert W/As in
> intel_display_device.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
With that fixed
Reviewed-by: Suraj Kandpal <[email protected]>

> 
> Acked-by: Jani Nikula <[email protected]>
> Signed-off-by: Luca Coelho <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_display_device.c | 3 ++-
>  drivers/gpu/drm/i915/display/intel_display_wa.c     | 3 +++
>  drivers/gpu/drm/i915/display/intel_display_wa.h     | 1 +
>  3 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c
> b/drivers/gpu/drm/i915/display/intel_display_device.c
> index e79913a858b3..e88ae1884213 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -19,6 +19,7 @@
>  #include "intel_display_reg_defs.h"
>  #include "intel_display_regs.h"
>  #include "intel_display_types.h"
> +#include "intel_display_wa.h"
>  #include "intel_fbc.h"
>  #include "intel_step.h"
> 
> @@ -1773,7 +1774,7 @@ static void
> __intel_display_device_info_runtime_init(struct intel_display *displ
>               display_runtime->port_mask |= BIT(PORT_F);
> 
>       /* Wa_14011765242: adl-s A0,A1 */
> -     if (display->platform.alderlake_s && IS_DISPLAY_STEP(display,
> STEP_A0, STEP_A2))
> +     if (intel_display_wa(display, 14011765242))
>               for_each_pipe(display, pipe)
>                       display_runtime->num_scalers[pipe] = 0;
>       else if (DISPLAY_VER(display) >= 11) { diff --git
> a/drivers/gpu/drm/i915/display/intel_display_wa.c
> b/drivers/gpu/drm/i915/display/intel_display_wa.c
> index 744ca7828f06..b45212708110 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c
> @@ -91,6 +91,9 @@ bool __intel_display_wa(struct intel_display *display,
> enum intel_display_wa wa,
>               return DISPLAY_VER(display) == 13;
>       case INTEL_DISPLAY_WA_14011508470:
>               return (IS_DISPLAY_VERx100(display, 1200, 1300));
> +     case INTEL_DISPLAY_WA_14011765242:
> +             return display->platform.alderlake_s &&
> +                     IS_DISPLAY_STEP(display, STEP_A0, STEP_A2);
>       case INTEL_DISPLAY_WA_14020863754:
>               return DISPLAY_VERx100(display) == 3000 ||
>                       DISPLAY_VERx100(display) == 2000 ||
> diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h
> b/drivers/gpu/drm/i915/display/intel_display_wa.h
> index 4fab1b27087a..923cb917e727 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_wa.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h
> @@ -35,6 +35,7 @@ enum intel_display_wa {
>       INTEL_DISPLAY_WA_14011503030,
>       INTEL_DISPLAY_WA_14011503117,
>       INTEL_DISPLAY_WA_14011508470,
> +     INTEL_DISPLAY_WA_14011765242,
>       INTEL_DISPLAY_WA_14020863754,
>       INTEL_DISPLAY_WA_14025769978,
>       INTEL_DISPLAY_WA_15013987218,
> --
> 2.51.0

Reply via email to