diff options
author | Priyanka Dandamudi <priyanka.dandamudi@intel.com> | 2021-10-22 16:01:50 +0530 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2021-11-02 09:58:12 +0000 |
commit | 5c3b8f7ad9a5cfe1f0e747d92da7910243cf287d (patch) | |
tree | cfebd80700cc6a5becf4ebc116cc04b9267db606 /tests/i915/gem_userptr_blits.c | |
parent | 963917a3565466832a3b2fc22e9285d34a0bf944 (diff) |
tests/i915/gem_userptr_blits: Update for discrete
The set_caching ioctl returns -ENODEV for discrete.
Update the relocations and set-cache-level subtest.
Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'tests/i915/gem_userptr_blits.c')
-rw-r--r-- | tests/i915/gem_userptr_blits.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c index 93e4b25b..3464db66 100644 --- a/tests/i915/gem_userptr_blits.c +++ b/tests/i915/gem_userptr_blits.c @@ -2064,7 +2064,9 @@ static void test_set_caching(int i915) for (int idx = 0; idx < ARRAY_SIZE(levels); idx++) { gem_userptr(i915, page, 4096, 0, 0, &handle); ret = __gem_set_caching(i915, handle, levels[idx]); - if (levels[idx] == I915_CACHING_NONE) { + if (gem_has_lmem(i915)) + igt_assert_eq(ret, -ENODEV); + else if (levels[idx] == I915_CACHING_NONE) { if(ret != 0) igt_assert_eq(ret, -ENXIO); else @@ -2078,7 +2080,9 @@ static void test_set_caching(int i915) gem_userptr(i915, page, 4096, 0, 0, &handle); for (int idx = 0; idx < ARRAY_SIZE(levels); idx++) { ret = __gem_set_caching(i915, handle, levels[idx]); - if (levels[idx] == I915_CACHING_NONE) { + if (gem_has_lmem(i915)) + igt_assert_eq(ret, -ENODEV); + else if (levels[idx] == I915_CACHING_NONE) { if (ret != 0) igt_assert_eq(ret, -ENXIO); } else { @@ -2087,7 +2091,9 @@ static void test_set_caching(int i915) } for (int idx = 0; idx < ARRAY_SIZE(levels); idx++) { ret = __gem_set_caching(i915, handle, levels[idx]); - if (levels[idx] == I915_CACHING_NONE) { + if (gem_has_lmem(i915)) + igt_assert_eq(ret, -ENODEV); + else if (levels[idx] == I915_CACHING_NONE) { if (ret != 0) igt_assert_eq(ret, -ENXIO); } else { |