Mesa (master): intel/aub_dump: stub the waits when overriding the device

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 25 19:19:28 UTC 2020


Module: Mesa
Branch: master
Commit: d4e7a11bc3e33baa311595602719bb449ce51d31
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4e7a11bc3e33baa311595602719bb449ce51d31

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Fri Oct 18 14:40:42 2019 +0300

intel/aub_dump: stub the waits when overriding the device

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 at intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli at 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 | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c
index 2e1941a18af..9dfa752f153 100644
--- a/src/intel/tools/intel_dump_gpu.c
+++ b/src/intel/tools/intel_dump_gpu.c
@@ -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);



More information about the mesa-commit mailing list