]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: add assert_rpm_wakelock_held helper
authorImre Deak <imre.deak@intel.com>
Tue, 15 Dec 2015 18:10:33 +0000 (20:10 +0200)
committerImre Deak <imre.deak@intel.com>
Thu, 17 Dec 2015 13:59:44 +0000 (15:59 +0200)
commit386bd47d82f8406a9f1eab3e56bc1977405302b0
treec7ef70c96b2fa80f66aa68a82f1abd02b7660af9
parentd1d25fe7c72415c19d4d81cd87b3ee391548c333
drm/i915: add assert_rpm_wakelock_held helper

As a preparation for follow-up patches add a new helper that checks
whether we hold an RPM reference, since this is what we want most of
the cases. Atm this helper will only check for the HW suspended state, a
follow-up patch will do the actual change to check the refcount instead.
One exception is the forcewake release timer function, where it's
guaranteed that the HW is on even though the RPM refcount drops to zero.
This guarantee is provided by flushing the timer in the runtime suspend
handler. So leave the assert_device_not_suspended check in place there.

Also rename assert_device_suspended for consistency and export these
helpers as a preparation for the follow-up patches.

No functional change.

v3:
- change the assert warning message to be more meaningful (Chris)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1450203038-5150-6-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_uncore.c