summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2021-06-04 13:39:22 -0700
committerMatt Roper <matthew.d.roper@intel.com>2021-06-07 19:36:57 -0700
commitafaa6eee9d959c7e9be27f8c838b9019456e7e9f (patch)
treee843ce03540c76e0834c81079fdeed369738d574 /tools
parentadb9ee4ed7206725cfe3589bf49f47f9dcf661f2 (diff)
lib/i915: Split 'gen' into graphics version and display version
Going forward, platforms may have separate architecture versions for graphics and display and should no longer utilize a single 'gen' version. While doing this, let's change the versions to raw version values rather than BIT(v) as we were doing in the past. It looks like some of the existing uses of devinfo->gen were already misinterpreting this field and failing to pass the value through ffs(), so this change may also fix some bugs. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/i915-perf/i915_perf_configs.c2
-rw-r--r--tools/i915-perf/i915_perf_reader.c5
-rw-r--r--tools/i915-perf/i915_perf_recorder.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/tools/i915-perf/i915_perf_configs.c b/tools/i915-perf/i915_perf_configs.c
index 2a0283c9..bce3bd0f 100644
--- a/tools/i915-perf/i915_perf_configs.c
+++ b/tools/i915-perf/i915_perf_configs.c
@@ -228,7 +228,7 @@ main(int argc, char *argv[])
return EXIT_FAILURE;
}
- fprintf(stdout, "Device gen=%i gt=%i\n", devinfo->gen, devinfo->gt);
+ fprintf(stdout, "Device graphics_ver=%i gt=%i\n", devinfo->graphics_ver, devinfo->gt);
perf = intel_perf_for_fd(drm_fd);
if (!perf) {
diff --git a/tools/i915-perf/i915_perf_reader.c b/tools/i915-perf/i915_perf_reader.c
index 3e4a6530..e51f5a5d 100644
--- a/tools/i915-perf/i915_perf_reader.c
+++ b/tools/i915-perf/i915_perf_reader.c
@@ -220,8 +220,9 @@ main(int argc, char *argv[])
devinfo = intel_get_device_info(reader.devinfo.devid);
- fprintf(stdout, "Recorded on device=0x%x(%s) gen=%i\n",
- reader.devinfo.devid, devinfo->codename, reader.devinfo.gen);
+ fprintf(stdout, "Recorded on device=0x%x(%s) graphics_ver=%i\n",
+ reader.devinfo.devid, devinfo->codename,
+ reader.devinfo.graphics_ver);
fprintf(stdout, "Metric used : %s (%s) uuid=%s\n",
reader.metric_set->symbol_name, reader.metric_set->name,
reader.metric_set->hw_config_guid);
diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c
index 3a8ee46a..00195290 100644
--- a/tools/i915-perf/i915_perf_recorder.c
+++ b/tools/i915-perf/i915_perf_recorder.c
@@ -317,14 +317,14 @@ get_device_timestamp_frequency(const struct intel_device_info *devinfo, int drm_
if (perf_ioctl(drm_fd, DRM_IOCTL_I915_GETPARAM, &gp) == 0)
return timestamp_frequency;
- if (devinfo->gen > 9) {
+ if (devinfo->graphics_ver > 9) {
fprintf(stderr, "Unable to query timestamp frequency from i915, please update kernel.\n");
return 0;
}
fprintf(stderr, "Warning: unable to query timestamp frequency from i915, guessing values...\n");
- if (devinfo->gen <= 8)
+ if (devinfo->graphics_ver <= 8)
return 12500000;
if (devinfo->is_broxton)
return 19200000;
@@ -878,7 +878,7 @@ main(int argc, char *argv[])
}
fprintf(stdout, "Device name=%s gen=%i gt=%i id=0x%x\n",
- ctx.devinfo->codename, ctx.devinfo->gen, ctx.devinfo->gt, ctx.devid);
+ ctx.devinfo->codename, ctx.devinfo->graphics_ver, ctx.devinfo->gt, ctx.devid);
ctx.topology = get_topology(ctx.drm_fd, &ctx.topology_size);
if (!ctx.topology) {