summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@intel.com>2016-07-13 15:54:18 +0300
committerMika Kuoppala <mika.kuoppala@intel.com>2016-07-15 15:47:43 +0300
commitee5d5c47c44183f3ab7d6493c0e7c41556e34e73 (patch)
tree27bd41c3b8d169cdad2bdb873f4fa723d4c5f5fb /tests
parent90be05d74b0b5db64442848af530a88ffb4569ae (diff)
tests/gem_workarounds: rename read to basic-read for CI
This is very quick test (<0.01s) and ensures that the basic support is in place. And also reminds to tackle the workarounds in early phases for platform enabling. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_workarounds.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
index e419e8b9..af993b0c 100644
--- a/tests/gem_workarounds.c
+++ b/tests/gem_workarounds.c
@@ -122,6 +122,8 @@ static void check_workarounds(enum operation op)
igt_main
{
igt_fixture {
+ int fd = drm_open_driver_master(DRIVER_INTEL);
+ const int gen = intel_gen(intel_get_drm_devid(fd));
struct pci_device *pci_dev;
FILE *file;
char *line = NULL;
@@ -138,11 +140,12 @@ igt_main
igt_debug("i915_wa_registers: %s", line);
sscanf(line, "Workarounds applied: %d", &num_wa_regs);
- if (IS_BROADWELL(pci_dev->device_id) ||
- IS_CHERRYVIEW(pci_dev->device_id))
- igt_assert(num_wa_regs > 0);
+ /* For newer gens, the lri wa list has always something.
+ * If it doesn't, go and add one. */
+ if (gen >= 8)
+ igt_assert_lt(0, num_wa_regs);
else
- igt_assert(num_wa_regs >= 0);
+ igt_assert_lte(0, num_wa_regs);
wa_regs = malloc(num_wa_regs * sizeof(*wa_regs));
igt_assert(wa_regs);
@@ -162,7 +165,7 @@ igt_main
fclose(file);
}
- igt_subtest("read")
+ igt_subtest("basic-read")
check_workarounds(SIMPLE_READ);
igt_subtest("reset")