All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] igt/pm_rps: Always allocate spin[0]
@ 2017-12-11 12:37 Chris Wilson
  2017-12-11 14:37 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Chris Wilson @ 2017-12-11 12:37 UTC (permalink / raw)
  To: intel-gfx

Avoid having to test for spin[0] existing by starting the load-loop with
it allocated.

References: https://bugs.freedesktop.org/show_bug.cgi?id=104060
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_rps.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 57633c547..8f16ea47f 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -231,24 +231,24 @@ static void load_helper_run(enum load load)
 
 		igt_debug("Applying %s load...\n", lh.load ? "high" : "low");
 
+		spin[0] = igt_spin_batch_new(drm_fd, 0, 0, 0);
 		while (!lh.exit) {
-			if (spin[0]) {
-				handle = spin[0]->handle;
-				igt_spin_batch_end(spin[0]);
-				while (gem_bo_busy(drm_fd, handle))
-					usleep(100);
-				igt_spin_batch_free(drm_fd, spin[0]);
+			handle = spin[0]->handle;
+			igt_spin_batch_end(spin[0]);
+			while (gem_bo_busy(drm_fd, handle))
 				usleep(100);
-			}
+
+			igt_spin_batch_free(drm_fd, spin[0]);
+			usleep(100);
+
 			spin[0] = spin[1];
 			spin[lh.load == HIGH] =
-				igt_spin_batch_new(drm_fd, 0, 0, 0);
+				__igt_spin_batch_new(drm_fd, 0, 0, 0);
 		}
 
-		if (spin[0]) {
-			handle = spin[0]->handle;
-			igt_spin_batch_end(spin[0]);
-		}
+		handle = spin[0]->handle;
+		igt_spin_batch_end(spin[0]);
+
 		if (spin[1]) {
 			handle = spin[1]->handle;
 			igt_spin_batch_end(spin[1]);
-- 
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] 11+ messages in thread

end of thread, other threads:[~2017-12-20 11:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11 12:37 [PATCH igt] igt/pm_rps: Always allocate spin[0] Chris Wilson
2017-12-11 14:37 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-11 15:23 ` Patchwork
2017-12-11 16:18 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-19 12:05   ` Arkadiusz Hiler
2017-12-15 12:41 ` ✓ Fi.CI.BAT: success " Patchwork
2017-12-19 12:34 ` [PATCH igt v2] " Chris Wilson
2017-12-20 10:12   ` Szwichtenberg, Radoslaw
2017-12-20 11:06     ` Chris Wilson
2017-12-19 16:54 ` ✓ Fi.CI.BAT: success for igt/pm_rps: Always allocate spin[0] (rev2) Patchwork
2017-12-19 21:20 ` ✓ Fi.CI.IGT: " Patchwork

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.