From: Ramalingam C <ramalingam.c@intel.com>
To: igt-dev@lists.freedesktop.org, tvrtko.ursulin@linux.intel.com
Subject: [igt-dev] [PATCH i-g-t] tests/i915/gem_mmap: test for non pagealingned mmaps
Date: Mon, 8 Apr 2019 21:20:38 +0530 [thread overview]
Message-ID: <20190408155038.2389-1-ramalingam.c@intel.com> (raw)
Kernel supports the non page aligned mmaps. Hence this new subtest
helps to maintain the sanity of such support.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
tests/i915/gem_mmap.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/i915/gem_mmap.c b/tests/i915/gem_mmap.c
index 1f5348d9133b..f66d8b896268 100644
--- a/tests/i915/gem_mmap.c
+++ b/tests/i915/gem_mmap.c
@@ -228,6 +228,21 @@ igt_main
}
}
+ igt_subtest("page_nonaligned") {
+ struct drm_i915_gem_mmap arg = {
+ .handle = gem_create(fd, PAGE_SIZE),
+ .size = PAGE_SIZE - 5,
+ .flags = I915_MMAP_WC,
+ };
+
+ igt_debug("Trying to mmap page nonaligned size : %'"PRIu64"\n",
+ (unsigned long)arg.size);
+ igt_assert_eq(mmap_ioctl(fd, &arg), 0);
+
+ gem_close(fd, arg.handle);
+ munmap(from_user_pointer(arg.addr_ptr), PAGE_SIZE - 5);
+ }
+
igt_subtest("basic") {
struct drm_i915_gem_mmap arg = {
.handle = gem_create(fd, OBJECT_SIZE),
--
2.19.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-04-08 15:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 15:50 Ramalingam C [this message]
2019-04-08 15:52 ` [igt-dev] [PATCH i-g-t] tests/i915/gem_mmap: test for non pagealingned mmaps Chris Wilson
2019-04-08 16:01 ` C, Ramalingam
2019-04-08 16:01 ` Tvrtko Ursulin
2019-04-08 16:10 ` Chris Wilson
2019-04-08 16:18 ` Tvrtko Ursulin
2019-04-08 17:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-08 20:11 ` [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=20190408155038.2389-1-ramalingam.c@intel.com \
--to=ramalingam.c@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox