From: Tvrtko Ursulin <tvrtko.ursulin@linux.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] i915/gem_exec_whipser: Pass early exit onto check_bo
Date: Mon, 14 Jan 2019 17:43:17 +0000 [thread overview]
Message-ID: <5a12c103-7aaf-26a9-52c8-fa5b8c8a88e3@linux.intel.com> (raw)
In-Reply-To: <20190114163432.28819-1-chris@chris-wilson.co.uk>
On 14/01/2019 16:34, Chris Wilson wrote:
> If we break out of the test loop early, we may not have filled all
> dwords, so be careful to only check as far as we completed.
>
> Fixes: d9cd03c887a5 ("i915/gem_exec_whisper: Limit to a maximum of 150s")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/i915/gem_exec_whisper.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/i915/gem_exec_whisper.c b/tests/i915/gem_exec_whisper.c
> index 277b678c4..0b15fe431 100644
> --- a/tests/i915/gem_exec_whisper.c
> +++ b/tests/i915/gem_exec_whisper.c
> @@ -52,15 +52,14 @@ static void write_seqno(int dir, unsigned offset)
> igt_debug("next seqno set to: 0x%x\n", seqno);
> }
>
> -static void check_bo(int fd, uint32_t handle)
> +static void check_bo(int fd, uint32_t handle, int pass)
> {
> uint32_t *map;
> - int i;
>
> igt_debug("Verifying result\n");
> map = gem_mmap__cpu(fd, handle, 0, 4096, PROT_READ);
> gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, 0);
> - for (i = 0; i < 1024; i++)
> + for (int i = 0; i < pass; i++)
> igt_assert_eq(map[i], i);
> munmap(map, 4096);
> }
> @@ -228,6 +227,8 @@ static void whisper(int fd, unsigned engine, unsigned flags)
>
> intel_detect_and_clear_missed_interrupts(fd);
> igt_fork(child, flags & FORKED ? sysconf(_SC_NPROCESSORS_ONLN) : 1) {
> + unsigned int pass;
> +
> memset(&scratch, 0, sizeof(scratch));
> scratch.handle = gem_create(fd, 4096);
> scratch.flags = EXEC_OBJECT_WRITE;
> @@ -323,8 +324,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
> }
>
> igt_while_interruptible(flags & INTERRUPTIBLE) {
> - unsigned int pass = 0;
> -
> + pass = 0;
> igt_until_timeout(150) {
> uint64_t offset;
>
> @@ -473,7 +473,7 @@ static void whisper(int fd, unsigned engine, unsigned flags)
> igt_info("Number of migrations for execbuf: %d\n", eb_migrations);
> igt_info("Number of migrations for reloc: %d, interrupted %d, patched %d\n", reloc_migrations, reloc_interruptions, relocations);
>
> - check_bo(fd, scratch.handle);
> + check_bo(fd, scratch.handle, pass);
> gem_close(fd, scratch.handle);
> gem_close(fd, store.handle);
>
>
Serves me right for reviewing purely from patch context.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-14 17:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 16:34 [igt-dev] [PATCH i-g-t] i915/gem_exec_whipser: Pass early exit onto check_bo Chris Wilson
2019-01-14 17:14 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-14 17:43 ` Tvrtko Ursulin [this message]
2019-01-14 17:45 ` [igt-dev] [Intel-gfx] [PATCH i-g-t] " Chris Wilson
2019-01-14 22:46 ` [igt-dev] ✓ Fi.CI.IGT: success for " 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=5a12c103-7aaf-26a9-52c8-fa5b8c8a88e3@linux.intel.com \
--to=tvrtko.ursulin@linux.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