All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Ignore minimum lines for level 0 in skl_compute_plane_wm
Date: Tue, 30 Jan 2018 17:16:33 +0200	[thread overview]
Message-ID: <20180130151633.GB5453@intel.com> (raw)
In-Reply-To: <20180130150520.58604-1-maarten.lankhorst@linux.intel.com>

On Tue, Jan 30, 2018 at 04:05:20PM +0100, Maarten Lankhorst wrote:
> According to bspec, result_lines > 31 is only a maximum for latency
> level 1 through 7.
> 
> For level 0 the number of lines is ignored, so always write 0 there
> to prevent overflowing the 5 bits value.
> 
> This is required to make NV12 work.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 26132fa6ebce..ed0ec0188962 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4805,6 +4805,10 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
>  			res_blocks = result_prev->plane_res_b;
>  	}
>  
> +	/* The number of lines are ignored for the level 0 watermark. */
> +	if (!level)
> +		res_lines = 0;
> +

Looks like we could just skip computing res_lines entirely.
But this should work too so

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>a

>  	if (res_blocks >= ddb_allocation || res_lines > 31) {
>  		result->plane_en = false;
>  
> -- 
> 2.15.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-01-30 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 13:54 [PATCH] drm/i915: Use the correct maximum in skl_compute_plane_wm Maarten Lankhorst
2018-01-30 14:06 ` Ville Syrjälä
2018-01-30 15:05   ` [PATCH] drm/i915: Ignore minimum lines for level 0 " Maarten Lankhorst
2018-01-30 15:16     ` Ville Syrjälä [this message]
2018-01-31  9:46       ` [(rebase for CI) PATCH] " Maarten Lankhorst
2018-01-30 18:28 ` ✗ Fi.CI.BAT: failure for drm/i915: Use the correct maximum in skl_compute_plane_wm (rev2) Patchwork
2018-01-31 10:20 ` ✓ Fi.CI.BAT: success for drm/i915: Use the correct maximum in skl_compute_plane_wm (rev3) Patchwork
2018-01-31 13:01 ` ✓ 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=20180130151633.GB5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.