drm/i915/pmu: "Frequency" is reported as accumulated cycles
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Nov 2019 10:53:56 +0000 (10:53 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Nov 2019 11:59:12 +0000 (11:59 +0000)
We report "frequencies" (actual-frequency, requested-frequency) as the
number of accumulated cycles so that the average frequency over that
period may be determined by the user. This means the units we report to
the user are Mcycles (or just M), not MHz.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191109105356.5273-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_pmu.c

index 4804775644bf1990dbd8c80c6e9d071551a42e6c..9b02be0ad4e6ae64bfb8358ba70aed50fa70451f 100644 (file)
@@ -908,8 +908,8 @@ create_event_attributes(struct i915_pmu *pmu)
                const char *name;
                const char *unit;
        } events[] = {
-               __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "MHz"),
-               __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "MHz"),
+               __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "M"),
+               __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "M"),
                __event(I915_PMU_INTERRUPTS, "interrupts", NULL),
                __event(I915_PMU_RC6_RESIDENCY, "rc6-residency", "ns"),
        };