intel/dump_gpu: handle context create extended ioctl
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 25 Oct 2019 10:52:47 +0000 (13:52 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Oct 2019 19:58:31 +0000 (21:58 +0200)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/tools/intel_dump_gpu.c

index db80fd4ada738e483d707db73bb9ad067e1e12d2..198eb9891fddf038300faed3bb598e98a7ca2278 100644 (file)
@@ -492,6 +492,21 @@ ioctl(int fd, unsigned long request, ...)
          return ret;
       }
 
+      case DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT: {
+         uint32_t *ctx_id = NULL;
+         struct drm_i915_gem_context_create_ext *create = argp;
+         ret = 0;
+         if (!device_override) {
+            ret = libc_ioctl(fd, request, argp);
+            ctx_id = &create->ctx_id;
+         }
+
+         if (ret == 0)
+            create->ctx_id = dump_create_context(fd, ctx_id);
+
+         return ret;
+      }
+
       case DRM_IOCTL_I915_GEM_CREATE: {
          struct drm_i915_gem_create *create = argp;