summaryrefslogtreecommitdiff
path: root/overlay/power.c
AgeCommit message (Collapse)Author
2017-11-22intel-gpu-overlay: Use RAPL PMU for power readingTvrtko Ursulin
Wire up to the RAPL PMU for GPU energy readings. The only complication is that we have to add code to parse: # cat /sys/devices/power/events/energy-gpu.scale 2.3283064365386962890625e-10 v2: Link with -lm. v3: strtod can handle scientific notation, even though my initial reading of the man page did not spot that. (Chris Wilson) v4: Meson fix. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Catch-up to new i915 PMUTvrtko Ursulin
v2: Update for i915 changes. v3: Use 1eN for large numbers. (Chris Wilson) v4: Update for upstream engine class enum. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Consolidate perf PMU access to libraryTvrtko Ursulin
Various tool modules implement their owm PMU open wrapper which can be replaced by calling the library one. v2: * Remove extra newline. (Chris Wilson) * Commit msg. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Move local perf implementation to a libraryTvrtko Ursulin
Idea is to avoid duplication across multiple users in upcoming patches. v2: Commit message and use a separate library instead of piggy- backing to libintel_tools. (Chris Wilson) v3: Add Petri's meson build recipe. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-18overlay: Show power consumption without i915-pmuChris Wilson
The power metter was not showing up due to an erroneous check for a failure to open the i915 perf interface. Reported-by: Marius Vlad <marius.c.vlad@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27overlay: Read power from perf_eventsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23overlay: Fix power reading from debugfsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23overlay: Distinguish the root debugfs path and our dri nodeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23overlay: Search for right debugfs pathChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20overlay: Add copyright statementsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20overlay: Sample power every secondChris Wilson
Found the bug, but still only read the msr once every second - mainly as an exercise in handling different sample rates. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20overlay: Fix counting failChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20overlay: Add graph for GPU power consumptionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>