From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t] i915/gem_mmap_gtt: Check that the initial pagefault is non-blocking Date: Mon, 18 Mar 2019 08:58:15 +0000 [thread overview] Message-ID: <20190318085815.21879-1-chris@chris-wilson.co.uk> (raw) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_mmap_gtt.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c index 107218864..fa25912bf 100644 --- a/tests/i915/gem_mmap_gtt.c +++ b/tests/i915/gem_mmap_gtt.c @@ -289,6 +289,39 @@ test_wc(int fd) 5*gtt_writes/256., 5*cpu_writes/256.); } +static int mmap_gtt_version(int i915) +{ + int val = 0; + struct drm_i915_getparam gp = { + gp.param = 40, /* MMAP_GTT_VERSION */ + gp.value = &val, + }; + + ioctl(i915, DRM_IOCTL_I915_GETPARAM, &gp); + return val; +} + +static void +test_pf_nonblock(int i915) +{ + igt_spin_t *spin; + uint32_t *ptr; + + //igt_require(mmap_gtt_version(i915) >= 3); + + spin = igt_spin_batch_new(i915); + + igt_set_timeout(1, "initial pagefaulting did not complete within 1s"); + + ptr = gem_mmap__gtt(i915, spin->handle, 4096, PROT_WRITE); + ptr[256] = 0; + munmap(ptr, 4096); + + igt_reset_timeout(); + + igt_spin_batch_free(i915, spin); +} + static void test_write_gtt(int fd) { @@ -962,6 +995,8 @@ igt_main test_write_cpu_read_gtt(fd); igt_subtest("basic-wc") test_wc(fd); + igt_subtest("pf-nonblock") + test_pf_nonblock(fd); igt_subtest("basic-small-bo") test_huge_bo(fd, -1, I915_TILING_NONE); -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t] i915/gem_mmap_gtt: Check that the initial pagefault is non-blocking Date: Mon, 18 Mar 2019 08:58:15 +0000 [thread overview] Message-ID: <20190318085815.21879-1-chris@chris-wilson.co.uk> (raw) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_mmap_gtt.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c index 107218864..fa25912bf 100644 --- a/tests/i915/gem_mmap_gtt.c +++ b/tests/i915/gem_mmap_gtt.c @@ -289,6 +289,39 @@ test_wc(int fd) 5*gtt_writes/256., 5*cpu_writes/256.); } +static int mmap_gtt_version(int i915) +{ + int val = 0; + struct drm_i915_getparam gp = { + gp.param = 40, /* MMAP_GTT_VERSION */ + gp.value = &val, + }; + + ioctl(i915, DRM_IOCTL_I915_GETPARAM, &gp); + return val; +} + +static void +test_pf_nonblock(int i915) +{ + igt_spin_t *spin; + uint32_t *ptr; + + //igt_require(mmap_gtt_version(i915) >= 3); + + spin = igt_spin_batch_new(i915); + + igt_set_timeout(1, "initial pagefaulting did not complete within 1s"); + + ptr = gem_mmap__gtt(i915, spin->handle, 4096, PROT_WRITE); + ptr[256] = 0; + munmap(ptr, 4096); + + igt_reset_timeout(); + + igt_spin_batch_free(i915, spin); +} + static void test_write_gtt(int fd) { @@ -962,6 +995,8 @@ igt_main test_write_cpu_read_gtt(fd); igt_subtest("basic-wc") test_wc(fd); + igt_subtest("pf-nonblock") + test_pf_nonblock(fd); igt_subtest("basic-small-bo") test_huge_bo(fd, -1, I915_TILING_NONE); -- 2.20.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-03-18 8:58 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-18 8:58 Chris Wilson [this message] 2019-03-18 8:58 ` [igt-dev] [PATCH i-g-t] i915/gem_mmap_gtt: Check that the initial pagefault is non-blocking Chris Wilson 2019-03-18 12:19 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-03-18 16:03 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork 2019-03-20 15:11 ` [igt-dev] [PATCH i-g-t] " Matthew Auld 2019-03-20 15:11 ` Matthew Auld
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=20190318085815.21879-1-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /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: linkBe 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.