Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Luca Coelho <luciano.coelho@intel.com>, intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/8] drm/i915: move SKL clock gating init to display
Date: Tue, 24 Mar 2026 19:40:51 +0200	[thread overview]
Message-ID: <f747c63ee19db048d2fe746170e9c151b0ba1056@intel.com> (raw)
In-Reply-To: <20260324143420.310800-2-luciano.coelho@intel.com>

On Tue, 24 Mar 2026, Luca Coelho <luciano.coelho@intel.com> wrote:
> Move the SKL-specific display clock gating programming into a new file
> inside display.
>
> This removes dependency from intel_clock_gating.c to the display's
> intel_pch.h file, so we can remove the include statement.
>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
>  drivers/gpu/drm/i915/Makefile                 |  1 +
>  .../i915/display/intel_display_clock_gating.c | 19 +++++++++++++++++++
>  .../i915/display/intel_display_clock_gating.h | 17 +++++++++++++++++
>  drivers/gpu/drm/i915/intel_clock_gating.c     |  8 ++------
>  4 files changed, 39 insertions(+), 6 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/display/intel_display_clock_gating.c
>  create mode 100644 drivers/gpu/drm/i915/display/intel_display_clock_gating.h
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index be976a90c5a6..89232873d4b7 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -254,6 +254,7 @@ i915-y += \
>  	display/intel_crtc_state_dump.o \
>  	display/intel_cursor.o \
>  	display/intel_dbuf_bw.o \
> +	display/intel_display_clock_gating.o \
>  	display/intel_display.o \
>  	display/intel_display_conversion.o \
>  	display/intel_display_driver.o \
> diff --git a/drivers/gpu/drm/i915/display/intel_display_clock_gating.c b/drivers/gpu/drm/i915/display/intel_display_clock_gating.c
> new file mode 100644
> index 000000000000..4a94593335e0
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_display_clock_gating.c
> @@ -0,0 +1,19 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright 2026 Intel Corporation
> + */
> +
> +#include <drm/intel/intel_gmd_misc_regs.h>
> +
> +#include "intel_de.h"
> +#include "intel_display_clock_gating.h"
> +#include "intel_display_regs.h"
> +
> +void intel_display_skl_init_clock_gating(struct intel_display *display)
> +{
> +	/*
> +	 * WaFbcTurnOffFbcWatermark:skl
> +	 * Display WA #0562: skl
> +	 */
> +	intel_de_rmw(display, DISP_ARB_CTL, 0, DISP_FBC_WM_DIS);
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_display_clock_gating.h b/drivers/gpu/drm/i915/display/intel_display_clock_gating.h
> new file mode 100644
> index 000000000000..c93997417dcb
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_display_clock_gating.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright 2026 Intel Corporation
> + */
> +
> +#ifndef __INTEL_DISPLAY_CLOCK_GATING_H__
> +#define __INTEL_DISPLAY_CLOCK_GATING_H__
> +
> +struct intel_display;
> +
> +#ifdef I915
> +void intel_display_skl_init_clock_gating(struct intel_display *display);
> +#else
> +static inline void intel_display_skl_init_clock_gating(struct intel_display *display) {}
> +#endif

I don't think we should add any of this #ifdef I915 stuff, because the
next step will be to remove all of them anyway.

Currently they'll only get called for i915, but their existence in xe
doesn't matter. And eventually they'll be part of the display module.

BR,
Jani.


> +
> +#endif /* __INTEL_DISPLAY_CLOCK_GATING_H__ */
> diff --git a/drivers/gpu/drm/i915/intel_clock_gating.c b/drivers/gpu/drm/i915/intel_clock_gating.c
> index ee2489a2fbe7..454334fef5e7 100644
> --- a/drivers/gpu/drm/i915/intel_clock_gating.c
> +++ b/drivers/gpu/drm/i915/intel_clock_gating.c
> @@ -31,9 +31,9 @@
>  
>  #include "display/i9xx_plane_regs.h"
>  #include "display/intel_display.h"
> +#include "display/intel_display_clock_gating.h"
>  #include "display/intel_display_core.h"
>  #include "display/intel_display_regs.h"
> -#include "display/intel_pch.h"
>  #include "gt/intel_engine_regs.h"
>  #include "gt/intel_gt.h"
>  #include "gt/intel_gt_mcr.h"
> @@ -349,11 +349,7 @@ static void skl_init_clock_gating(struct drm_i915_private *i915)
>  	/* WAC6entrylatency:skl */
>  	intel_uncore_rmw(&i915->uncore, FBC_LLC_READ_CTRL, 0, FBC_LLC_FULLY_OPEN);
>  
> -	/*
> -	 * WaFbcTurnOffFbcWatermark:skl
> -	 * Display WA #0562: skl
> -	 */
> -	intel_uncore_rmw(&i915->uncore, DISP_ARB_CTL, 0, DISP_FBC_WM_DIS);
> +	intel_display_skl_init_clock_gating(i915->display);
>  }
>  
>  static void bdw_init_clock_gating(struct drm_i915_private *i915)

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-03-24 17:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 14:29 [PATCH 0/8] drm/i915: move more display dependencies from i915 Luca Coelho
2026-03-24 14:29 ` [PATCH 1/8] drm/i915: move SKL clock gating init to display Luca Coelho
2026-03-24 17:40   ` Jani Nikula [this message]
2026-03-31 11:59     ` Luca Coelho
2026-03-24 14:29 ` [PATCH 2/8] drm/i915: move KBL " Luca Coelho
2026-03-24 14:29 ` [PATCH 3/8] drm/i915/display: move CFL " Luca Coelho
2026-03-24 14:29 ` [PATCH 4/8] drm/i915/display: move BXT " Luca Coelho
2026-03-24 14:29 ` [PATCH 5/8] drm/i915/display: move GLK " Luca Coelho
2026-03-24 14:29 ` [PATCH 6/8] drm/i915/display: move HSW and BDW " Luca Coelho
2026-03-24 16:36   ` Ville Syrjälä
2026-03-31 10:03     ` Luca Coelho
2026-03-31 10:19       ` Ville Syrjälä
2026-03-31 10:23         ` Luca Coelho
2026-03-24 14:29 ` [PATCH 7/8] drm/i915/display: move pre-HSW " Luca Coelho
2026-03-24 15:04   ` Ville Syrjälä
2026-03-24 15:26     ` Luca Coelho
2026-03-24 14:29 ` [PATCH 8/8] drm/i915: remove HAS_PCH_NOP() dependency from clock gating Luca Coelho
2026-03-24 17:06 ` ✗ Fi.CI.BUILD: failure for drm/i915: move more display dependencies from i915 Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f747c63ee19db048d2fe746170e9c151b0ba1056@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=luciano.coelho@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox