From: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 16/19] drm/i915: Split wm sanitize from readout
Date: Tue, 4 Mar 2025 15:10:17 +0000 [thread overview]
Message-ID: <90f801a570b09faa76e5bfff12bf657ae7aa08e3.camel@intel.com> (raw)
In-Reply-To: <20250218211913.27867-17-ville.syrjala@linux.intel.com>
On Tue, 2025-02-18 at 23:19 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> I'll need to move the wm readout to an earlier point in the
> sequence (since the bw state readout will need ddb information
> from the wm readout). But (at least for now) the wm sanitation
> will need to stay put as it needs to also sanitize things for
> any pipes/planes we disable later during the hw state takeover.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/i9xx_wm.c | 18 ++++--------------
> .../gpu/drm/i915/display/intel_display_core.h | 1 +
> .../gpu/drm/i915/display/intel_modeset_setup.c | 1 +
> drivers/gpu/drm/i915/display/intel_wm.c | 6 ++++++
> drivers/gpu/drm/i915/display/intel_wm.h | 1 +
> drivers/gpu/drm/i915/display/skl_watermark.c | 7 +++----
> 6 files changed, 16 insertions(+), 18 deletions(-)
>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_wm.c b/drivers/gpu/drm/i915/display/i9xx_wm.c
> index 497850a6ac81..7c80e37c1c5f 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_wm.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_wm.c
> @@ -3902,12 +3902,6 @@ static void g4x_wm_sanitize(struct drm_i915_private *dev_priv)
> mutex_unlock(&dev_priv->display.wm.wm_mutex);
> }
>
> -static void g4x_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
> -{
> - g4x_wm_get_hw_state(i915);
> - g4x_wm_sanitize(i915);
> -}
> -
> static void vlv_wm_get_hw_state(struct drm_i915_private *dev_priv)
> {
> struct vlv_wm_values *wm = &dev_priv->display.wm.vlv;
> @@ -4055,12 +4049,6 @@ static void vlv_wm_sanitize(struct drm_i915_private *dev_priv)
> mutex_unlock(&dev_priv->display.wm.wm_mutex);
> }
>
> -static void vlv_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
> -{
> - vlv_wm_get_hw_state(i915);
> - vlv_wm_sanitize(i915);
> -}
> -
> /*
> * FIXME should probably kill this and improve
> * the real watermark readout/sanitation instead
> @@ -4122,14 +4110,16 @@ static const struct intel_wm_funcs vlv_wm_funcs = {
> .initial_watermarks = vlv_initial_watermarks,
> .optimize_watermarks = vlv_optimize_watermarks,
> .atomic_update_watermarks = vlv_atomic_update_fifo,
> - .get_hw_state = vlv_wm_get_hw_state_and_sanitize,
> + .get_hw_state = vlv_wm_get_hw_state,
> + .sanitize = vlv_wm_sanitize,
> };
>
> static const struct intel_wm_funcs g4x_wm_funcs = {
> .compute_watermarks = g4x_compute_watermarks,
> .initial_watermarks = g4x_initial_watermarks,
> .optimize_watermarks = g4x_optimize_watermarks,
> - .get_hw_state = g4x_wm_get_hw_state_and_sanitize,
> + .get_hw_state = g4x_wm_get_hw_state,
> + .sanitize = g4x_wm_sanitize,
> };
>
> static const struct intel_wm_funcs pnv_wm_funcs = {
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h
> b/drivers/gpu/drm/i915/display/intel_display_core.h
> index 554870d2494b..ce41a1d20a7b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -91,6 +91,7 @@ struct intel_wm_funcs {
> struct intel_crtc *crtc);
> int (*compute_global_watermarks)(struct intel_atomic_state *state);
> void (*get_hw_state)(struct drm_i915_private *i915);
> + void (*sanitize)(struct drm_i915_private *i915);
> };
>
> struct intel_audio_state {
> diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> index 70fad9f89cea..03c0facfad7a 100644
> --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> @@ -991,6 +991,7 @@ void intel_modeset_setup_hw_state(struct drm_i915_private *i915,
> intel_dpll_sanitize_state(display);
>
> intel_wm_get_hw_state(i915);
> + intel_wm_sanitize(i915);
>
> for_each_intel_crtc(&i915->drm, crtc) {
> struct intel_crtc_state *crtc_state =
> diff --git a/drivers/gpu/drm/i915/display/intel_wm.c b/drivers/gpu/drm/i915/display/intel_wm.c
> index d7dc49aecd27..f00f4cfc58e5 100644
> --- a/drivers/gpu/drm/i915/display/intel_wm.c
> +++ b/drivers/gpu/drm/i915/display/intel_wm.c
> @@ -108,6 +108,12 @@ void intel_wm_get_hw_state(struct drm_i915_private *i915)
> return i915->display.funcs.wm->get_hw_state(i915);
> }
>
> +void intel_wm_sanitize(struct drm_i915_private *i915)
> +{
> + if (i915->display.funcs.wm->sanitize)
> + return i915->display.funcs.wm->sanitize(i915);
> +}
> +
> bool intel_wm_plane_visible(const struct intel_crtc_state *crtc_state,
> const struct intel_plane_state *plane_state)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_wm.h b/drivers/gpu/drm/i915/display/intel_wm.h
> index e97cdca89a5c..7d3a447054b3 100644
> --- a/drivers/gpu/drm/i915/display/intel_wm.h
> +++ b/drivers/gpu/drm/i915/display/intel_wm.h
> @@ -25,6 +25,7 @@ void intel_optimize_watermarks(struct intel_atomic_state *state,
> struct intel_crtc *crtc);
> int intel_compute_global_watermarks(struct intel_atomic_state *state);
> void intel_wm_get_hw_state(struct drm_i915_private *i915);
> +void intel_wm_sanitize(struct drm_i915_private *i915);
> bool intel_wm_plane_visible(const struct intel_crtc_state *crtc_state,
> const struct intel_plane_state *plane_state);
> void intel_print_wm_latency(struct drm_i915_private *i915,
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c
> b/drivers/gpu/drm/i915/display/skl_watermark.c
> index da7ffcfd9478..0bd7aa3b2877 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -3837,10 +3837,8 @@ static void skl_dbuf_sanitize(struct drm_i915_private *i915)
> }
> }
>
> -static void skl_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
> +static void skl_wm_sanitize(struct drm_i915_private *i915)
> {
> - skl_wm_get_hw_state(i915);
> -
> skl_mbus_sanitize(i915);
> skl_dbuf_sanitize(i915);
> }
> @@ -4016,7 +4014,8 @@ void intel_wm_state_verify(struct intel_atomic_state *state,
>
> static const struct intel_wm_funcs skl_wm_funcs = {
> .compute_global_watermarks = skl_compute_wm,
> - .get_hw_state = skl_wm_get_hw_state_and_sanitize,
> + .get_hw_state = skl_wm_get_hw_state,
> + .sanitize = skl_wm_sanitize,
> };
>
> void skl_wm_init(struct drm_i915_private *i915)
next prev parent reply other threads:[~2025-03-04 15:10 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 21:18 [PATCH 00/19] drm/i915: cdclk/bw/dbuf readout/sanitation cleanup Ville Syrjala
2025-02-18 21:18 ` [PATCH 01/19] drm/i915/cdclk: Do cdclk post plane programming later Ville Syrjala
2025-02-25 21:19 ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 02/19] drm/i915: Drop redundant shared_dpll=NULL assignments Ville Syrjala
2025-02-25 21:32 ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 03/19] drm/i915: Don't clobber crtc_state->cpu_transcoder for inactive crtcs Ville Syrjala
2025-03-02 17:28 ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 04/19] drm/i915: Use intel_plane_set_invisible() in intel_plane_disable_noatomic() Ville Syrjala
2025-03-02 17:57 ` Govindapillai, Vinod
2025-02-18 21:18 ` [PATCH 05/19] drm/i915: Extract intel_cdclk_crtc_disable_noatomic() Ville Syrjala
2025-03-02 18:00 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 06/19] drm/i915: Extract skl_wm_crtc_disable_noatomic() Ville Syrjala
2025-03-02 18:06 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 07/19] drm/i915: clean up pipe's ddb usage in intel_crtc_disable_noatomic() Ville Syrjala
2025-03-02 18:19 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 08/19] drm/i915: Add skl_wm_plane_disable_noatomic() Ville Syrjala
2025-03-04 13:47 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 09/19] drm/i915: Extract intel_bw_crtc_disable_noatomic() Ville Syrjala
2025-03-04 13:49 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 10/19] drm/i915: Extract intel_cdclk_update_hw_state() Ville Syrjala
2025-03-04 14:04 ` Govindapillai, Vinod
2025-03-06 15:46 ` Ville Syrjälä
2025-02-18 21:19 ` [PATCH 11/19] drm/i915: Extract intel_bw_update_hw_state() Ville Syrjala
2025-03-04 14:08 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 12/19] drm/i915: Update bw_state->active_pipes during readout Ville Syrjala
2025-03-04 14:10 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 13/19] drm/i915: Skip some bw_state readout on pre-icl Ville Syrjala
2025-03-04 14:20 ` Govindapillai, Vinod
2025-03-06 16:01 ` Ville Syrjälä
2025-02-18 21:19 ` [PATCH 14/19] sem/i915: Simplify intel_cdclk_update_hw_state() Ville Syrjala
2025-03-04 14:25 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 15/19] drm/i915: Simplify cdclk_disable_noatomic() Ville Syrjala
2025-03-04 15:04 ` Govindapillai, Vinod
2025-03-04 15:22 ` Govindapillai, Vinod
2025-03-06 16:10 ` Ville Syrjälä
2025-02-18 21:19 ` [PATCH 16/19] drm/i915: Split wm sanitize from readout Ville Syrjala
2025-03-04 15:10 ` Govindapillai, Vinod [this message]
2025-02-18 21:19 ` [PATCH 17/19] drm/i915: Do wm readout ealier for skl+ Ville Syrjala
2025-03-04 15:10 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 18/19] drm/i915: Move dbuf_state->active_piepes into skl_wm_get_hw_state() Ville Syrjala
2025-03-04 15:12 ` Govindapillai, Vinod
2025-02-18 21:19 ` [PATCH 19/19] drm/i915: Relocate intel_bw_crtc_update() Ville Syrjala
2025-03-04 15:12 ` Govindapillai, Vinod
2025-02-18 22:51 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: cdclk/bw/dbuf readout/sanitation cleanup Patchwork
2025-02-18 22:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-18 23:04 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-19 1:24 ` ✗ i915.CI.Full: failure " 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=90f801a570b09faa76e5bfff12bf657ae7aa08e3.camel@intel.com \
--to=vinod.govindapillai@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.