drm/i915/gt: Track the overall awake/busy time
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 Dec 2020 15:44:56 +0000 (15:44 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 17 Dec 2020 22:26:38 +0000 (22:26 +0000)
commit8c3b1ba0e7ea9a80b0ee4b4445ea59c806787813
treeaf373b01f89b42bac5795f29ec4c1b57b1ee9662
parente3ed90b8227eaf7d67ea0a2e81af9a09c71c8e8d
drm/i915/gt: Track the overall awake/busy time

Since we wake the GT up before executing a request, and go to sleep as
soon as it is retired, the GT wake time not only represents how long the
device is powered up, but also provides a summary, albeit an overestimate,
of the device runtime (i.e. the rc0 time to compare against rc6 time).

v2: s/busy/awake/
v3: software-gt-awake-time and I915_PMU_SOFTWARE_GT_AWAKE_TIME

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reported-by: kernel test robot <oliver.sang@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154456.13954-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
drivers/gpu/drm/i915/gt/intel_gt_pm.c
drivers/gpu/drm/i915/gt/intel_gt_pm.h
drivers/gpu/drm/i915/gt/intel_gt_types.h
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_pmu.c
include/uapi/drm/i915_drm.h