summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni.dodonov@intel.com>2011-11-08 15:04:05 -0200
committerEugeni Dodonov <eugeni.dodonov@intel.com>2011-11-09 11:50:16 -0200
commit26d3015b56632173112209ddff7c69e82cae069c (patch)
treeb36fc00def72f0e9ed0d0ec34739bd58496dd138
parentb619e75fa00411d763cf6376e8a5b79b58bce796 (diff)
intel_gpu_top: disable reading from i915_emon_status for now
It crashes kernel :/ Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
-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");