summaryrefslogtreecommitdiff
path: root/tests/i915/gem_ctx_sseu.c
diff options
context:
space:
mode:
authorJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>2020-02-21 12:17:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-02-24 14:11:15 +0000
commit384e7ecb7464eb8ffb802909ba0cd32157c140bd (patch)
treeb05a48977bbc237917321ad3d1649153e2911f6e /tests/i915/gem_ctx_sseu.c
parent9d7d9d0455409d0e562ca7ffdf206c7646c50e58 (diff)
lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support
Commit b0da8bb705c0 ("lib/i915: for_each_mmap_offset_type()") introduced a macro that makes it easy to repeat a test body within a loop for each mmap-offset mapping type supported by v4 of i915 MMAP_GTT API. However, when run on an older version of the driver, those subtests are believed to be still repeated for each known mmap-offset mapping type while effectively exercising GTT mapping type only. As that may be confusing, fix it. It has been assumed that the modified macro is still suitable for use inside gem_mmap_offset test itself. Would that not be case, gem_mmap_offset could redefine the macro back to its initial form for internal use. v2: Move extra condition to a separate function and call it via for_each_if(), in case we need to fix it again in future (Chris) v3: Fix blind copy-paste Suggested-by: MichaƂ Winiarski <michal.winiarski@intel.com> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_ctx_sseu.c')
-rw-r--r--tests/i915/gem_ctx_sseu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/gem_ctx_sseu.c b/tests/i915/gem_ctx_sseu.c
index d558c8ba..3bef11b5 100644
--- a/tests/i915/gem_ctx_sseu.c
+++ b/tests/i915/gem_ctx_sseu.c
@@ -531,7 +531,7 @@ igt_main
test_invalid_sseu(fd);
igt_subtest_with_dynamic("mmap-args") {
- for_each_mmap_offset_type(t) {
+ for_each_mmap_offset_type(fd, t) {
igt_dynamic_f("%s", t->name)
test_mmapped_args(fd, t);
}