intel/tools/dump_gpu: fix getparam values
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 28 Feb 2020 08:46:53 +0000 (10:46 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 2 Mar 2020 08:24:40 +0000 (08:24 +0000)
Don't return the pci_id for all params

Fixes: 76bf38eaf0b6 ("intel/tools/aub_dump: move aub file initialization to maybe_init()")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3994>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3994>

src/intel/tools/intel_dump_gpu.c

index 9dfa752..551477d 100644 (file)
@@ -469,7 +469,14 @@ ioctl(int fd, unsigned long request, ...)
 
       case DRM_IOCTL_I915_GETPARAM: {
          struct drm_i915_getparam *getparam = argp;
-         return get_pci_id(fd, getparam->value);
+
+         if (getparam->param == I915_PARAM_CHIPSET_ID)
+            return get_pci_id(fd, getparam->value);
+
+         if (device_override)
+            return -1;
+
+         return libc_ioctl(fd, request, argp);
       }
 
       case DRM_IOCTL_I915_GEM_EXECBUFFER: {