From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/pmu: Correct the rc6 offset upon enabling
Date: Tue, 14 Jan 2020 11:45:30 +0000 [thread overview]
Message-ID: <93c812a6-ddc8-8710-f97e-d54a8e163bc7@linux.intel.com> (raw)
In-Reply-To: <ffaddcf2-0c6a-398a-2b1b-2f67b4094ade@linux.intel.com>
On 14/01/2020 11:37, Tvrtko Ursulin wrote:
>
> On 14/01/2020 11:06, Chris Wilson wrote:
>> Quoting Chris Wilson (2020-01-14 10:56:47)
>>> The rc6 residency starts ticking from 0 from BIOS POST, but the kernel
>>> starts measuring the time from its boot. If we start measuruing
>>> I915_PMU_RC6_RESIDENCY while the GT is idle, we start our sampling from
>>> 0 and then upon first activity (park/unpark) add in all the rc6
>>> residency since boot. After the first park with the sampler engaged, the
>>> sleep/active counters are aligned.
>>>
>>> v2: With a wakeref to be sure
>>>
>>> Fixes: df6a42053513 ("drm/i915/pmu: Ensure monotonic rc6")
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/i915_pmu.c | 12 ++++++++++++
>>> 1 file changed, 12 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_pmu.c
>>> b/drivers/gpu/drm/i915/i915_pmu.c
>>> index 28a82c849bac..ec0299490dd4 100644
>>> --- a/drivers/gpu/drm/i915/i915_pmu.c
>>> +++ b/drivers/gpu/drm/i915/i915_pmu.c
>>> @@ -637,8 +637,10 @@ static void i915_pmu_enable(struct perf_event
>>> *event)
>>> container_of(event->pmu, typeof(*i915), pmu.base);
>>> unsigned int bit = event_enabled_bit(event);
>>> struct i915_pmu *pmu = &i915->pmu;
>>> + intel_wakeref_t wakeref;
>>> unsigned long flags;
>>> + wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>
> I think it would be nicer to use with_intel_runtime_pm directly at the
> __get_rc6 call site. That would show/localise where it is actually needed.
Spinlock though, my bad.
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:[~2020-01-14 11:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 10:56 [Intel-gfx] [PATCH 1/2] drm/i915/pmu: Correct the rc6 offset upon enabling Chris Wilson
2020-01-14 10:56 ` [Intel-gfx] [PATCH 2/2] drm/i915/gt: Clear rc6 residency trackers across suspend Chris Wilson
2020-01-14 11:17 ` Tvrtko Ursulin
2020-01-14 11:06 ` [Intel-gfx] [PATCH 1/2] drm/i915/pmu: Correct the rc6 offset upon enabling Chris Wilson
2020-01-14 11:37 ` Tvrtko Ursulin
2020-01-14 11:45 ` Tvrtko Ursulin [this message]
2020-01-14 11:49 ` Chris Wilson
2020-01-14 12:37 ` Tvrtko Ursulin
2020-01-14 11:39 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2020-01-14 11:39 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2020-01-16 14:16 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=93c812a6-ddc8-8710-f97e-d54a8e163bc7@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox