From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, igt-dev@lists.freedesktop.org
Cc: chris.p.wilson@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t] test/prime_vgem: Remove test_userptr test
Date: Fri, 12 May 2023 10:57:33 +0200 [thread overview]
Message-ID: <f0bb9cf4-933c-9cc6-77db-2d8cb05f747a@intel.com> (raw)
In-Reply-To: <20230511152251.18043-1-nirmoy.das@intel.com>
On 11.05.2023 17:22, Nirmoy Das wrote:
> vgem objects are flagged with VM_PFNMAP which
> doesn't work with get_user_pages which is needed
> for userptr test.
>
> References: https://patchwork.freedesktop.org/patch/449741/
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Regards
Andrzej
> ---
> tests/prime_vgem.c | 49 ----------------------------------------------
> 1 file changed, 49 deletions(-)
>
> diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
> index 9aa767c9cd..dcf9e78d4b 100644
> --- a/tests/prime_vgem.c
> +++ b/tests/prime_vgem.c
> @@ -294,51 +294,6 @@ static void test_write(int vgem, int i915)
> munmap(ptr, scratch.size);
> }
>
> -static bool has_userptr(int i915)
> -{
> - uint32_t handle = 0;
> - void *ptr;
> -
> - igt_assert(posix_memalign(&ptr, 4096, 4096) == 0);
> - if (__gem_userptr(i915, ptr, 4096, 0, 0, &handle) == 0)
> - gem_close(i915, handle);
> - free(ptr);
> -
> - return handle;
> -}
> -
> -static void test_userptr(int vgem, int i915)
> -{
> - struct drm_i915_gem_exec_object2 obj = {};
> - struct drm_i915_gem_execbuffer2 execbuf = {
> - .buffers_ptr = to_user_pointer(&obj),
> - .buffer_count = 1,
> - };
> - struct vgem_bo scratch;
> - uint32_t *ptr;
> -
> - igt_require(has_userptr(i915));
> -
> - scratch.width = 1024;
> - scratch.height = 1024;
> - scratch.bpp = 32;
> - vgem_create(vgem, &scratch);
> -
> - /* vgem is acting as a simple provider of a single vma backed by pages */
> - ptr = vgem_mmap(vgem, &scratch, PROT_WRITE);
> - gem_close(vgem, scratch.handle);
> - *ptr = MI_BATCH_BUFFER_END;
> -
> - gem_userptr(i915, ptr, scratch.size, 0, 0, &obj.handle);
> - if (igt_has_set_caching(intel_get_drm_devid(i915)))
> - gem_set_caching(i915, obj.handle, I915_CACHING_NONE); /* for !llc exec */
> -
> - gem_execbuf(i915, &execbuf);
> - gem_close(i915, obj.handle);
> -
> - munmap(ptr, scratch.size);
> -}
> -
> static void test_gtt(int vgem, int i915)
> {
> struct vgem_bo scratch;
> @@ -1141,10 +1096,6 @@ igt_main
> igt_subtest("basic-write")
> test_write(vgem, i915);
>
> - igt_describe("Check that we wrap the vgem mmap with userptr.");
> - igt_subtest("basic-userptr")
> - test_userptr(vgem, i915);
> -
> igt_describe("Examine access path through GTT.");
> igt_subtest("basic-gtt") {
> gem_require_mappable_ggtt(i915);
prev parent reply other threads:[~2023-05-12 8:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 15:22 [igt-dev] [PATCH i-g-t] test/prime_vgem: Remove test_userptr test Nirmoy Das
2023-05-11 19:13 ` [igt-dev] ✗ GitLab.Pipeline: warning for test/prime_vgem: Remove test_userptr test (rev2) Patchwork
2023-05-11 19:38 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-05-12 9:13 ` Andrzej Hajda
2023-05-12 9:29 ` Das, Nirmoy
2023-05-12 2:15 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-12 8:57 ` Andrzej Hajda [this message]
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=f0bb9cf4-933c-9cc6-77db-2d8cb05f747a@intel.com \
--to=andrzej.hajda@intel.com \
--cc=chris.p.wilson@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nirmoy.das@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