From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
Date: Mon, 10 Sep 2018 15:39:39 +0300 [thread overview]
Message-ID: <20180910123939.GP5565@intel.com> (raw)
In-Reply-To: <20180909124308.24391-1-chris@chris-wilson.co.uk>
On Sun, Sep 09, 2018 at 01:43:08PM +0100, Chris Wilson wrote:
> A missing no-op causing us to emit the wrong address when relocation was
> required for BB_START.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/gem_exec_capture.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/gem_exec_capture.c b/tests/gem_exec_capture.c
> index 2dc06ce43..9c26e12c9 100644
> --- a/tests/gem_exec_capture.c
> +++ b/tests/gem_exec_capture.c
> @@ -117,7 +117,7 @@ static void __capture(int fd, int dir, unsigned ring, uint32_t target)
> batch[++i] = 0;
> }
> batch[++i] = 0xc0ffee;
> - if (gen < 3)
> + if (gen <= 3)
> batch[++i] = MI_NOOP;
This code is rather well obfuscated. Removing the length from
MI_STORE_DWORD_IMM and just setting it correctly in each branch
would go a long way towards making things more obvious.
>
> batch[++i] = MI_BATCH_BUFFER_START; /* not crashed? try again! */
> @@ -144,10 +144,12 @@ static void __capture(int fd, int dir, unsigned ring, uint32_t target)
> execbuf.flags = ring;
> if (gen > 3 && gen < 6)
> execbuf.flags |= I915_EXEC_SECURE;
> +
> + igt_assert(!READ_ONCE(*seqno));
> gem_execbuf(fd, &execbuf);
>
> /* Wait for the request to start */
> - while (*(volatile uint32_t *)seqno != 0xc0ffee)
> + while (READ_ONCE(*seqno) != 0xc0ffee)
> igt_assert(gem_bo_busy(fd, obj[SCRATCH].handle));
> munmap(seqno, 4096);
>
> --
> 2.19.0.rc2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
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: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
Date: Mon, 10 Sep 2018 15:39:39 +0300 [thread overview]
Message-ID: <20180910123939.GP5565@intel.com> (raw)
In-Reply-To: <20180909124308.24391-1-chris@chris-wilson.co.uk>
On Sun, Sep 09, 2018 at 01:43:08PM +0100, Chris Wilson wrote:
> A missing no-op causing us to emit the wrong address when relocation was
> required for BB_START.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tests/gem_exec_capture.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/gem_exec_capture.c b/tests/gem_exec_capture.c
> index 2dc06ce43..9c26e12c9 100644
> --- a/tests/gem_exec_capture.c
> +++ b/tests/gem_exec_capture.c
> @@ -117,7 +117,7 @@ static void __capture(int fd, int dir, unsigned ring, uint32_t target)
> batch[++i] = 0;
> }
> batch[++i] = 0xc0ffee;
> - if (gen < 3)
> + if (gen <= 3)
> batch[++i] = MI_NOOP;
This code is rather well obfuscated. Removing the length from
MI_STORE_DWORD_IMM and just setting it correctly in each branch
would go a long way towards making things more obvious.
>
> batch[++i] = MI_BATCH_BUFFER_START; /* not crashed? try again! */
> @@ -144,10 +144,12 @@ static void __capture(int fd, int dir, unsigned ring, uint32_t target)
> execbuf.flags = ring;
> if (gen > 3 && gen < 6)
> execbuf.flags |= I915_EXEC_SECURE;
> +
> + igt_assert(!READ_ONCE(*seqno));
> gem_execbuf(fd, &execbuf);
>
> /* Wait for the request to start */
> - while (*(volatile uint32_t *)seqno != 0xc0ffee)
> + while (READ_ONCE(*seqno) != 0xc0ffee)
> igt_assert(gem_bo_busy(fd, obj[SCRATCH].handle));
> munmap(seqno, 4096);
>
> --
> 2.19.0.rc2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-09-10 12:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-09 12:43 [Intel-gfx] [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3 Chris Wilson
2018-09-09 12:43 ` Chris Wilson
2018-09-10 9:48 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-10 10:28 ` [Intel-gfx] [PATCH i-g-t] " Chris Wilson
2018-09-10 10:28 ` Chris Wilson
2018-09-10 11:49 ` [igt-dev] [Intel-gfx] " Joonas Lahtinen
2018-09-10 11:49 ` Joonas Lahtinen
2018-09-10 11:54 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2018-09-10 12:39 ` Ville Syrjälä [this message]
2018-09-10 12:39 ` [PATCH i-g-t] " Ville Syrjälä
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=20180910123939.GP5565@intel.com \
--to=ville.syrjala@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 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.