From: viswax.krishna.raveendra.talabattula@intel.com
To: igt-dev@lists.freedesktop.org,
tejaskumarx.surendrakumar.upadhyay@intel.com,
Mahesh.Meena@intel.com
Subject: [igt-dev] [Patch V2] [i-g-t] tests/i915: test pass for no caching case
Date: Thu, 20 May 2021 09:57:25 +0530 [thread overview]
Message-ID: <20210520042725.770003-1-viswax.krishna.raveendra.talabattula@intel.com> (raw)
From: Viswa Krishna Raveendra Talabattula <viswax.krishna.raveendra.talabattula@intel.com>
The userptr memory does not support I915_CACHING_NONE(no caching) level
as per the below commit related to i915 in the kernel
drm/i915: Reject more ioctls for userptr, v2.
So lets make test pass for both cases and return warning for 0 return
code
Signed-off-by: Viswa Krishna Raveendra Talabattula <viswax.krishna.raveendra.talabattula@intel.com>
---
tests/i915/gem_userptr_blits.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c
index aad5f141..2ac5713b 100644
--- a/tests/i915/gem_userptr_blits.c
+++ b/tests/i915/gem_userptr_blits.c
@@ -2032,15 +2032,24 @@ static void test_set_caching(int i915)
for (int idx = 0; idx < ARRAY_SIZE(levels); idx++) {
gem_userptr(i915, page, 4096, 0, 0, &handle);
- igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), 0);
+ if (__gem_set_caching(i915, handle, levels[idx]) == 0)
+ igt_warn("Deprecated return code 0 from __gem_set_caching\n");
+ else
+ igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), -ENXIO);
gem_close(i915, handle);
}
gem_userptr(i915, page, 4096, 0, 0, &handle);
for (int idx = 0; idx < ARRAY_SIZE(levels); idx++)
- igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), 0);
+ if (__gem_set_caching(i915, handle, levels[idx]) == 0)
+ igt_warn("Deprecated return code 0 from __gem_set_caching\n");
+ else
+ igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), -ENXIO);
for (int idx = 0; idx < ARRAY_SIZE(levels); idx++)
- igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), 0);
+ if (__gem_set_caching(i915, handle, levels[idx]) == 0)
+ igt_warn("Deprecated return code 0 from __gem_set_caching\n");
+ else
+ igt_assert_eq(__gem_set_caching(i915, handle, levels[idx]), -ENXIO);
gem_close(i915, handle);
munmap(page, 4096);
--
2.30.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2021-05-20 4:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 4:27 viswax.krishna.raveendra.talabattula [this message]
2021-05-20 4:58 ` [igt-dev] [Patch V2] [i-g-t] tests/i915: test pass for no caching case Dixit, Ashutosh
2021-05-20 6:04 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-21 12:08 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210520042725.770003-1-viswax.krishna.raveendra.talabattula@intel.com \
--to=viswax.krishna.raveendra.talabattula@intel.com \
--cc=Mahesh.Meena@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=tejaskumarx.surendrakumar.upadhyay@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.