From: Carl Worth Date: Mon, 13 Apr 2009 21:33:09 +0000 (-0700) Subject: intel_gpu_dump: Give a nicer message for missing batchbuffer-dumping code X-Git-Tag: 1.0~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b8c19445cdd736d679e12be196cd4db0aac0cb1;p=profile%2Fextras%2Fintel-gpu-tools.git 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. --- diff --git a/tools/intel_gpu_dump.c b/tools/intel_gpu_dump.c index 947617e..6304372 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);