All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new
@ 2018-01-03 18:09 Chris Wilson
  2018-01-03 18:09 ` [PATCH igt 2/4] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Chris Wilson @ 2018-01-03 18:09 UTC (permalink / raw)
  To: intel-gfx

igt_spin_batch_new() includes a throttling check that GEM works, which
breaks trying to create multiple spin batches, use
__igt_spin_batch_new() instead, after verifying GEM works.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_busy.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/gem_busy.c b/tests/gem_busy.c
index 4ba232411..c349c2919 100644
--- a/tests/gem_busy.c
+++ b/tests/gem_busy.c
@@ -459,17 +459,17 @@ static void close_race(int fd)
 		igt_assert(sched_setscheduler(getpid(), SCHED_RR, &rt) == 0);
 
 		for (i = 0; i < nhandles; i++) {
-			spin[i] = igt_spin_batch_new(fd, 0,
-						     engines[rand() % nengine], 0);
+			spin[i] = __igt_spin_batch_new(fd, 0,
+						       engines[rand() % nengine], 0);
 			handles[i] = spin[i]->handle;
 		}
 
 		igt_until_timeout(20) {
 			for (i = 0; i < nhandles; i++) {
 				igt_spin_batch_free(fd, spin[i]);
-				spin[i] = igt_spin_batch_new(fd, 0,
-							     engines[rand() % nengine],
-							     0);
+				spin[i] = __igt_spin_batch_new(fd, 0,
+							       engines[rand() % nengine],
+							       0);
 				handles[i] = spin[i]->handle;
 				__sync_synchronize();
 			}
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH igt 2/4] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations
  2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
@ 2018-01-03 18:09 ` Chris Wilson
  2018-01-03 18:09 ` [PATCH igt 3/4] igt/kms_flip: Do igt_require_gem() just once Chris Wilson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-01-03 18:09 UTC (permalink / raw)
  To: intel-gfx

Each call to igt_spin_batch_new_fence will do a stalling check to verify
that GEM is functional before submitting the spinning batch. In a loop,
this means that we may end up waiting for our earlier spinning
batches...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/perf_pmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 85ce17394..45e2f6148 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -833,7 +833,8 @@ test_interrupts(int gem_fd)
 
 	/* Queue spinning batches. */
 	for (int i = 0; i < target; i++) {
-		spin[i] = igt_spin_batch_new_fence(gem_fd, 0, I915_EXEC_RENDER);
+		spin[i] = __igt_spin_batch_new_fence(gem_fd,
+						     0, I915_EXEC_RENDER);
 		if (i == 0) {
 			fence_fd = spin[i]->out_fence;
 		} else {
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH igt 3/4] igt/kms_flip: Do igt_require_gem() just once
  2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
  2018-01-03 18:09 ` [PATCH igt 2/4] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations Chris Wilson
@ 2018-01-03 18:09 ` Chris Wilson
  2018-01-03 18:09 ` [PATCH igt 4/4] lib/gem: Reset the global seqno at the start of each test Chris Wilson
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-01-03 18:09 UTC (permalink / raw)
  To: intel-gfx

Since igt_spin_batch_new() will do a stalling GEM check, it is not
advisable to use it within loops. Perform the igt_require_gem() upfront
and then use __igt_spin_batch_new() inside the test loop.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/kms_flip.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 39ee68d23..2899f20e6 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -692,15 +692,15 @@ static unsigned int run_test_step(struct test_output *o)
 		o->current_fb_id = !o->current_fb_id;
 
 	if (o->flags & TEST_WITH_DUMMY_BCS) {
-		spin_bcs = igt_spin_batch_new(drm_fd, 0, I915_EXEC_BLT,
-					      o->fb_info[o->current_fb_id].gem_handle);
+		spin_bcs = __igt_spin_batch_new(drm_fd, 0, I915_EXEC_BLT,
+						o->fb_info[o->current_fb_id].gem_handle);
 		igt_spin_batch_set_timeout(spin_bcs,
 					   NSEC_PER_SEC);
 	}
 
 	if (o->flags & TEST_WITH_DUMMY_RCS) {
-		spin_rcs = igt_spin_batch_new(drm_fd, 0, I915_EXEC_RENDER,
-					      o->fb_info[o->current_fb_id].gem_handle);
+		spin_rcs = __igt_spin_batch_new(drm_fd, 0, I915_EXEC_RENDER,
+						o->fb_info[o->current_fb_id].gem_handle);
 		igt_spin_batch_set_timeout(spin_rcs,
 					   NSEC_PER_SEC);
 	}
@@ -1099,6 +1099,9 @@ static unsigned event_loop(struct test_output *o, unsigned duration_ms)
 	igt_hang_t hang;
 	int count = 0;
 
+	if (o->flags & (TEST_WITH_DUMMY_BCS | TEST_WITH_DUMMY_RCS))
+		igt_require_gem(drm_fd);
+
 	memset(&hang, 0, sizeof(hang));
 	if (o->flags & TEST_HANG_ONCE)
 		hang = hang_gpu(drm_fd);
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH igt 4/4] lib/gem: Reset the global seqno at the start of each test
  2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
  2018-01-03 18:09 ` [PATCH igt 2/4] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations Chris Wilson
  2018-01-03 18:09 ` [PATCH igt 3/4] igt/kms_flip: Do igt_require_gem() just once Chris Wilson
@ 2018-01-03 18:09 ` Chris Wilson
  2018-01-03 18:52 ` ✓ Fi.CI.BAT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-01-03 18:09 UTC (permalink / raw)
  To: intel-gfx

When we require GEM, reset the global seqno. This gives each test a
clean slate to work with, and avoids left-over state from previous tests
impacting on the next. In particular, somes tests may be setting up long
sequence of stalling batches not expecting to hit a seqno wraparound
(leftover from, for example, gem_exec_whisper), causing long GPU hangs
and incompletes in CI if they do.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/ioctl_wrappers.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 118dcefe7..39e8469e3 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -52,6 +52,7 @@
 #include "intel_chipset.h"
 #include "intel_io.h"
 #include "igt_debugfs.h"
+#include "igt_sysfs.h"
 #include "config.h"
 
 #ifdef HAVE_VALGRIND
@@ -1411,7 +1412,8 @@ void igt_require_gem(int fd)
 
 	igt_require_intel(fd);
 
-	/* We only want to use the throttle-ioctl for its -EIO reporting
+	/*
+	 * We only want to use the throttle-ioctl for its -EIO reporting
 	 * of a wedged device, not for actually waiting on outstanding
 	 * requests! So create a new drm_file for the device that is clean.
 	 */
@@ -1419,6 +1421,18 @@ void igt_require_gem(int fd)
 	fd = open(path, O_RDWR);
 	igt_assert_lte(0, fd);
 
+	/*
+	 * Reset the global seqno at the start of each test. This ensures that
+	 * the test will not wrap unless it explicitly sets up seqno wrapping
+	 * itself, which avoids accidentally hanging when setting up long
+	 * sequences of batches.
+	 */
+	err = igt_debugfs_dir(fd);
+	if (err != -1) {
+		igt_sysfs_printf(err, "i915_next_seqno", "1");
+		close(err);
+	}
+
 	err = 0;
 	if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE))
 		err = -errno;
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new
  2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
                   ` (2 preceding siblings ...)
  2018-01-03 18:09 ` [PATCH igt 4/4] lib/gem: Reset the global seqno at the start of each test Chris Wilson
@ 2018-01-03 18:52 ` Patchwork
  2018-01-03 20:38 ` ✓ Fi.CI.IGT: " Patchwork
  2018-01-04 11:45 ` [PATCH igt 1/4] " Arkadiusz Hiler
  5 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-01-03 18:52 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new
URL   : https://patchwork.freedesktop.org/series/35951/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
58bd37d347d1369ecd272ff778057ee8004d6b15 kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.

with latest DRM-Tip kernel build CI_DRM_3595
d26e7804b83c drm-tip: 2018y-01m-03d-17h-48m-30s UTC integration manifest

No testlist changes.

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
        Subgroup basic-write-cpu:
                incomplete -> PASS       (fi-byt-j1900)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
        Subgroup psr_basic:
                pass       -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:422s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:371s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:489s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:276s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:480s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:482s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:471s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:459s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:519s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:392s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:402s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:419s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:445s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:418s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:467s
fi-kbl-7560u     total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  time:503s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:452s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:504s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:571s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:428s
fi-skl-6600u     total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  time:526s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:495s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:472s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:435s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:397s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-glk-dsi       total:288  pass:153  dwarn:1   dfail:4   fail:0   skip:130 time:283s

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new
  2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
                   ` (3 preceding siblings ...)
  2018-01-03 18:52 ` ✓ Fi.CI.BAT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Patchwork
@ 2018-01-03 20:38 ` Patchwork
  2018-01-04 11:45 ` [PATCH igt 1/4] " Arkadiusz Hiler
  5 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-01-03 20:38 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new
URL   : https://patchwork.freedesktop.org/series/35951/
State : success

== Summary ==

Warning: bzip CI_DRM_3595/shard-glkb2/results3.json.bz2 wasn't in correct JSON format
Test gem_tiled_swapping:
        Subgroup non-threaded:
                pass       -> INCOMPLETE (shard-hsw) fdo#104218
Test pm_rc6_residency:
        Subgroup rc6-accuracy:
                skip       -> PASS       (shard-snb)
Test kms_cursor_crc:
        Subgroup cursor-64x64-suspend:
                pass       -> SKIP       (shard-snb) fdo#102365
Test gem_softpin:
        Subgroup noreloc-s4:
                skip       -> FAIL       (shard-snb) fdo#103375 +1
Test perf:
        Subgroup polling:
                pass       -> FAIL       (shard-hsw) fdo#102252

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hsw        total:2573 pass:1457 dwarn:1   dfail:0   fail:10  skip:1104 time:8604s
shard-snb        total:2713 pass:1311 dwarn:1   dfail:0   fail:10  skip:1391 time:7833s
Blacklisted hosts:
shard-apl        total:2713 pass:1685 dwarn:1   dfail:1   fail:24  skip:1001 time:13462s
shard-kbl        total:2713 pass:1795 dwarn:7   dfail:0   fail:29  skip:882 time:10513s

== Logs ==

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

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

* Re: [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new
  2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
                   ` (4 preceding siblings ...)
  2018-01-03 20:38 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-01-04 11:45 ` Arkadiusz Hiler
  5 siblings, 0 replies; 7+ messages in thread
From: Arkadiusz Hiler @ 2018-01-04 11:45 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Wed, Jan 03, 2018 at 06:09:06PM +0000, Chris Wilson wrote:
> igt_spin_batch_new() includes a throttling check that GEM works, which
> breaks trying to create multiple spin batches, use
> __igt_spin_batch_new() instead, after verifying GEM works.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

on the whole series and pushed
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-01-04 11:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 18:09 [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Chris Wilson
2018-01-03 18:09 ` [PATCH igt 2/4] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations Chris Wilson
2018-01-03 18:09 ` [PATCH igt 3/4] igt/kms_flip: Do igt_require_gem() just once Chris Wilson
2018-01-03 18:09 ` [PATCH igt 4/4] lib/gem: Reset the global seqno at the start of each test Chris Wilson
2018-01-03 18:52 ` ✓ Fi.CI.BAT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new Patchwork
2018-01-03 20:38 ` ✓ Fi.CI.IGT: " Patchwork
2018-01-04 11:45 ` [PATCH igt 1/4] " Arkadiusz Hiler

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.