drm/i915/pmu: Atomically acquire the gt_pm wakeref
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 1 Aug 2019 23:36:16 +0000 (00:36 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 2 Aug 2019 07:08:20 +0000 (08:08 +0100)
commit51fbd8de87dcf09f3929e5438e4344bea4338990
tree1f3c7aa0c195b022d092bc3caf9f7a4a7278e34c
parent518ea582cb6e74af54c3b9c38b3183fbf1937d11
drm/i915/pmu: Atomically acquire the gt_pm wakeref

Currently, we only sample if the intel_gt is awake, but we acquire our
own runtime_pm wakeref. Since intel_gt has transitioned to tracking its
own wakeref, we can atomically test and acquire that wakeref instead.

v2: Take engine->wakeref for engine sampling

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/20190801233616.23007-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_gt_pm.h
drivers/gpu/drm/i915/i915_pmu.c