intel/perf: report whether the platform supported

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2775>
This commit is contained in:
Lionel Landwerlin
2019-09-06 11:37:00 +03:00
parent fe8e8e5099
commit 93924ab091
2 changed files with 9 additions and 0 deletions

View File

@@ -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) ||

View File

@@ -25,6 +25,7 @@
#define GEN_PERF_H
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
@@ -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];