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@chris-wilson.co.uk>
This commit is contained in:
parent
dea65e8be7
commit
5c7965f00f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue