From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 14/17] drm/i915: Print the watermark latencies during init
Date: Fri, 2 Aug 2013 17:55:06 +0300 [thread overview]
Message-ID: <20130802145506.GM5004@intel.com> (raw)
In-Reply-To: <CA+gsUGQpT-V_RKdf7y3pX0DBLkUu+SCQy2mgej7Y5BQV4Lo4mQ@mail.gmail.com>
On Fri, Aug 02, 2013 at 11:41:31AM -0300, Paulo Zanoni wrote:
> 2013/8/1 <ville.syrjala@linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Seeing the watermark latency values in dmesg might help sometimes.
> >
> > v2: Use DRM_ERROR() when expected latency values are missing
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_pm.c | 37 +++++++++++++++++++++++++++++++++++++
> > 1 file changed, 37 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index f754ca2..53967ef 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -2394,6 +2394,39 @@ static void intel_fixup_cur_wm_latency(struct drm_device *dev, uint16_t wm[5])
> > wm[3] *= 2;
> > }
> >
> > +static void intel_print_wm_latency(struct drm_device *dev,
> > + const char *name,
> > + const uint16_t wm[5])
> > +{
> > + int level, max_level;
> > +
> > + /* how many WM levels are we expecting */
> > + if (IS_HASWELL(dev))
> > + max_level = 4;
> > + else if (INTEL_INFO(dev)->gen >= 6)
> > + max_level = 3;
> > + else
> > + max_level = 2;
> > +
> > + for (level = 0; level <= max_level; level++) {
> > + unsigned int latency = wm[level];
> > +
> > + if (latency == 0) {
> > + DRM_ERROR("%s WM%d latency not provided\n",
> > + name, level);
>
> On your last email you mentioned that we may start getting bug reports
> that we can't do anything about. You're right, I guess if we start
> getting these reports we should probably tune the message to
> DRM_DEBUG_KMS then.
Yeah. Another idea that I had is that we could store the max WM
level into dev_priv based on which levels have non-zero latencies.
That way we'd avoid ever hitting the case where we try to compute
a watermark w/ latency==0. But I didn't implement this yet.
>
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> > + continue;
> > + }
> > +
> > + /* WM1+ latency values in 0.5us units */
> > + if (level > 0)
> > + latency *= 5;
> > +
> > + DRM_DEBUG_KMS("%s WM%d latency %u (%u.%u usec)\n",
> > + name, level, wm[level],
> > + latency / 10, latency % 10);
> > + }
> > +}
> > +
> > static void intel_setup_wm_latency(struct drm_device *dev)
> > {
> > struct drm_i915_private *dev_priv = dev->dev_private;
> > @@ -2407,6 +2440,10 @@ static void intel_setup_wm_latency(struct drm_device *dev)
> >
> > intel_fixup_spr_wm_latency(dev, dev_priv->wm.spr_latency);
> > intel_fixup_cur_wm_latency(dev, dev_priv->wm.cur_latency);
> > +
> > + intel_print_wm_latency(dev, "Primary", dev_priv->wm.pri_latency);
> > + intel_print_wm_latency(dev, "Sprite", dev_priv->wm.spr_latency);
> > + intel_print_wm_latency(dev, "Cursor", dev_priv->wm.cur_latency);
> > }
> >
> > static void hsw_compute_wm_parameters(struct drm_device *dev,
> > --
> > 1.8.1.5
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-08-02 14:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 13:18 [PATCH 0/17] drm/i915: ILK+ watermark prep patches ville.syrjala
2013-08-01 13:18 ` [PATCH v2 01/17] drm/i915: Add scaled paramater to update_sprite_watermarks() ville.syrjala
2013-08-05 16:23 ` Daniel Vetter
2013-08-01 13:18 ` [PATCH 02/17] drm/i915: Pass the actual sprite width to watermarks functions ville.syrjala
2013-08-01 13:18 ` [PATCH 03/17] drm/i915: Calculate the sprite WM based on the source width instead of the destination width ville.syrjala
2013-08-01 13:18 ` [PATCH 04/17] drm/i915: Rename hsw_wm_get_pixel_rate to ilk_pipe_pixel_rate ville.syrjala
2013-08-01 13:18 ` [PATCH 05/17] drm/i915: Rename most wm compute functions to ilk_ prefix ville.syrjala
2013-08-01 13:18 ` [PATCH 06/17] drm/i915: Don't pass "mem_value" to ilk_compute_fbc_wm ville.syrjala
2013-08-01 13:18 ` [PATCH 07/17] drm/i915: Change the watermark latency type to uint16_t ville.syrjala
2013-08-01 13:18 ` [PATCH 08/17] drm/i915: Split out reading of HSW watermark latency values ville.syrjala
2013-08-01 13:18 ` [PATCH 09/17] drm/i915: Don't multiply the watermark latency values too early ville.syrjala
2013-08-01 13:18 ` [PATCH 10/17] drm/i915: Add SNB/IVB support to intel_read_wm_latency ville.syrjala
2013-08-01 13:18 ` [PATCH 11/17] drm/i915: Add ILK " ville.syrjala
2013-08-02 14:16 ` Paulo Zanoni
2013-08-01 13:18 ` [PATCH v2 12/17] drm/i915: Store the watermark latency values in dev_priv ville.syrjala
2013-08-01 14:23 ` Chris Wilson
2013-08-05 16:25 ` Daniel Vetter
2013-08-05 16:41 ` Chris Wilson
2013-08-02 14:28 ` Paulo Zanoni
2013-08-01 13:18 ` [PATCH v2 13/17] drm/i915: Use the stored cursor and plane latencies properly ville.syrjala
2013-08-02 14:34 ` Paulo Zanoni
2013-08-01 13:18 ` [PATCH v2 14/17] drm/i915: Print the watermark latencies during init ville.syrjala
2013-08-02 14:41 ` Paulo Zanoni
2013-08-02 14:55 ` Ville Syrjälä [this message]
2013-08-01 13:18 ` [PATCH v2 15/17] drm/i915: Disable specific watermark levels when latency is zero ville.syrjala
2013-08-02 14:48 ` Paulo Zanoni
2013-08-05 16:31 ` Daniel Vetter
2013-08-01 13:18 ` [PATCH 16/17] drm/i915: Use the watermark latency values from dev_priv for ILK/SNB/IVB too ville.syrjala
2013-08-02 15:16 ` Paulo Zanoni
2013-08-02 15:23 ` Ville Syrjälä
2013-08-02 15:55 ` Paulo Zanoni
2013-08-01 13:18 ` [PATCH 17/17] drm/i915: Add comments about units of latency values ville.syrjala
2013-08-02 15:58 ` Paulo Zanoni
2013-08-02 16:09 ` Ville Syrjälä
2013-08-05 16:41 ` Daniel Vetter
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=20130802145506.GM5004@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=przanoni@gmail.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.