public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/8] drm/i915: Nuke the useless changed param from skl_ddb_add_affected_pipes()
Date: Wed, 16 Oct 2019 14:25:58 +0000	[thread overview]
Message-ID: <7762596917d259a3ceef4f7d420adf056ff06bc0.camel@intel.com> (raw)
In-Reply-To: <20191011200949.7839-2-ville.syrjala@linux.intel.com>

On Fri, 2019-10-11 at 23:09 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> changed==true just means we have some crtcs in the state. All the
> stuff following this only operates on crtcs in the state anyway so
> there is no point in having this bool.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 30 ++++--------------------------
>  1 file changed, 4 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c
> b/drivers/gpu/drm/i915/intel_pm.c
> index b306e2338f5a..49568270a89d 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5424,35 +5424,14 @@ skl_print_wm_changes(struct
> intel_atomic_state *state)
>  }
>  
>  static int
> -skl_ddb_add_affected_pipes(struct intel_atomic_state *state, bool
> *changed)
> +skl_ddb_add_affected_pipes(struct intel_atomic_state *state)
>  {
>  	struct drm_device *dev = state->base.dev;
>  	const struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct intel_crtc *crtc;
>  	struct intel_crtc_state *crtc_state;
>  	u32 realloc_pipes = pipes_modified(state);
> -	int ret, i;
> -
> -	/*
> -	 * When we distrust bios wm we always need to recompute to set
> the
> -	 * expected DDB allocations for each CRTC.
> -	 */
> -	if (dev_priv->wm.distrust_bios_wm)
> -		(*changed) = true;
> -
> -	/*
> -	 * If this transaction isn't actually touching any CRTC's,
> don't
> -	 * bother with watermark calculation.  Note that if we pass
> this
> -	 * test, we're guaranteed to hold at least one CRTC state
> mutex,
> -	 * which means we can safely use values like dev_priv-
> >active_pipes
> -	 * since any racing commits that want to update them would need
> to
> -	 * hold _all_ CRTC state mutexes.
> -	 */
> -	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i)
> -		(*changed) = true;
> -
> -	if (!*changed)
> -		return 0;
> +	int ret;
>  
>  	/*
>  	 * If this is our first atomic update following hardware
> readout,
> @@ -5576,14 +5555,13 @@ skl_compute_wm(struct intel_atomic_state
> *state)
>  	struct intel_crtc_state *new_crtc_state;
>  	struct intel_crtc_state *old_crtc_state;
>  	struct skl_ddb_values *results = &state->wm_results;
> -	bool changed = false;
>  	int ret, i;
>  
>  	/* Clear all dirty flags */
>  	results->dirty_pipes = 0;
>  
> -	ret = skl_ddb_add_affected_pipes(state, &changed);
> -	if (ret || !changed)
> +	ret = skl_ddb_add_affected_pipes(state);
> +	if (ret)
>  		return ret;
>  
>  	/*
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-16 14:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 20:09 [PATCH 0/8] drm/i915: Some cleanup near the SKL wm/ddb area Ville Syrjala
2019-10-11 20:09 ` [PATCH 1/8] drm/i915: Nuke the useless changed param from skl_ddb_add_affected_pipes() Ville Syrjala
2019-10-16 14:25   ` Lisovskiy, Stanislav [this message]
2019-10-11 20:09 ` [PATCH 2/8] drm/i915: Nuke 'realloc_pipes' Ville Syrjala
2019-10-16 14:27   ` Lisovskiy, Stanislav
2019-10-11 20:09 ` [PATCH 3/8] drm/i915: Make dirty_pipes refer to pipes Ville Syrjala
2019-10-16 14:28   ` Lisovskiy, Stanislav
2019-10-11 20:09 ` [PATCH 4/8] drm/i915: Don't set undefined bits in dirty_pipes Ville Syrjala
2019-11-29  9:24   ` Lisovskiy, Stanislav
2019-11-29  9:24     ` [Intel-gfx] " Lisovskiy, Stanislav
2019-10-11 20:09 ` [PATCH 5/8] drm/i915: Streamline skl_commit_modeset_enables() Ville Syrjala
2019-12-03 13:47   ` [Intel-gfx] " Lisovskiy, Stanislav
2019-10-11 20:09 ` [PATCH 6/8] drm/i915: Polish WM_LINETIME register stuff Ville Syrjala
2019-10-14 14:56   ` [PATCH v2 " Ville Syrjala
2019-12-03 14:02     ` [Intel-gfx] " Lisovskiy, Stanislav
2019-10-11 20:09 ` [PATCH 7/8] drm/i915: Move linetime wms into the crtc state Ville Syrjala
2019-10-11 20:09 ` [PATCH 8/8] drm/i915: Nuke skl wm.dirty_pipes bitmask Ville Syrjala
2019-11-29  9:18   ` Lisovskiy, Stanislav
2019-11-29  9:18     ` [Intel-gfx] " Lisovskiy, Stanislav
2019-10-11 21:35 ` ✗ Fi.CI.BUILD: failure for drm/i915: Some cleanup near the SKL wm/ddb area Patchwork
2019-10-14 18:19 ` ✓ Fi.CI.BAT: success for drm/i915: Some cleanup near the SKL wm/ddb area (rev2) Patchwork
2019-10-15  3:21 ` ✓ 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=7762596917d259a3ceef4f7d420adf056ff06bc0.camel@intel.com \
    --to=stanislav.lisovskiy@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