drm/i915: Extend intel_wakeref to support delayed puts
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Mar 2020 10:32:21 +0000 (10:32 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Mar 2020 12:51:05 +0000 (12:51 +0000)
commite9037e7f9a1681fca32e45e82d7b7f714b49a9e6
treeb802a0ee6f6581b6c873472bc2ce634feeaaff11
parent45d4173994248a47d8689866676b014f5439c711
drm/i915: Extend intel_wakeref to support delayed puts

In some cases we want to hold onto the wakeref for a little after the
last user so that we can avoid having to drop and then immediately
reacquire it. Allow the last user to specify if they would like to keep
the wakeref alive for a short hysteresis.

v2: Embrace bitfield.h for adjustable flags.

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/20200323103221.14444-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine_pm.h
drivers/gpu/drm/i915/gt/intel_gt_requests.c
drivers/gpu/drm/i915/intel_wakeref.c
drivers/gpu/drm/i915/intel_wakeref.h