]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Introduce intel_runtime_pm_disable to pair intel_runtime_pm_enable
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Aug 2018 12:37:56 +0000 (15:37 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 16 Aug 2018 14:12:06 +0000 (17:12 +0300)
commit07d805721938a35e695d9f89218a4b02f6a4b2c4
tree17c1248e2a99e95447d091b6395a4caed9485045
parenta4417b7b419a68540ad7945ac4efbb39d19afa63
drm/i915: Introduce intel_runtime_pm_disable to pair intel_runtime_pm_enable

Currently, we cancel the extra wakeref we have for !runtime-pm devices
inside power_wells_fini_hw. However, this is not strictly paired with
the acquisition of that wakeref in runtime_pm_enable (as the fini_hw may
be called on errors paths before we even call runtime_pm_enable). Make
the symmetry more explicit and include a check that we do release all of
our rpm wakerefs.

v2: Fixup transfer of ownership back to core whilst keeping our wakeref
count balanced.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180816123757.3286-1-imre.deak@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_runtime_pm.c