public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_sseu: Extend the mmapped parameters test
Date: Thu, 6 Feb 2020 07:55:43 -0800	[thread overview]
Message-ID: <e35a1725-55f7-2587-9131-5fdebc23cd84@intel.com> (raw)
In-Reply-To: <20200206100639.2386558-2-chris@chris-wilson.co.uk>



On 06/02/20 02:06, Chris Wilson wrote:
> The current implementation of the test only maps the arguments in gtt,
> but we have similar problems arising from any of our own custom
> pagefault handlers.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Antonio Argenziano <antonio.argenziano@intel.com>
> Cc: Dixit Ashutosh <ashutosh.dixit@intel.com>

For the series:

Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>

> ---
>   tests/i915/gem_ctx_sseu.c | 18 ++++++++++++------
>   1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_sseu.c b/tests/i915/gem_ctx_sseu.c
> index 38dc584bc..d558c8baa 100644
> --- a/tests/i915/gem_ctx_sseu.c
> +++ b/tests/i915/gem_ctx_sseu.c
> @@ -364,7 +364,7 @@ test_invalid_args(int fd)
>    * Verify that ggtt mapped area can be used as the sseu pointer.
>    */
>   static void
> -test_ggtt_args(int fd)
> +test_mmapped_args(int fd, const struct mmap_offset *t)
>   {
>   	struct drm_i915_gem_context_param_sseu *sseu;
>   	struct drm_i915_gem_context_param arg = {
> @@ -372,17 +372,19 @@ test_ggtt_args(int fd)
>   		.ctx_id = gem_context_create(fd),
>   		.size = sizeof(*sseu),
>   	};
> +	void *ptr;
>   	uint32_t bo;
>   
>   	bo = gem_create(fd, 4096);
> -	arg.value = to_user_pointer(gem_mmap__gtt(fd, bo, 4096,
> -						  PROT_READ | PROT_WRITE));
> +	ptr = __gem_mmap_offset(fd, bo, 0, 4096, PROT_WRITE, t->type);
> +	gem_close(fd, bo);
> +	igt_require(ptr);
>   
> +	arg.value = to_user_pointer(ptr);
>   	igt_assert_eq(__gem_context_get_param(fd, &arg), 0);
>   	igt_assert_eq(__gem_context_set_param(fd, &arg), 0);
>   
>   	munmap((void *)(uintptr_t)arg.value, 4096);
> -	gem_close(fd, bo);
>   	gem_context_destroy(fd, arg.ctx_id);
>   }
>   
> @@ -528,8 +530,12 @@ igt_main
>   		igt_subtest("invalid-sseu")
>   			test_invalid_sseu(fd);
>   
> -		igt_subtest("ggtt-args")
> -			test_ggtt_args(fd);
> +		igt_subtest_with_dynamic("mmap-args") {
> +			for_each_mmap_offset_type(t) {
> +				igt_dynamic_f("%s", t->name)
> +					test_mmapped_args(fd, t);
> +			}
> +		}
>   
>   		igt_subtest("engines")
>   			test_engines(fd);
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-06 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 10:06 [igt-dev] [PATCH i-g-t 1/2] lib/i915: for_each_mmap_offset_type() Chris Wilson
2020-02-06 10:06 ` [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_sseu: Extend the mmapped parameters test Chris Wilson
2020-02-06 15:55   ` Antonio Argenziano [this message]
2020-02-06 10:37 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/i915: for_each_mmap_offset_type() Patchwork
2020-02-06 15:59 ` [igt-dev] ✗ GitLab.Pipeline: failure " Patchwork
2020-02-09  2:04 ` [igt-dev] ✗ Fi.CI.IGT: " 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=e35a1725-55f7-2587-9131-5fdebc23cd84@intel.com \
    --to=antonio.argenziano@intel.com \
    --cc=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: 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