summaryrefslogtreecommitdiff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/i915/gem_exec_store.c4
-rw-r--r--tests/i915/i915_pciid.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/i915/gem_exec_store.c b/tests/i915/gem_exec_store.c
index 99ffc9ab..2df0b27f 100644
--- a/tests/i915/gem_exec_store.c
+++ b/tests/i915/gem_exec_store.c
@@ -310,7 +310,7 @@ static int print_welcome(int fd)
int err;
igt_info("Running on %s (pci-id %04x, gen %d)\n",
- info->codename, devid, ffs(info->gen));
+ info->codename, devid, info->graphics_ver);
igt_info("Can use MI_STORE_DWORD(virtual)? %s\n",
gem_can_store_dword(fd, 0) ? "yes" : "no");
@@ -320,7 +320,7 @@ static int print_welcome(int fd)
igt_info("GPU operation? %s [errno=%d]\n",
err == 0 ? "yes" : "no", err);
- return ffs(info->gen);
+ return info->graphics_ver;
}
#define test_each_engine(T, i915, e) \
diff --git a/tests/i915/i915_pciid.c b/tests/i915/i915_pciid.c
index fe4db405..7de44ff2 100644
--- a/tests/i915/i915_pciid.c
+++ b/tests/i915/i915_pciid.c
@@ -49,13 +49,13 @@ static bool has_known_intel_chipset(int fd)
return false;
}
- if (!info->gen) {
+ if (!info->graphics_ver) {
igt_warn("Unknown PCI-ID: %04x\n", devid);
return false;
}
igt_info("PCI-ID: %#04x, gen %d, %s\n",
- devid, ffs(info->gen), info->codename);
+ devid, info->graphics_ver, info->codename);
return true;
}