drm/i915/gt: Hold a wakeref for the active VM
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 31 Mar 2023 14:16:36 +0000 (16:16 +0200)
committerAndrzej Hajda <andrzej.hajda@intel.com>
Wed, 5 Apr 2023 10:27:03 +0000 (12:27 +0200)
commitaa7b93eb94ad6d883016bffda670e028fe168051
treebf3cb4805a9c02d6d605601c6684bcde6a12d203
parenta915450e0e44e9ed2a87fc5b3208d5ce01554a8a
drm/i915/gt: Hold a wakeref for the active VM

There may be a disconnect between the GT used by the engine and the GT
used for the VM, requiring us to hold a wakeref on both while the GPU is
active with this request.

v2: added explanation to __queue_and_release_pm

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[ahajda: removed not-yet-upstremed wakeref tracking bits]
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230330-hold_wakeref_for_active_vm-v2-1-724d201499c2@intel.com
drivers/gpu/drm/i915/gt/intel_context.h
drivers/gpu/drm/i915/gt/intel_engine_pm.c