xf86-video-intel: src/intel_device.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Aug 8 23:38:53 PDT 2014
src/intel_device.c | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 5c7965f00f85fbe3af69029d3fd1e5e2e079f159
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Aug 9 07:37:58 2014 +0100
intel: If need be, try mounting debugfs
If we require debugging information from debugfs and we cannot find it,
silently mount it and dump the information we need.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/intel_device.c b/src/intel_device.c
index 11d95be..27715c4 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/mount.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
@@ -141,6 +142,13 @@ static void dump_debugfs(ScrnInfoPtr scrn, int fd, const char *name)
sprintf(path, "/debug/dri/%d/%s", minor, name);
if (dump_file(scrn, path))
return;
+
+ if (mount("X-debug", "/sys/kernel/debug", "debugfs", 0, 0) == 0) {
+ sprintf(path, "/sys/kernel/debug/dri/%d/%s", minor, name);
+ dump_file(scrn, path);
+ umount("X-debug");
+ return;
+ }
}
static void dump_clients_info(ScrnInfoPtr scrn, int fd)
More information about the xorg-commit
mailing list