All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 1/2] aubdump: initialize on descriptor interception
Date: Sun, 29 Jan 2017 23:35:41 +0000	[thread overview]
Message-ID: <20170129233542.7246-1-lionel.g.landwerlin@intel.com> (raw)

Nothing should happen before than given that drm_fd will be set to -1.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-01-29 23:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-29 23:35 Lionel Landwerlin [this message]
2017-01-29 23:35 ` [PATCH i-g-t 2/2] aubdump: support new ioctl Lionel Landwerlin
2017-01-30 12:29   ` Petri Latvala
2017-01-30 12:41     ` Chris Wilson
2017-01-30 14:20     ` [PATCH v2 i-g-t] " Lionel Landwerlin
2017-01-30 14:37       ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170129233542.7246-1-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.