intel/aub_dump: stub the waits when overriding the device
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 18 Oct 2019 11:40:42 +0000 (14:40 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 25 Feb 2020 18:56:49 +0000 (20:56 +0200)
We don't actually want to wait on anything, just complete submitting
the commands as fast as possible.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3705>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3705>

src/intel/tools/intel_dump_gpu.c

index 2e1941a18af8707de7eecf8d06734226df750724..9dfa752f153c1f7509a8a7ef77305e0ab5264e91 100644 (file)
@@ -448,6 +448,25 @@ ioctl(int fd, unsigned long request, ...)
       maybe_init(fd);
 
       switch (request) {
+      case DRM_IOCTL_SYNCOBJ_WAIT:
+      case DRM_IOCTL_I915_GEM_WAIT: {
+         if (device_override)
+            return 0;
+         return libc_ioctl(fd, request, argp);
+      }
+
+      case DRM_IOCTL_I915_GET_RESET_STATS: {
+         if (device_override) {
+            struct drm_i915_reset_stats *stats = argp;
+
+            stats->reset_count = 0;
+            stats->batch_active = 0;
+            stats->batch_pending = 0;
+            return 0;
+         }
+         return libc_ioctl(fd, request, argp);
+      }
+
       case DRM_IOCTL_I915_GETPARAM: {
          struct drm_i915_getparam *getparam = argp;
          return get_pci_id(fd, getparam->value);