public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/gen9: Re-allocate DDB only for changed pipes
Date: Tue, 28 Jun 2016 10:50:20 +0200	[thread overview]
Message-ID: <8ea2af6b-29ee-9e98-eb58-bc71f998105c@linux.intel.com> (raw)
In-Reply-To: <1467070964-14864-1-git-send-email-matthew.d.roper@intel.com>

Op 28-06-16 om 01:42 schreef Matt Roper:
> When a display update triggers a DDB re-allocation, we should start by
> assuming that only the updated pipes need to be re-allocated (we have
> logic later that may add additional pipes if, e.g., a modeset triggers a
> change to the global allocation).
>
> We were erroneously using the _active_ pipes as our starting point
> rather than the changed pipes.  This causes us to grab CRTC locks that
> we didn't actually need, reducing parallelism.  Given the recent
> non-blocking atomic changes, it also causes legacy pageflips against one
> CRTC to return -EBUSY if there's an outstanding pageflip against a
> different CRTC (a situation easily triggered via compositors like
> Weston).
>
> Fixes: 98d39494d3 ("drm/i915/gen9: Compute DDB allocation at atomic check time (v4)")
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index c94521cc..d7f8ba8 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3879,6 +3879,19 @@ static int skl_update_pipe_wm(struct drm_crtc_state *cstate,
>  	return 0;
>  }
>  
> +static uint32_t
> +pipes_modified(struct drm_atomic_state *state)
> +{
> +	struct drm_crtc *crtc;
> +	struct drm_crtc_state *cstate;
> +	uint32_t i, ret = 0;
> +
> +	for_each_crtc_in_state(state, crtc, cstate, i)
> +		ret |= drm_crtc_mask(crtc);
> +
> +	return ret;
> +}
> +
>  static int
>  skl_compute_ddb(struct drm_atomic_state *state)
>  {
> @@ -3887,7 +3900,7 @@ skl_compute_ddb(struct drm_atomic_state *state)
>  	struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
>  	struct intel_crtc *intel_crtc;
>  	struct skl_ddb_allocation *ddb = &intel_state->wm_results.ddb;
> -	unsigned realloc_pipes = dev_priv->active_crtcs;
> +	uint32_t realloc_pipes = pipes_modified(state);
>  	int ret;
>  
>  	/*

Hey,

Thanks, this is the original bug that triggered the need for "[PATCH] drm/atomic: Make drm_atomic_legacy_backoff reset crtc->acquire_ctx".
Fixing this should remove unnecessary stalls in atomic commit. :-)

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-06-28  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 23:42 [PATCH] drm/i915/gen9: Re-allocate DDB only for changed pipes Matt Roper
2016-06-28  6:02 ` ✓ Ro.CI.BAT: success for " Patchwork
2016-06-28  8:50 ` Maarten Lankhorst [this message]
2016-06-28 17:50   ` [PATCH] " Matt Roper

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=8ea2af6b-29ee-9e98-eb58-bc71f998105c@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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