[RFC 10/11] drm/i915: Export engine stats API to other users

Tvrtko Ursulin
2017-09-11T15:26:16Z

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

Other kernel users might want to look at total GPU busyness
in order to implement things like package power distribution
algorithms more efficiently.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index f7dba176989c..e2152dd21b4a 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1495,6 +1495,7 @@ int intel_enable_engines_stats(struct drm_i915_private *dev_priv)

return ret;
}
+EXPORT_SYMBOL(intel_enable_engines_stats);

/**
* intel_disable_engines_stats() - Disable engine busy tracking on all engines
@@ -1510,6 +1511,7 @@ void intel_disable_engines_stats(struct drm_i915_private *dev_priv)
for_each_engine(engine, dev_priv, id)
intel_disable_engine_stats(engine);
}
+EXPORT_SYMBOL(intel_disable_engines_stats);

/**
* intel_engine_get_busy_time() - Return current accumulated engine busyness
@@ -1557,6 +1559,7 @@ ktime_t intel_engines_get_busy_time(struct drm_i915_private *dev_priv)

return total;
}
+EXPORT_SYMBOL(intel_engines_get_busy_time);

#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftests/mock_engine.c"
--
2.9.5