From: Lionel Landwerlin Date: Fri, 6 Sep 2019 08:37:00 +0000 (+0300) Subject: intel/perf: report whether the platform supported X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93924ab0917b52be1a3001509b229c87b7ee6e54;p=mesa.git intel/perf: report whether the platform supported Signed-off-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/intel/perf/gen_perf.c b/src/intel/perf/gen_perf.c index 8c24344ed04..2dc63c5226f 100644 --- a/src/intel/perf/gen_perf.c +++ b/src/intel/perf/gen_perf.c @@ -662,6 +662,8 @@ load_oa_metrics(struct gen_perf_config *perf, int fd, } } + perf->platform_supported = oa_register != NULL; + if (!i915_perf_oa_available || !oa_register || !get_sysfs_dev_dir(perf, fd) || diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h index 3c6b9010bd7..c9c8a3042a8 100644 --- a/src/intel/perf/gen_perf.h +++ b/src/intel/perf/gen_perf.h @@ -25,6 +25,7 @@ #define GEN_PERF_H #include +#include #include #include @@ -267,6 +268,12 @@ struct gen_perf_config { */ struct hash_table *oa_metrics_table; + /* Whether we have support for this platform. If true && n_queries == 0, + * this means we will not be able to use i915-perf because of it is in + * paranoid mode. + */ + bool platform_supported; + /* Location of the device's sysfs entry. */ char sysfs_dev_dir[256];