From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Fix glk watermark calculations
Date: Wed, 6 May 2020 16:28:16 +0300 [thread overview]
Message-ID: <20200506132815.GS6112@intel.com> (raw)
In-Reply-To: <20200506131720.GA16576@intel.com>
On Wed, May 06, 2020 at 04:17:20PM +0300, Lisovskiy, Stanislav wrote:
> On Thu, Apr 30, 2020 at 03:58:21PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > GLK wants the +1 adjustement for the "blocks per line" value
> > for x-tile/y-tile, just like cnl+.
> >
> > Also the x-tile and linear cases are almost identical. The only
> > difference is this +1 which is always done for glk+, and only
> > done for linear on skl/bxt. Let's unify it to a single branch
> > with a special case for the +1, just like we do for y-tile.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_pm.c | 15 ++++++++-------
> > 1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index bfb180fe8047..65a3236ce277 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -4810,7 +4810,7 @@ skl_wm_method1(const struct drm_i915_private *dev_priv, u32 pixel_rate,
> > wm_intermediate_val = latency * pixel_rate * cpp;
> > ret = div_fixed16(wm_intermediate_val, 1000 * dbuf_block_size);
> >
> > - if (INTEL_GEN(dev_priv) >= 10)
> > + if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
> > ret = add_fixed16_u32(ret, 1);
> >
> > return ret;
> > @@ -4945,18 +4945,19 @@ skl_compute_wm_params(const struct intel_crtc_state *crtc_state,
> > wp->y_min_scanlines,
> > wp->dbuf_block_size);
> >
> > - if (INTEL_GEN(dev_priv) >= 10)
> > + if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
> > interm_pbpl++;
> >
> > wp->plane_blocks_per_line = div_fixed16(interm_pbpl,
> > wp->y_min_scanlines);
> > - } else if (wp->x_tiled && IS_GEN(dev_priv, 9)) {
> > - interm_pbpl = DIV_ROUND_UP(wp->plane_bytes_per_line,
> > - wp->dbuf_block_size);
> > - wp->plane_blocks_per_line = u32_to_fixed16(interm_pbpl);
> > } else {
> > interm_pbpl = DIV_ROUND_UP(wp->plane_bytes_per_line,
> > - wp->dbuf_block_size) + 1;
> > + wp->dbuf_block_size);
> > +
> > + if (!wp->x_tiled ||
> > + INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
> > + interm_pbpl++;
> > +
>
> Is it so that we want +1 here only for x-tile,y-tile for GLK?
> Because I guess if you have linear mapping and GLK, this will do +1 as well.
glk+ always wants the +1.
pre-glk wants +1 only for linear.
>
> With this clarified,
>
> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
>
> > wp->plane_blocks_per_line = u32_to_fixed16(interm_pbpl);
> > }
> >
> > --
> > 2.24.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2020-05-06 13:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 12:58 [Intel-gfx] [PATCH 1/2] drm/i915: Fix glk watermark calculations Ville Syrjala
2020-04-30 12:58 ` [Intel-gfx] [PATCH 2/2] drm/i915: Remove cnl pre-prod workarounds Ville Syrjala
2020-04-30 13:08 ` Chris Wilson
2020-04-30 13:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Fix glk watermark calculations Patchwork
2020-04-30 21:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-05-06 13:17 ` [Intel-gfx] [PATCH 1/2] " Lisovskiy, Stanislav
2020-05-06 13:28 ` Ville Syrjälä [this message]
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=20200506132815.GS6112@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stanislav.lisovskiy@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.