From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/pmu: Clear the previous sample value when parking
Date: Thu, 23 Nov 2017 06:56:02 +0000 [thread overview]
Message-ID: <44d8ac9b-a5be-c39b-4f9d-f4dd003fdbf2@linux.intel.com> (raw)
In-Reply-To: <20171123000643.10474-1-chris@chris-wilson.co.uk>
On 23/11/2017 00:06, Chris Wilson wrote:
> When turning off the engines, and the pmu sampling, clear the previous
> value as the current measurement should be 0.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/i915_pmu.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index f1e932a3fb85..6f1316f5039a 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -135,9 +135,18 @@ static bool pmu_needs_timer(struct drm_i915_private *i915, bool gpu_active)
>
> void i915_pmu_gt_parked(struct drm_i915_private *i915)
> {
> + struct intel_engine_cs *engine;
> + enum intel_engine_id id;
> +
> if (!i915->pmu.base.event_init)
> return;
>
> + for_each_engine(engine, i915, id) {
> + engine->pmu.sample[I915_SAMPLE_BUSY].prev = 0;
> + engine->pmu.sample[I915_SAMPLE_WAIT].prev = 0;
> + engine->pmu.sample[I915_SAMPLE_SEMA].prev = 0;
> + }
> +
> spin_lock_irq(&i915->pmu.lock);
> /*
> * Signal sampling timer to stop if only engine events are enabled and
>
Yes, this is indeed required.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Mind if I change it to use a loop to I915_ENGINE_SAMPLE_MAX, and then
follow up with a patch which moves this define from uapi to i915_pmu.h?
Since during engine classes we realized "/* non-ABI */" enums do not
make sense in the uapi?
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-23 6:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 0:06 [PATCH] drm/i915/pmu: Clear the previous sample value when parking Chris Wilson
2017-11-23 0:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-23 1:03 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-23 6:56 ` Tvrtko Ursulin [this message]
2017-11-23 7:15 ` [PATCH] " Chris Wilson
2017-11-23 8:54 ` [PATCH v2] " Chris Wilson
2017-11-23 9:27 ` [PATCH v3] " Tvrtko Ursulin
2017-11-23 9:37 ` Chris Wilson
2017-11-23 10:17 ` Sagar Arun Kamble
2017-11-23 10:26 ` [PATCH v4] " Tvrtko Ursulin
2017-11-23 12:06 ` Chris Wilson
2017-11-23 10:22 ` ✓ Fi.CI.BAT: success for drm/i915/pmu: Clear the previous sample value when parking (rev3) Patchwork
2017-11-23 12:36 ` Tvrtko Ursulin
2017-11-23 11:20 ` ✓ Fi.CI.BAT: success for drm/i915/pmu: Clear the previous sample value when parking (rev4) Patchwork
2017-11-23 14:06 ` ✗ Fi.CI.IGT: warning " 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=44d8ac9b-a5be-c39b-4f9d-f4dd003fdbf2@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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.