intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Luca Coelho <luca@coelho.fi>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 4/9] drm/i915: Introduce a new intel_atomic_check_crtcs()
Date: Thu, 23 Oct 2025 20:44:31 +0300	[thread overview]
Message-ID: <aPppf5FvsyR4dsHz@intel.com> (raw)
In-Reply-To: <de9354b383461b5eae6ab301cf5f7fe833200310.camel@coelho.fi>

On Thu, Oct 23, 2025 at 03:21:49PM +0300, Luca Coelho wrote:
> On Fri, 2025-10-17 at 19:14 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Add a new intel_atomic_check_crtcs() that gets called fairly
> > early during intel_atomic_check() and start collecting stuff
> > into it from elsewhere. For now we can suck in the
> > intel_crtc_min_cdclk() stiff.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 17 +++++++++++++++--
> >  1 file changed, 15 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 89f63c3b1ecd..211761c5b72a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -5746,6 +5746,18 @@ static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_sta
> >  		new_crtc_state->update_pipe = true;
> >  }
> >  
> > +static int intel_atomic_check_crtcs(struct intel_atomic_state *state)
> 
> Minor nitpick: this doesn't seem to be _checking_ crtcs, but assigning
> min_cdclk, so the function name is a bit misleading? Or are you
> planning to add more actual checks here?

The whole foo_check() naming pretty much comes from the fact
that it all gets called from the .atomic_check() hook
(intel_atomic_check() for us).

We'be been more or less moving towards just calling various
intel_foo_atomic_check() functions from there, and having those
do whatever they need to do. So perhaps I should have called
these intel_crtc_atomic_check*() as well, but that name was
already taken by the single crtc variant (what is now
becoming intel_crtc_atomic_check_late()).

Yeah, naming is hard.

> 
> Of course it aligns with the _check_crtcs_late() that you just added,
> so regardless of whether you decide to change this:
> 
> Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
> 
> --
> Cheers,
> Luca.
> 
> 
> > +{
> > +	struct intel_crtc_state *new_crtc_state;
> > +	struct intel_crtc *crtc;
> > +	int i;
> > +
> > +	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i)
> > +		new_crtc_state->min_cdclk = intel_crtc_min_cdclk(new_crtc_state);
> > +
> > +	return 0;
> > +}
> > +
> >  static int intel_atomic_check_crtcs_late(struct intel_atomic_state *state)
> >  {
> >  	struct intel_display *display = to_intel_display(state);
> > @@ -6449,8 +6461,9 @@ int intel_atomic_check(struct drm_device *dev,
> >  	if (ret)
> >  		goto fail;
> >  
> > -	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i)
> > -		new_crtc_state->min_cdclk = intel_crtc_min_cdclk(new_crtc_state);
> > +	ret = intel_atomic_check_crtcs(state);
> > +	if (ret)
> > +		goto fail;
> >  
> >  	ret = intel_compute_global_watermarks(state);
> >  	if (ret)

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-10-23 17:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 16:14 [PATCH 0/9] drm/i915: Fix CDCLK and scaler prefill calculations Ville Syrjala
2025-10-17 16:14 ` [PATCH 1/9] drm/i915/scaler: Don't clobber plane scaler scale factors with pfit scale factors Ville Syrjala
2025-10-23 12:11   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 2/9] drm/i915/scaler: Adjust pipe scaler scale factors for 4:2:0 ouput Ville Syrjala
2025-10-23 12:13   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 3/9] drm/i915: s/intel_atomic_check_crtcs()/intel_atomic_check_crtcs_late()/ Ville Syrjala
2025-10-23 12:14   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 4/9] drm/i915: Introduce a new intel_atomic_check_crtcs() Ville Syrjala
2025-10-23 12:21   ` Luca Coelho
2025-10-23 17:44     ` Ville Syrjälä [this message]
2025-10-17 16:14 ` [PATCH 5/9] drm/i915/scaler: Call skl_update_scaler_crtc() earlier Ville Syrjala
2025-10-23 12:27   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 6/9] drm/i915/scaler: Assign scalers earlier Ville Syrjala
2025-10-23 12:25   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 7/9] drm/i915/wm: Do skl_wm_check_vblank() after DDB stuff Ville Syrjala
2025-10-27 15:01   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 8/9] drm/i915/cdclk: Use a more optimal min_cdclk for vblank length check Ville Syrjala
2025-10-27 15:25   ` Luca Coelho
2025-10-17 16:14 ` [PATCH 9/9] drm/i915/scaler: Use the actual scale factors " Ville Syrjala
2025-10-27 15:40   ` Luca Coelho
2025-10-17 17:11 ` ✓ i915.CI.BAT: success for drm/i915: Fix CDCLK and scaler prefill calculations Patchwork
2025-10-18  2:11 ` ✓ i915.CI.Full: " 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=aPppf5FvsyR4dsHz@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=luca@coelho.fi \
    /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;
as well as URLs for NNTP newsgroup(s).