public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915: Extract mbus_ctl_join_update()
Date: Fri, 01 Nov 2024 12:30:02 +0200	[thread overview]
Message-ID: <87a5ejjlg5.fsf@intel.com> (raw)
In-Reply-To: <20241031155646.15165-5-ville.syrjala@linux.intel.com>

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 MBUS_CTL register during an

*to* :)

And the same nitpick about intel_display.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> upcoming MBUS sanitation stage. Extract the reprogramming
> 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 | 34 ++++++++++++--------
>  1 file changed, 21 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> index 8a31508f94bb..2eefeff6693a 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -3427,22 +3427,13 @@ static enum pipe intel_mbus_joined_pipe(struct intel_atomic_state *state,
>  		return INVALID_PIPE;
>  }
>  
> -static void intel_dbuf_mbus_join_update(struct intel_atomic_state *state,
> -					enum pipe pipe)
> +static void mbus_ctl_join_update(struct drm_i915_private *i915,
> +				 const struct intel_dbuf_state *dbuf_state,
> +				 enum pipe pipe)
>  {
> -	struct drm_i915_private *i915 = to_i915(state->base.dev);
> -	const struct intel_dbuf_state *old_dbuf_state =
> -		intel_atomic_get_old_dbuf_state(state);
> -	const struct intel_dbuf_state *new_dbuf_state =
> -		intel_atomic_get_new_dbuf_state(state);
>  	u32 mbus_ctl;
>  
> -	drm_dbg_kms(&i915->drm, "Changing mbus joined: %s -> %s (pipe: %c)\n",
> -		    str_yes_no(old_dbuf_state->joined_mbus),
> -		    str_yes_no(new_dbuf_state->joined_mbus),
> -		    pipe != INVALID_PIPE ? pipe_name(pipe) : '*');
> -
> -	if (new_dbuf_state->joined_mbus)
> +	if (dbuf_state->joined_mbus)
>  		mbus_ctl = MBUS_HASHING_MODE_1x4 | MBUS_JOIN;
>  	else
>  		mbus_ctl = MBUS_HASHING_MODE_2x2;
> @@ -3457,6 +3448,23 @@ static void intel_dbuf_mbus_join_update(struct intel_atomic_state *state,
>  		     MBUS_JOIN_PIPE_SELECT_MASK, mbus_ctl);
>  }
>  
> +static void intel_dbuf_mbus_join_update(struct intel_atomic_state *state,
> +					enum pipe pipe)
> +{
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
> +	const struct intel_dbuf_state *old_dbuf_state =
> +		intel_atomic_get_old_dbuf_state(state);
> +	const struct intel_dbuf_state *new_dbuf_state =
> +		intel_atomic_get_new_dbuf_state(state);
> +
> +	drm_dbg_kms(&i915->drm, "Changing mbus joined: %s -> %s (pipe: %c)\n",
> +		    str_yes_no(old_dbuf_state->joined_mbus),
> +		    str_yes_no(new_dbuf_state->joined_mbus),
> +		    pipe != INVALID_PIPE ? pipe_name(pipe) : '*');
> +
> +	mbus_ctl_join_update(i915, new_dbuf_state, pipe);
> +}
> +
>  void intel_dbuf_mbus_pre_ddb_update(struct intel_atomic_state *state)
>  {
>  	const struct intel_dbuf_state *new_dbuf_state =

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-11-01 10:30 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ä
2024-10-31 15:56 ` [PATCH 4/6] drm/i915: Extract mbus_ctl_join_update() Ville Syrjala
2024-11-01 10:30   ` Jani Nikula [this message]
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=87a5ejjlg5.fsf@intel.com \
    --to=jani.nikula@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox