intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Kumar, Mahesh" <mahesh1.kumar@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/skl: Correct other-pipe watermark update condition check (v2)
Date: Tue, 27 Oct 2015 11:46:25 +0530	[thread overview]
Message-ID: <562F16B9.2010401@intel.com> (raw)
In-Reply-To: <1445618494-703-1-git-send-email-matthew.d.roper@intel.com>

Yes, it doesn't solve all warnings.
Other than fbdev restore, there is one warning which I faced during 
DPMS/Hot-plug, which is due to calculation of watermarks twice. Once for 
first CRTC "Pipe-A" (during which it consider/calculates watermark for 
other pipe "Pipe-B" as well & stores in structure 
"intel_crtc->wm.active.skl") & Now in same atomic_commit, when it 
calculate watermark for second CRTC "Pipe-B" , that time watermark for 
other-pipe (in this case pipe-A) already have calculated values so it 
gives !wm_changed warning.

Hoping 2-stage watermark programming will take care of this, as in that 
case, If I'm not misunderstood  final results should be stored after 
calculation for all pipes.

Regards,
-Mahesh

On 10/23/2015 10:11 PM, Matt Roper wrote:
> From: "Kumar, Mahesh" <mahesh1.kumar@intel.com>
>
> If ddb allocation for planes in current CRTC is changed, that doesn't
> lead to ddb allocation change for other CRTCs, because our DDB allocation
> is not dynamic according to plane parameters, ddb is allocated according
> to number of CRTC enabled, & divided equally among CTRC's.
>
> In current condition check during Watermark calculation, if number of
> plane/ddb allocation changes for current CRTC, Watermark for other pipes
> are recalculated. But there is no change in DDB allocation of other pipe
> so watermark is also not changed, This leads to warning messages.
> WARN_ON(!wm_changed)
>
> This patch corrects this and check if DDB allocation for pipes is changed,
> then only recalculate watermarks.
>
> v2 (by Matt): Rebased to latest -nightly and fixed a typo
>
> Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
> Reviewed-by(v1): Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> I don't think this solves all the !wm_changed warnings (I still see one during
> fbdev restore following various igt tests), but it seems like a move in the
> right direction so I figured I'd go ahead and rebase Mahesh' patch so it can
> get merged.
>
>   drivers/gpu/drm/i915/intel_pm.c | 12 +++++-------
>   1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 0fb0459..0467e34 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3064,14 +3064,12 @@ static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
>   	struct drm_device *dev = intel_crtc->base.dev;
>   	struct drm_i915_private *dev_priv = dev->dev_private;
>   	const struct skl_ddb_allocation *cur_ddb = &dev_priv->wm.skl_hw.ddb;
> -	enum pipe pipe = intel_crtc->pipe;
> -
> -	if (memcmp(new_ddb->plane[pipe], cur_ddb->plane[pipe],
> -		   sizeof(new_ddb->plane[pipe])))
> -		return true;
>   
> -	if (memcmp(&new_ddb->plane[pipe][PLANE_CURSOR], &cur_ddb->plane[pipe][PLANE_CURSOR],
> -		    sizeof(new_ddb->plane[pipe][PLANE_CURSOR])))
> +	/*
> +	 * If ddb allocation of pipes changed, it may require recalculation of
> +	 * watermarks
> +	 */
> +	if (memcmp(new_ddb->pipe, cur_ddb->pipe, sizeof(new_ddb->pipe)))
>   		return true;
>   
>   	return false;

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

  reply	other threads:[~2015-10-27  6:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 18:02 [PATCH] drm/i915/skl: Correct other-pipe watermark update condition check Kumar, Mahesh
2015-10-16 16:45 ` Ville Syrjälä
2015-10-19  9:29 ` Daniel Vetter
2015-10-19 13:00   ` Ville Syrjälä
2015-10-19 13:22     ` Daniel Vetter
2015-10-23 16:41       ` [PATCH] drm/i915/skl: Correct other-pipe watermark update condition check (v2) Matt Roper
2015-10-27  6:16         ` Kumar, Mahesh [this message]
2015-11-17 14:16         ` Daniel Vetter
2016-02-22 16:42         ` Lyude

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=562F16B9.2010401@intel.com \
    --to=mahesh1.kumar@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;
as well as URLs for NNTP newsgroup(s).