From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/6] drm/i915: Extract pipe_mbus_dbox_ctl_update()
Date: Fri, 1 Nov 2024 15:46:05 +0200 [thread overview]
Message-ID: <ZyTbnVxcHnwvwi0K@intel.com> (raw)
In-Reply-To: <87cyjfjlhs.fsf@intel.com>
On Fri, Nov 01, 2024 at 12:29:03PM +0200, Jani Nikula wrote:
> On Thu, 31 Oct 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > We'll be wanting reprogram the PIPE_MBUS_DBOX_CTL registers
>
> wanting *to* reprogram
>
> I would've wanted to see conversion to struct intel_display here too, or
> at least a mention we're keeping it this way for backports, or
> something. A patch on top changing everything in one go is fine too.
Yeah, IIRC I did it with intel_display originally but changed it
in case we need to backport this. I can toss in a note stating
as much.
I think I tried to do a full conversion of skl_watermark.c at some
point but at the time there were still so many depedencies left that
it looked rather pointless. I can have another look at it now that
we've progressed a bit further.
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Ta.
>
> > during an upcoming MBUS sanitation stage. Extract the reprogramming
> > loop into a helper that doesn't depend on the full atomic state
> > so that it can be reused.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/display/skl_watermark.c | 15 +++++++++++----
> > 1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> > index 7a7caaf7e87d..8a31508f94bb 100644
> > --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> > +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> > @@ -3319,11 +3319,20 @@ static u32 pipe_mbus_dbox_ctl(const struct intel_crtc *crtc,
> > return val;
> > }
> >
> > +static void pipe_mbus_dbox_ctl_update(struct drm_i915_private *i915,
> > + const struct intel_dbuf_state *dbuf_state)
> > +{
> > + struct intel_crtc *crtc;
> > +
> > + for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, dbuf_state->active_pipes)
> > + intel_de_write(i915, PIPE_MBUS_DBOX_CTL(crtc->pipe),
> > + pipe_mbus_dbox_ctl(crtc, dbuf_state));
> > +}
> > +
> > static void intel_mbus_dbox_update(struct intel_atomic_state *state)
> > {
> > struct drm_i915_private *i915 = to_i915(state->base.dev);
> > const struct intel_dbuf_state *new_dbuf_state, *old_dbuf_state;
> > - const struct intel_crtc *crtc;
> >
> > if (DISPLAY_VER(i915) < 11)
> > return;
> > @@ -3335,9 +3344,7 @@ static void intel_mbus_dbox_update(struct intel_atomic_state *state)
> > new_dbuf_state->active_pipes == old_dbuf_state->active_pipes))
> > return;
> >
> > - for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, new_dbuf_state->active_pipes)
> > - intel_de_write(i915, PIPE_MBUS_DBOX_CTL(crtc->pipe),
> > - pipe_mbus_dbox_ctl(crtc, new_dbuf_state));
> > + pipe_mbus_dbox_ctl_update(i915, new_dbuf_state);
> > }
> >
> > int intel_dbuf_state_set_mdclk_cdclk_ratio(struct intel_atomic_state *state,
>
> --
> Jani Nikula, Intel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-11-01 13:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 15:56 [PATCH 0/6] drm/i915: Sanitize MBUS joining Ville Syrjala
2024-10-31 15:56 ` [PATCH 1/6] drm/i915: Relocate the SKL wm sanitation code Ville Syrjala
2024-11-01 10:26 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 2/6] drm/i915: Extract pipe_mbus_dbox_ctl() Ville Syrjala
2024-11-01 10:27 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 3/6] drm/i915: Extract pipe_mbus_dbox_ctl_update() Ville Syrjala
2024-11-01 10:29 ` Jani Nikula
2024-11-01 13:46 ` Ville Syrjälä [this message]
2024-10-31 15:56 ` [PATCH 4/6] drm/i915: Extract mbus_ctl_join_update() Ville Syrjala
2024-11-01 10:30 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 5/6] drm/i915: Sanitize MBUS joining Ville Syrjala
2024-11-01 10:39 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 6/6] drm/i915: Simplify xelpdp_is_only_pipe_per_dbuf_bank() Ville Syrjala
2024-11-01 10:32 ` Jani Nikula
2024-11-04 7:33 ` ✓ Fi.CI.BAT: success for drm/i915: Sanitize MBUS joining Patchwork
2024-11-04 8:54 ` ✓ Fi.CI.IGT: " 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=ZyTbnVxcHnwvwi0K@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox