summaryrefslogtreecommitdiff
path: root/tools/aubdump.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@cryptic-dragon.jf.intel.com>2015-08-07 14:57:19 -0700
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>2015-08-07 15:00:32 -0700
commit9c15167c611bbac1e702eb064044ec687bfa3703 (patch)
tree7bb3ffbc0a2c55cdc17e1d2740733052d7936a57 /tools/aubdump.c
parent5f4fad31829b1c6dfcddb633d65e9e7066818cff (diff)
tools/aubdump: Get PCI ID from getparam ioctl when we can
Instead of doing an extra getparam ioctl to discover the PCI ID, we can snoop it when the application queries it. Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
Diffstat (limited to 'tools/aubdump.c')
-rw-r--r--tools/aubdump.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/aubdump.c b/tools/aubdump.c
index 6501ee02..73334a30 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -428,7 +428,17 @@ ioctl(int fd, unsigned long request, ...)
*getparam->value = device;
return 0;
}
- return libc_ioctl(fd, request, argp);
+
+ ret = libc_ioctl(fd, request, argp);
+
+ /* If the application looks up chipset_id
+ * (they typically do), we'll piggy-back on
+ * their ioctl and store the id for later
+ * use. */
+ if (getparam->param == I915_PARAM_CHIPSET_ID)
+ device = *getparam->value;
+
+ return ret;
}
case DRM_IOCTL_I915_GEM_EXECBUFFER: {