Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>,
	 "intel-gfx@lists.freedesktop.org"	
	<intel-gfx@lists.freedesktop.org>,
	"Coelho, Luciano" <luciano.coelho@intel.com>
Subject: Re: [PATCH 1/6] drm/i915/wm: clarify watermark ops with comments
Date: Mon, 22 Sep 2025 13:26:52 +0300	[thread overview]
Message-ID: <be5e6499eef106f24ce61aa19bdecd5bca765780.camel@coelho.fi> (raw)
In-Reply-To: <14f52d0f7836585e71eac2a1e7d1e8771cdd16d1.camel@intel.com>

On Tue, 2025-09-16 at 08:52 +0000, Govindapillai, Vinod wrote:
> On Mon, 2025-09-08 at 10:35 +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.
> > 
> > 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(-)
> > 
> 
> Hi Luca,
> 
> I am not sure if these comments by itself help in any understanding of the wm handling code better -
> rather than browsing through the code! IMO, probably you need to have bit bigger explanation of this
> "struct intel_wm_funcs" and the split of legacy/SKL+ usage - before these comments! 

Thanks, Vinod!

This tiny comment doesn't add much, for sure.  But it did help me
quickly figure out which functions are not relevant to newer hardware.

It's a tiny comment that, IMHO, doesn't harm, and if it were there to
start with, my initial attempts at understanding this code would have
been slightly easier.

If you insist, I can drop this patch, but otherwise I think it's useful
enough to be merged as is.  With the other changes I'm planning to make
in this code, hopefully this whole thing will be easier to understand.

--
Cheers,
Luca.



> BR
> Vinod
> 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h
> > b/drivers/gpu/drm/i915/display/intel_display_core.h
> > index 8c226406c5cd..938971591470 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);
> >  };
> >  

  reply	other threads:[~2025-09-22 10:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08  7:35 [PATCH 0/6] drm/i915/wm: some clean-ups and a bit of refactoring Luca Coelho
2025-09-08  7:35 ` [PATCH 1/6] drm/i915/wm: clarify watermark ops with comments Luca Coelho
2025-09-16  8:52   ` Govindapillai, Vinod
2025-09-22 10:26     ` Luca Coelho [this message]
2025-09-08  7:35 ` [PATCH 2/6] drm/i915/wm: move intel_sagv_init() to avoid forward declaration Luca Coelho
2025-09-16  8:53   ` Govindapillai, Vinod
2025-09-08  7:35 ` [PATCH 3/6] drm/i915/wm: remove stale FIXME in skl_needs_memory_bw_wa() Luca Coelho
2025-09-16  9:21   ` Govindapillai, Vinod
2025-09-08  7:35 ` [PATCH 4/6] drm/i915/wm: convert x/y-tiling bools to an enum Luca Coelho
2025-09-08 12:43   ` Gustavo Sousa
2025-09-08 12:53     ` Luca Coelho
2025-09-19  8:36   ` Ville Syrjälä
2025-09-22 12:38     ` Luca Coelho
2025-09-22 12:48       ` Ville Syrjälä
2025-09-08  7:35 ` [PATCH 5/6] drm/i915/wm: convert tiling mode check in slk_compute_plane_wm() to a switch-case Luca Coelho
2025-09-08 12:51   ` Gustavo Sousa
2025-09-08 12:57     ` Luca Coelho
2025-09-08  7:35 ` [PATCH 6/6] drm/i915/wm: move method selection and calculation to a separate function Luca Coelho
2025-09-19 18:00   ` Ville Syrjälä
2025-09-29  7:21     ` Luca Coelho
2025-09-08 17:20 ` ✓ i915.CI.BAT: success for drm/i915/wm: some clean-ups and a bit of refactoring Patchwork
2025-09-09  2:47 ` ✗ 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=be5e6499eef106f24ce61aa19bdecd5bca765780.camel@coelho.fi \
    --to=luca@coelho.fi \
    --cc=intel-gfx@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox