Message ID | 20180409160534.23118-1-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index bd7e695fc663..9302b4abe357 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -479,7 +479,11 @@ static u64 get_rc6(struct drm_i915_private *i915) val = kdev->power.suspended_jiffies - i915->pmu.suspended_jiffies_last; - val += jiffies - kdev->power.accounting_timestamp; + + if (kdev->power.runtime_status == RPM_SUSPENDED) + val += jiffies - kdev->power.accounting_timestamp; + else + WARN(1, "not suspended"); spin_unlock(&kdev->power.lock);