From: Tvrtko Ursulin Date: Tue, 23 Jan 2018 13:45:58 +0000 (+0000) Subject: drm/i915/pmu: Fix sysfs exported counter config X-Git-Tag: v4.17-rc1~185^2~27^2~74 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=8810bc5609117aad1dd01c1c8c4cd3847ec2fd3e;p=linux.git drm/i915/pmu: Fix sysfs exported counter config We need to generate the event config value using the uAPI class and not the driver internal one. Signed-off-by: Tvrtko Ursulin Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs") Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180123134558.3222-1-tvrtko.ursulin@linux.intel.com --- diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index 065a28c713c4..ecb0198bfb7a 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -843,7 +843,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));