All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
@ 2018-09-09 12:43 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-09-09 12:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

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;
 
 	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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-gfx] [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
@ 2018-09-09 12:43 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-09-09 12:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

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;
 
 	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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for igt/gem_exec_capture: Fix command emission for gen3
  2018-09-09 12:43 ` [Intel-gfx] " Chris Wilson
  (?)
@ 2018-09-10  9:48 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-09-10  9:48 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/gem_exec_capture: Fix command emission for gen3
URL   : https://patchwork.freedesktop.org/series/49388/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4787 -> IGTPW_1815 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49388/revisions/1/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1815 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718


== Participating hosts (52 -> 47) ==

  Additional (1): fi-kbl-7560u 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-skl-6700hq 


== Build changes ==

    * IGT: IGT_4634 -> IGTPW_1815

  CI_DRM_4787: 6dc8457a2f2093eecb9c6cbb7306fd25bb1664e6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1815: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1815/
  IGT_4634: 7d89cc39dde3b4881d85ace45d504cc098fa3684 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1815/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
  2018-09-09 12:43 ` [Intel-gfx] " Chris Wilson
@ 2018-09-10 10:28   ` Chris Wilson
  -1 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-09-10 10:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2018-09-09 13:43:08)
> A missing no-op causing us to emit the wrong address when relocation was
> required for BB_START.
 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106078
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106028

> 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;
>  
>         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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
@ 2018-09-10 10:28   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-09-10 10:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2018-09-09 13:43:08)
> A missing no-op causing us to emit the wrong address when relocation was
> required for BB_START.
 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106078
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106028

> 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;
>  
>         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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
  2018-09-09 12:43 ` [Intel-gfx] " Chris Wilson
@ 2018-09-10 11:49   ` Joonas Lahtinen
  -1 siblings, 0 replies; 10+ messages in thread
From: Joonas Lahtinen @ 2018-09-10 11:49 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2018-09-09 15:43:08)
> 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)

"gen < 4" would be more consistent with the usual checks. One would
assume the evolution of the code to be that this if was added during
development of Gen4 when it's not needed anymore.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

>                 batch[++i] = MI_NOOP;
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
@ 2018-09-10 11:49   ` Joonas Lahtinen
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Lahtinen @ 2018-09-10 11:49 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2018-09-09 15:43:08)
> 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)

"gen < 4" would be more consistent with the usual checks. One would
assume the evolution of the code to be that this if was added during
development of Gen4 when it's not needed anymore.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

>                 batch[++i] = MI_NOOP;
>  
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for igt/gem_exec_capture: Fix command emission for gen3
  2018-09-09 12:43 ` [Intel-gfx] " Chris Wilson
                   ` (3 preceding siblings ...)
  (?)
@ 2018-09-10 11:54 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-09-10 11:54 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/gem_exec_capture: Fix command emission for gen3
URL   : https://patchwork.freedesktop.org/series/49388/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4634_full -> IGTPW_1815_full =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49388/revisions/1/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1815_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@forcewake:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103313)

    igt@gem_ctx_isolation@vecs0-s3:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@gem_exec_await@wide-contexts:
      shard-kbl:          PASS -> FAIL (fdo#106680)

    igt@gem_exec_big:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540)

    igt@kms_flip@flip-vs-wf_vblank-interruptible:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary:
      shard-glk:          PASS -> FAIL (fdo#103167)

    igt@kms_plane@pixel-format-pipe-a-planes:
      shard-snb:          PASS -> FAIL (fdo#107749)

    
    ==== Possible fixes ====

    igt@gem_caching@reads:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt:
      shard-glk:          FAIL (fdo#103167) -> PASS +1

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          FAIL (fdo#103925) -> PASS

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
  fdo#107749 https://bugs.freedesktop.org/show_bug.cgi?id=107749
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4634 -> IGTPW_1815
    * Linux: CI_DRM_4782 -> CI_DRM_4787

  CI_DRM_4782: 60edf94611d2374821fbe2a824cebcb425ce7b0d @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4787: 6dc8457a2f2093eecb9c6cbb7306fd25bb1664e6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1815: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1815/
  IGT_4634: 7d89cc39dde3b4881d85ace45d504cc098fa3684 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1815/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
  2018-09-09 12:43 ` [Intel-gfx] " Chris Wilson
@ 2018-09-10 12:39   ` Ville Syrjälä
  -1 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2018-09-10 12:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3
@ 2018-09-10 12:39   ` Ville Syrjälä
  0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2018-09-10 12:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-09-10 12:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-09 12:43 [PATCH i-g-t] igt/gem_exec_capture: Fix command emission for gen3 Chris Wilson
2018-09-09 12:43 ` [Intel-gfx] " Chris Wilson
2018-09-10  9:48 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-10 10:28 ` [PATCH i-g-t] " Chris Wilson
2018-09-10 10:28   ` [Intel-gfx] " Chris Wilson
2018-09-10 11:49 ` Joonas Lahtinen
2018-09-10 11:49   ` [igt-dev] [Intel-gfx] " Joonas Lahtinen
2018-09-10 11:54 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2018-09-10 12:39 ` [PATCH i-g-t] " Ville Syrjälä
2018-09-10 12:39   ` [Intel-gfx] " Ville Syrjälä

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.