diff options
author | Imre Deak <imre.deak@intel.com> | 2015-12-15 20:10:37 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2015-12-17 16:37:43 +0200 |
commit | 2b19efebf175bb2120c5ae00b8e79febe73d225a (patch) | |
tree | a5bab2bec86f9d34521c9094027ee82141a11d43 /drivers/gpu/drm/i915/intel_pm.c | |
parent | 542db3cd345c38936bb9e4bb2c8d1971e6ac6619 (diff) | |
download | op-kernel-dev-2b19efebf175bb2120c5ae00b8e79febe73d225a.zip op-kernel-dev-2b19efebf175bb2120c5ae00b8e79febe73d225a.tar.gz |
drm/i915: add support for checking RPM atomic sections
In some cases we want to check whether we hold an RPM wakelock reference
for the whole duration of a sequence. To achieve this add a new RPM
atomic sequence counter that we increment any time the wakelock refcount
drops to zero. Check whether the sequence number stays the same during
the atomic section and that we hold the wakelock at the beginning of the
section.
Motivated by Chris.
v2-v3:
- unchanged
v4:
- swap the order of atomic_read() and assert_rpm_wakelock_held() in
assert_rpm_atomic_begin() to avoid race
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v3)
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450203038-5150-10-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 3232305..8d0d6f5 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -7247,4 +7247,5 @@ void intel_pm_setup(struct drm_device *dev) dev_priv->pm.suspended = false; atomic_set(&dev_priv->pm.wakeref_count, 0); + atomic_set(&dev_priv->pm.atomic_seq, 0); } |