diff options
author | Mark Janes <[email protected]> | 2019-08-05 14:40:29 -0700 |
---|---|---|
committer | Mark Janes <[email protected]> | 2019-08-07 21:33:55 -0700 |
commit | ea66484e8604edf75df9f95c9e94b73f1e80639d (patch) | |
tree | 1a1cfe3002258bbf806a76a351fc381885cf9f20 /src/intel/perf/gen_perf.c | |
parent | 07d3bd5c46f98df977e9f305d527e3b3a18ea850 (diff) |
intel/perf: use common ioctl wrapper
There were multiple ioctl-wrapper functions, so a common
implementation was put in gen_gem.h. With a common implementation,
perf no longer needs the caller to configure one for it.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/perf/gen_perf.c')
-rw-r--r-- | src/intel/perf/gen_perf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/intel/perf/gen_perf.c b/src/intel/perf/gen_perf.c index 758353956fc..9289accb91f 100644 --- a/src/intel/perf/gen_perf.c +++ b/src/intel/perf/gen_perf.c @@ -31,6 +31,7 @@ #include <drm-uapi/i915_drm.h> +#include "common/gen_gem.h" #include "gen_perf.h" #include "perf/gen_perf_metrics.h" @@ -214,8 +215,8 @@ kernel_has_dynamic_config_support(struct gen_perf_config *perf, int fd) { uint64_t invalid_config_id = UINT64_MAX; - return perf->ioctl(fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, - &invalid_config_id) < 0 && errno == ENOENT; + return gen_ioctl(fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, + &invalid_config_id) < 0 && errno == ENOENT; } bool @@ -259,7 +260,7 @@ init_oa_configs(struct gen_perf_config *perf, int fd) config.n_flex_regs = query->n_flex_regs; config.flex_regs_ptr = (uintptr_t) query->flex_regs; - ret = perf->ioctl(fd, DRM_IOCTL_I915_PERF_ADD_CONFIG, &config); + ret = gen_ioctl(fd, DRM_IOCTL_I915_PERF_ADD_CONFIG, &config); if (ret < 0) { DBG("Failed to load \"%s\" (%s) metrics set in kernel: %s\n", query->name, query->guid, strerror(errno)); |