[i-g-t v3 07/13] SQUASH: lib/igt_gt: unify order of passing ahnd. To be squashed.

Bhanuprakash Modem bhanuprakash.modem at intel.com
Wed Jun 30 11:44:52 UTC 2021


From: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

---
 lib/igt_gt.c | 14 +++++++-------
 lib/igt_gt.h |  5 +++--
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 70d055d14d..a0ba04cc1d 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -269,8 +269,8 @@ static bool has_ctx_exec(int fd, unsigned ring, uint32_t ctx)
  * Returns:
  * Structure with helper internal state for igt_post_hang_ring().
  */
-static igt_hang_t __igt_hang_ctx(int fd, uint32_t ctx, int ring, unsigned flags,
-				 uint64_t ahnd)
+static igt_hang_t __igt_hang_ctx(int fd, uint64_t ahnd, uint32_t ctx, int ring,
+				 unsigned flags)
 {
 	struct drm_i915_gem_context_param param;
 	igt_spin_t *spin;
@@ -309,13 +309,13 @@ static igt_hang_t __igt_hang_ctx(int fd, uint32_t ctx, int ring, unsigned flags,
 
 igt_hang_t igt_hang_ctx(int fd, uint32_t ctx, int ring, unsigned flags)
 {
-	return __igt_hang_ctx(fd, ctx, ring, flags, 0);
+	return __igt_hang_ctx(fd, 0, ctx, ring, flags);
 }
 
-igt_hang_t igt_hang_ctx_with_ahnd(int fd, uint32_t ctx, int ring, unsigned flags,
-				  uint64_t ahnd)
+igt_hang_t igt_hang_ctx_with_ahnd(int fd, uint64_t ahnd, uint32_t ctx, int ring,
+				  unsigned flags)
 {
-	return __igt_hang_ctx(fd, ctx, ring, flags, ahnd);
+	return __igt_hang_ctx(fd, ahnd, ctx, ring, flags);
 }
 
 /**
@@ -337,7 +337,7 @@ igt_hang_t igt_hang_ring(int fd, int ring)
 
 igt_hang_t igt_hang_ring_with_ahnd(int fd, int ring, uint64_t ahnd)
 {
-	return igt_hang_ctx_with_ahnd(fd, 0, ring, 0, ahnd);
+	return igt_hang_ctx_with_ahnd(fd, ahnd, 0, ring, 0);
 }
 
 
diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index 1ddb21ae44..fabb89cde3 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -45,8 +45,9 @@ void igt_disallow_hang(int fd, igt_hang_t arg);
 #define HANG_POISON 0xc5c5c5c5
 
 igt_hang_t igt_hang_ctx(int fd, uint32_t ctx, int ring, unsigned flags);
-igt_hang_t igt_hang_ctx_with_ahnd(int fd, uint32_t ctx, int ring, unsigned flags,
-				  uint64_t ahnd);
+igt_hang_t igt_hang_ctx_with_ahnd(int fd, uint64_t ahnd, uint32_t ctx, int ring,
+				  unsigned flags);
+
 #define HANG_ALLOW_BAN 1
 #define HANG_ALLOW_CAPTURE 2
 
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list