[Intel-gfx] [PATCH] drm/i915/pmu: Fix sysfs exported counter config

Tvrtko Ursulin tursulin at ursulin.net
Tue Jan 23 13:45:58 UTC 2018


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

We need to generate the event config value using the uAPI class and not
the driver internal one.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs")
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula at linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 86d9b9fb6aef..f380d8896a63 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -906,7 +906,7 @@ create_event_attributes(struct drm_i915_private *i915)
 			*attr_iter++ = &i915_iter->attr.attr;
 			i915_iter =
 				add_i915_attr(i915_iter, str,
-					      __I915_PMU_ENGINE(engine->class,
+					      __I915_PMU_ENGINE(engine->uabi_class,
 								engine->instance,
 								engine_events[i].sample));
 
-- 
2.14.1



More information about the Intel-gfx mailing list