summaryrefslogtreecommitdiff
path: root/tools/intel_gpu_top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/intel_gpu_top.c')
-rw-r--r--tools/intel_gpu_top.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index f047435..e815c42 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -157,6 +157,15 @@ get_cpu_stat(struct cpudata *cpu)
}
+/* Reading from /sys/kernel/debug/dri/0/i915_emon_status can cause a division by zero within kernel, at least as of 3.2-rc1.
+ *
+ * So disabling it for now.
+ *
+ * You can use the patch at http://lists.freedesktop.org/archives/intel-gfx/2011-November/013198.html or
+ * http://lists.freedesktop.org/archives/intel-gfx/2011-July/011380.html to fix it.
+ */
+
+#define USE_I915_EMON_STATUS 0
static char*
get_battery_file(char *battery)
{
@@ -204,7 +213,7 @@ get_power_stat(struct powerdata *power, const char *battery_file, char *debugfs,
power->watts *= elapsed_time;
/* Going deeper and reading GPU power */
- if (debugfs) {
+ if (debugfs && USE_I915_EMON_STATUS) {
char debugfs_entry[128];
long tmp;
sprintf(debugfs_entry, "%s%s", debugfs, "i915_emon_status");