From: Vincent Guittot <vincent.guittot@linaro.org>
To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
rjw@rjwysocki.net, thara.gopinath@linaro.org,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, airlied@linux.ie,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: ulf.hansson@linaro.org, Vincent Guittot <vincent.guittot@linaro.org>
Subject: [PATCH v2 3/3] drm/i915: Move to new PM core fields
Date: Fri, 14 Dec 2018 15:22:27 +0100 [thread overview]
Message-ID: <1544797347-20601-4-git-send-email-vincent.guittot@linaro.org> (raw)
In-Reply-To: <1544797347-20601-1-git-send-email-vincent.guittot@linaro.org>
With jiffies been replaced by raw ns in PM core accounting, 915 driver is
updated to use this new time infrastructure.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
drivers/gpu/drm/i915/i915_pmu.c | 12 ++++++------
drivers/gpu/drm/i915/i915_pmu.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index d6c8f8f..cf6437d 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -493,14 +493,14 @@ static u64 get_rc6(struct drm_i915_private *i915)
*/
if (kdev->power.runtime_status == RPM_SUSPENDED) {
if (!i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur)
- i915->pmu.suspended_jiffies_last =
- kdev->power.suspended_jiffies;
+ i915->pmu.suspended_time_last =
+ kdev->power.suspended_time;
- val = kdev->power.suspended_jiffies -
- i915->pmu.suspended_jiffies_last;
- val += jiffies - kdev->power.accounting_timestamp;
+ val = kdev->power.suspended_time -
+ i915->pmu.suspended_time_last;
+ val += ktime_to_ns(ktime_get()) -
+ kdev->power.accounting_timestamp;
- val = jiffies_to_nsecs(val);
val += i915->pmu.sample[__I915_SAMPLE_RC6].cur;
i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur = val;
diff --git a/drivers/gpu/drm/i915/i915_pmu.h b/drivers/gpu/drm/i915/i915_pmu.h
index 7f164ca..3dc2a30 100644
--- a/drivers/gpu/drm/i915/i915_pmu.h
+++ b/drivers/gpu/drm/i915/i915_pmu.h
@@ -95,9 +95,9 @@ struct i915_pmu {
*/
struct i915_pmu_sample sample[__I915_NUM_PMU_SAMPLERS];
/**
- * @suspended_jiffies_last: Cached suspend time from PM core.
+ * @suspended_time_last: Cached suspend time from PM core.
*/
- unsigned long suspended_jiffies_last;
+ u64 suspended_time_last;
/**
* @i915_attr: Memory block holding device attributes.
*/
--
2.7.4
next prev parent reply other threads:[~2018-12-14 14:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 14:22 [PATCH v2 0/3] PM/pm_runtime: move on hrtimer and nsec Vincent Guittot
2018-12-14 14:22 ` [PATCH v2 1/3] PM/pm_runtime: move autosuspend on hrtimer Vincent Guittot
2018-12-19 9:25 ` Ulf Hansson
2018-12-14 14:22 ` [PATCH v2 2/3] PM/runtime:Replace jiffies based accouting with ktime based accounting Vincent Guittot
2018-12-14 14:22 ` Vincent Guittot [this message]
2018-12-14 14:36 ` [PATCH v2 3/3] drm/i915: Move to new PM core fields Ulf Hansson
2018-12-17 14:21 ` Vincent Guittot
2018-12-17 15:17 ` Ulf Hansson
2018-12-18 9:57 ` Rafael J. Wysocki
2018-12-18 9:58 ` Vincent Guittot
2018-12-18 10:03 ` Rafael J. Wysocki
2018-12-18 10:08 ` Vincent Guittot
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=1544797347-20601-4-git-send-email-vincent.guittot@linaro.org \
--to=vincent.guittot@linaro.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rodrigo.vivi@intel.com \
--cc=thara.gopinath@linaro.org \
--cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).