From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Luca Coelho <luciano.coelho@intel.com>
Cc: intel-gfx@lists.freedesktop.org, vinod.govindapillai@intel.com,
jani.nikula@linux.intel.com
Subject: Re: [PATCH v3 1/7] drm/i915/wm: clarify watermark ops with comments
Date: Thu, 9 Oct 2025 18:29:41 +0300 [thread overview]
Message-ID: <aOfU5VlVZ6-WKrTK@intel.com> (raw)
In-Reply-To: <20251009075517.837587-2-luciano.coelho@intel.com>
On Thu, Oct 09, 2025 at 10:54:32AM +0300, Luca Coelho wrote:
> Some of the ops in struct intel_wm_funcs are used only for legacy
> watermark management, while others are only for SKL+ or both. Clarify
> that in the struct definition.
We have (roughly) three vintages of wm stuff right now.
pre-g4x without proper atomic watermark code currently
(though I do have it in a branch somewhere...):
- .compute_watermarks()
doesn't really do what it says on the tin here, but I just
needed a place to hide the ugliness from higher level code
- .update_wm()
g4x/vlv/chv/ilk+ (hw with single buffered wm registers)
.compute_watermarks()
.initial_watermarks()
.optimize_watermarks()
.atomic_update_watermarks()
.get_hw_state()
.sanitize()
skl+ (hw with double buffered wm registers)
.compute_global_watermarks()
.get_hw_state()
.sanitize()
Most of the differences between the three are more
accidental than intentional, and should be unified.
I think if we managed to clean this up properly then
we would be left with this:
.compute()
.sanitize()
.get_hw_state()
.initial_watermarks() (pre-skl only)
.optimize_watermarks() (pre-skl only)
.atomic_update_watermarks() (pre-skl only)
Getting there would be mostly a matter of figuring out the right
order to do things in intel_atomic_check().
>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_core.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
> index df4da52cbdb3..7144b61fb1ff 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -78,7 +78,7 @@ struct intel_display_funcs {
>
> /* functions used for watermark calcs for display. */
> struct intel_wm_funcs {
> - /* update_wm is for legacy wm management */
> + /* these are only for legacy wm management */
> void (*update_wm)(struct intel_display *display);
> int (*compute_watermarks)(struct intel_atomic_state *state,
> struct intel_crtc *crtc);
> @@ -88,8 +88,12 @@ struct intel_wm_funcs {
> struct intel_crtc *crtc);
> void (*optimize_watermarks)(struct intel_atomic_state *state,
> struct intel_crtc *crtc);
> +
> + /* these are for SKL+ wm management */
> int (*compute_global_watermarks)(struct intel_atomic_state *state);
> void (*get_hw_state)(struct intel_display *display);
> +
> + /* this is used by both legacy and SKL+ */
> void (*sanitize)(struct intel_display *display);
> };
>
> --
> 2.51.0
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-10-09 15:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 7:54 [PATCH v3 0/7] drm/i915/wm: some clean-ups and a bit of refactoring Luca Coelho
2025-10-09 7:54 ` [PATCH v3 1/7] drm/i915/wm: clarify watermark ops with comments Luca Coelho
2025-10-09 15:29 ` Ville Syrjälä [this message]
2025-10-09 7:54 ` [PATCH v3 2/7] drm/i915/wm: move intel_sagv_init() to avoid forward declaration Luca Coelho
2025-10-09 7:54 ` [PATCH v3 3/7] drm/i915/wm: remove stale FIXME in skl_needs_memory_bw_wa() Luca Coelho
2025-10-09 7:54 ` [PATCH v3 4/7] drm/i915/wm: convert x/y-tiling bools to an enum Luca Coelho
2025-10-09 7:54 ` [PATCH v3 5/7] drm/i915/wm: convert tiling mode check in slk_compute_plane_wm() to a switch-case Luca Coelho
2025-10-09 7:54 ` [PATCH v3 6/7] drm/i915/wm: move method selection and calculation to a separate function Luca Coelho
2025-10-09 7:54 ` [PATCH v3 7/7] drm/i915/wm: reduce size of y_min_scanlines to u8 Luca Coelho
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=aOfU5VlVZ6-WKrTK@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=luciano.coelho@intel.com \
--cc=vinod.govindapillai@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.