]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Measure the energy consumed while in RC6
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Mar 2020 10:15:02 +0000 (10:15 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Mar 2020 11:33:05 +0000 (11:33 +0000)
commitf94b5939006abbeb1cb622afe7eb2e5444712f67
treed996f6bfa5efe192bfc00f7a2e804e966dd38992
parentc2a349e7b8e0b8dfc78d09a2e6ee8c2471f5de72
drm/i915/selftests: Measure the energy consumed while in RC6

Measure and compare the energy consumed, as reported by the rapl MSR,
by the GPU while in RC0 and RC6 states. Throw an error if RC6 does not
at least halve the energy consumption of RC0, as this more than likely
means we failed to enter RC0 correctly.

If we can't measure the energy draw with the MSR, then it will report 0
for both measurements. Since the measurement works on all gen6+, this seems
worth flagging as an error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200325101502.12591-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_rc6.c
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/i915/intel_uncore.h