Nothing should happen before than given that drm_fd will be set to -1.
Signed-off-by: Lionel Landwerlin <[email protected]>
---
tools/aubdump.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/aubdump.c b/tools/aubdump.c
index 6715a5d7..d53addc2 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -594,14 +594,13 @@ ioctl(int fd, unsigned long request, ...)
if (_IOC_TYPE(request) == DRM_IOCTL_BASE &&
drm_fd != fd && fstat(fd, &buf) == 0 &&
(buf.st_mode & S_IFMT) == S_IFCHR && major(buf.st_rdev) ==
DRM_MAJOR) {
+ maybe_init();
drm_fd = fd;
if (verbose)
printf("[intel_aubdump: intercept drm ioctl on fd
%d]\n", fd);
}
if (fd == drm_fd) {
- maybe_init();
-
switch (request) {
case DRM_IOCTL_I915_GETPARAM: {
struct drm_i915_getparam *getparam = argp;
--
2.11.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx