tools/intel_dev_info: Print hwconfig discrepancies

Previously we were printing this information whenever the driver
started, but that proved to noisy.

For example, if running thousands of tests, this would cause thousands
of warnings messages to be printed. (Assuming the driver was built in
debug mode.)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
This commit is contained in:
Jordan Justen 2025-03-26 20:05:50 -07:00
parent bc86fd5b1f
commit cdf95273e1
2 changed files with 3 additions and 7 deletions

View file

@ -168,13 +168,10 @@ static inline void
hwconfig_item_warning(const char *devinfo_name, uint32_t devinfo_val,
const uint32_t hwconfig_key, uint32_t hwconfig_val)
{
#ifndef NDEBUG
if (devinfo_val != hwconfig_val) {
mesa_logw("%s (%u) != devinfo->%s (%u)",
key_to_name(hwconfig_key), hwconfig_val, devinfo_name,
devinfo_val);
printf(" %s (%u) != devinfo->%s (%u)\n", key_to_name(hwconfig_key),
hwconfig_val, devinfo_name, devinfo_val);
}
#endif
}
static inline bool
@ -380,7 +377,6 @@ check_hwconfig_item(struct intel_device_info *devinfo,
void
intel_check_hwconfig_items(int fd, struct intel_device_info *devinfo)
{
#ifndef NDEBUG
struct hwconfig *data;
int32_t len = 0;
@ -389,5 +385,4 @@ intel_check_hwconfig_items(int fd, struct intel_device_info *devinfo)
process_hwconfig_table(devinfo, data, len, check_hwconfig_item);
free(data);
}
#endif
}

View file

@ -285,6 +285,7 @@ main(int argc, char *argv[])
print_base_devinfo(&devinfo);
print_regions_info(&devinfo);
intel_check_hwconfig_items(fd, &devinfo);
if (print_hwconfig)
intel_get_and_print_hwconfig_table(fd, &devinfo);
if (print_workarounds)