]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Introduce struct intel_wakeref
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Apr 2019 20:07:13 +0000 (21:07 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Apr 2019 21:25:26 +0000 (22:25 +0100)
commitff8a60b0678851a4e3109445b837f8245a24f172
tree1bdbdb1d916984d98943e6f0bc3d23636509754c
parent0f5b27d799efec6ce75dcc592dc041419e95103e
drm/i915: Introduce struct intel_wakeref

For controlling runtime pm of the GT and engines, we would like to have
a callback to do extra work the first time we wake up and the last time
we drop the wakeref. This first/last access needs serialisation and so
we encompass a mutex with the regular intel_wakeref_t tracker.

v2: Drop the _once naming and report the errors.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc; Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/Makefile.header-test
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_wakeref.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_wakeref.h [new file with mode: 0644]