Skip to content

intel/tools: Fix aub_file initialization in intel_dump_gpu

Caio Oliveira requested to merge cmarcelo/mesa:r/fix-intel-dump-gpu into master

The device can be set earlier either by a command line or a by intercepting an ioctl call to get the I915_PARAM_CHIPSET_ID done by the application early. In both cases aub_file and devinfo would not be initialized.

Fix by splitting the conditions

  • device == 0: use the FD to get both device and devinfo.
  • Or devinfo.gen == 0: use device to initialize it.

And separatedly, initialize aub_file the first time it is needed.

Fixes: d594d2a0 ("intel/tools: use device info initializer")

Merge request reports

Loading