From d4e3d455a12e9d7d151f35f86b688bdff5dcd076 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 17 Apr 2020 16:20:17 +0100 Subject: drm/i915/selftests: Move gpu energy measurement into its own little lib Move the handy utility to measure the GPU energy consumption using RAPL msr into a common lib so that it can be reused easily. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200417152018.13079-1-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/selftests/librapl.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 drivers/gpu/drm/i915/selftests/librapl.h (limited to 'drivers/gpu/drm/i915/selftests/librapl.h') diff --git a/drivers/gpu/drm/i915/selftests/librapl.h b/drivers/gpu/drm/i915/selftests/librapl.h new file mode 100644 index 000000000000..887f3e91dd05 --- /dev/null +++ b/drivers/gpu/drm/i915/selftests/librapl.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2020 Intel Corporation + */ + +#ifndef SELFTEST_LIBRAPL_H +#define SELFTEST_LIBRAPL_H + +#include + +u64 librapl_energy_uJ(void); + +#endif /* SELFTEST_LIBRAPL_H */ -- cgit