Quoting Umesh Nerlige Ramappa (2020-07-30 01:48:24) > +void intel_engine_apply_oa_whitelist(struct intel_engine_cs *engine) > +{ > + struct i915_wa_list *w = &engine->whitelist; > + struct drm_i915_private *i915 = engine->i915; > + > + if (IS_GEN(i915, 12)) > + whitelist_build_perf_counters(w, gen12_oa_regs, > + ARRAY_SIZE(gen12_oa_regs)); > + else if (INTEL_GEN(i915) > 8) > + whitelist_build_perf_counters(w, gen9_oa_regs, > + ARRAY_SIZE(gen9_oa_regs)); > + else > + return; > + > + intel_engine_apply_whitelist(engine); > +} > + > +void intel_engine_remove_oa_whitelist(struct intel_engine_cs *engine) > +{ > + struct i915_wa_list *w = &engine->whitelist; > + struct drm_i915_private *i915 = engine->i915; > + > + if (IS_GEN(i915, 12)) > + whitelist_delete_perf_counters(w, gen12_oa_regs, > + ARRAY_SIZE(gen12_oa_regs)); > + else if (INTEL_GEN(i915) > 8) > + whitelist_delete_perf_counters(w, gen9_oa_regs, > + ARRAY_SIZE(gen9_oa_regs)); > + else > + return; Keep the oa_regs in i915_perf, and make this pair of functions that touch more generic by intel_engine_add_whitelist(engine, i915_reg_t *reg, size_t count); Hmm. The other can of worms would be to call it intel_engine_allow_user_register_access() intel_engine_deny_user_register_access() -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx