summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-04-13 14:33:09 -0700
committerCarl Worth <cworth@cworth.org>2009-04-13 14:33:09 -0700
commit5b8c19445cdd736d679e12be196cd4db0aac0cb1 (patch)
treeed640e97ea135937c066f90b79aa98fdb1417e6a /tools
parent0a820610ee733f348f9331c677f74cc88bc46486 (diff)
intel_gpu_dump: Give a nicer message for missing batchbuffer-dumping code
This is the case where debugfs is mounted, the dri/0 directory exists but there's no i915_ringbuffer_info file. Point the user toward upgrading the driver.
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_gpu_dump.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/intel_gpu_dump.c b/tools/intel_gpu_dump.c
index 947617e1..6304372e 100644
--- a/tools/intel_gpu_dump.c
+++ b/tools/intel_gpu_dump.c
@@ -1974,6 +1974,19 @@ main (int argc, char *argv[])
uint32_t ring_head, ring_tail, acthd;
sprintf(filename, "%s/i915_ringbuffer_info", path);
+
+ err = stat(filename, &st);
+ if (err != 0) {
+ fprintf (stderr,
+ "Error opening %s: %s\n\n"
+ "Perhaps your i915 kernel driver has no support for "
+ "dumping batchbuffer data?\n"
+ "(In kernels prior to 2.6.30 this requires "
+ "manually-applied patches.)\n",
+ path, strerror (errno));
+ exit (1);
+ }
+
parse_ringbuffer_info(filename, &ring_head, &ring_tail, &acthd);
sprintf(filename, "%s/i915_batchbuffers", path);