]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: add support for checking RPM atomic sections
authorImre Deak <imre.deak@intel.com>
Tue, 15 Dec 2015 18:10:37 +0000 (20:10 +0200)
committerImre Deak <imre.deak@intel.com>
Thu, 17 Dec 2015 14:37:43 +0000 (16:37 +0200)
commitf27b02de8c57e8c78a5b875a3174c1c8bf0a2473
treea5bab2bec86f9d34521c9094027ee82141a11d43
parent5f32c23331d17a182da241c5ba6a7827f081e700
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
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/i915/intel_runtime_pm.c