Re: [PATCH v3 8/8] drm/i915: remove HAS_PCH_NOP() dependency from clock gating

Luca Coelho
2026-04-20T20:09:24Z

On Mon, 2026-04-20 at 15:21 +0300, Jani Nikula wrote:
> On Mon, 20 Apr 2026, Luca Coelho <luciano.coelho@intel.com> wrote:
> > intel_pch_init_clock_gating() already handles unsupported PCH types,
> > including PCH_NOP, by doing nothing.
> >
> > Drop the explicit HAS_PCH_NOP() check from the IVB clock gating
> > path and always call the display helper directly. This removes one
> > more direct dependency on display-side PCH macros from
> > intel_clock_gating.c.
> >
> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_clock_gating.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_clock_gating.c b/drivers/gpu/drm/i915/intel_clock_gating.c
> > index 12559db84cf4..d185199c43b8 100644
> > --- a/drivers/gpu/drm/i915/intel_clock_gating.c
> > +++ b/drivers/gpu/drm/i915/intel_clock_gating.c
> > @@ -290,8 +290,7 @@ static void ivb_init_clock_gating(struct drm_i915_private *i915)
> > intel_uncore_rmw(&i915->uncore, GEN6_MBCUNIT_SNPCR, GEN6_MBC_SNPCR_MASK,
> > GEN6_MBC_SNPCR_MED);
> >
> > - if (!HAS_PCH_NOP(display))
> > - intel_pch_init_clock_gating(display);
> > + intel_pch_init_clock_gating(display);
>
> With this, you could also do
>
> -#include "display/intel_display_core.h"
> +#include "display/intel_pch.h"

Yes! Good catch.

--
Cheers,
Luca.