Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH i-g-t 4/8] lib/xe: Rename xe_is_gt_in_c6()
Date: Fri,  3 Jan 2025 23:15:44 -0800	[thread overview]
Message-ID: <20250104071548.737612-4-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20250104071548.737612-1-lucas.demarchi@intel.com>

Use xe_gt_ as namespace.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 lib/xe/xe_gt.c                |  4 ++--
 lib/xe/xe_gt.h                |  2 +-
 tests/intel/xe_gt_freq.c      | 12 ++++++------
 tests/intel/xe_pm_residency.c |  8 ++++----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/xe/xe_gt.c b/lib/xe/xe_gt.c
index e1f353b41..6f1475be0 100644
--- a/lib/xe/xe_gt.c
+++ b/lib/xe/xe_gt.c
@@ -176,13 +176,13 @@ int xe_gt_stats_get_count(int fd, int gt, const char *stat)
 }
 
 /**
- * xe_is_gt_in_c6:
+ * xe_gt_is_in_c6:
  * @fd: pointer to xe drm fd
  * @gt: gt number
  *
  * Check if GT is in C6 state
  */
-bool xe_is_gt_in_c6(int fd, int gt)
+bool xe_gt_is_in_c6(int fd, int gt)
 {
 	char gt_c_state[16];
 	int gt_fd;
diff --git a/lib/xe/xe_gt.h b/lib/xe/xe_gt.h
index 47569cec3..511b31149 100644
--- a/lib/xe/xe_gt.h
+++ b/lib/xe/xe_gt.h
@@ -17,7 +17,7 @@ igt_hang_t xe_hang_ring(int fd, uint64_t ahnd, uint32_t ctx, int ring,
 void xe_post_hang_ring(int fd, igt_hang_t arg);
 int xe_gt_stats_get_count(int fd, int gt, const char *stat);
 
-bool xe_is_gt_in_c6(int fd, int gt);
+bool xe_gt_is_in_c6(int fd, int gt);
 
 int xe_gt_fill_engines_by_class(int fd, int gt, int class,
 				struct drm_xe_engine_class_instance eci[static XE_MAX_ENGINE_INSTANCE]);
diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
index 5d806cf15..2ece2e6f4 100644
--- a/tests/intel/xe_gt_freq.c
+++ b/tests/intel/xe_gt_freq.c
@@ -200,7 +200,7 @@ static void test_freq_fixed(int fd, int gt_id, bool gt_idle)
 
 	if (gt_idle) {
 		/* Wait for GT to go in C6 as previous get_freq wakes up GT*/
-		igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt_id), 1000, 10),
+		igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt_id), 1000, 10),
 			     "GT %d should be in C6\n", gt_id);
 		igt_assert(get_freq(fd, gt_id, "act") == 0);
 	} else {
@@ -215,7 +215,7 @@ static void test_freq_fixed(int fd, int gt_id, bool gt_idle)
 	igt_assert_lte_u32((rpmid - FREQ_UNIT_MHZ), cur_freq);
 
 	if (gt_idle) {
-		igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt_id), 1000, 10),
+		igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt_id), 1000, 10),
 			     "GT %d should be in C6\n", gt_id);
 		igt_assert(get_freq(fd, gt_id, "act") == 0);
 	} else {
@@ -234,7 +234,7 @@ static void test_freq_fixed(int fd, int gt_id, bool gt_idle)
 	igt_assert_eq_u32(get_freq(fd, gt_id, "cur"), rp0);
 
 	if (gt_idle) {
-		igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt_id), 1000, 10),
+		igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt_id), 1000, 10),
 			     "GT %d should be in C6\n", gt_id);
 		igt_assert(get_freq(fd, gt_id, "act") == 0);
 	}
@@ -265,7 +265,7 @@ static void test_freq_range(int fd, int gt_id, bool gt_idle)
 	igt_assert(rpn <= cur && cur <= rpmid + FREQ_UNIT_MHZ);
 
 	if (gt_idle) {
-		igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt_id), 1000, 10),
+		igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt_id), 1000, 10),
 			     "GT %d should be in C6\n", gt_id);
 		igt_assert(get_freq(fd, gt_id, "act") == 0);
 	} else {
@@ -466,7 +466,7 @@ igt_main
 
 	igt_subtest("freq_fixed_idle") {
 		xe_for_each_gt(fd, gt) {
-			igt_require_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 10),
+			igt_require_f(igt_wait(xe_gt_is_in_c6(fd, gt), 1000, 10),
 				      "GT %d should be in C6\n", gt);
 			test_freq_fixed(fd, gt, true);
 		}
@@ -484,7 +484,7 @@ igt_main
 
 	igt_subtest("freq_range_idle") {
 		xe_for_each_gt(fd, gt) {
-			igt_require_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 10),
+			igt_require_f(igt_wait(xe_gt_is_in_c6(fd, gt), 1000, 10),
 				      "GT %d should be in C6\n", gt);
 			test_freq_range(fd, gt, true);
 		}
diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
index 18e5cb6c3..0b48a1c79 100644
--- a/tests/intel/xe_pm_residency.c
+++ b/tests/intel/xe_pm_residency.c
@@ -210,7 +210,7 @@ static void test_idle_residency(int fd, int gt, enum test_type flag)
 {
 	unsigned long elapsed_ms, residency_start, residency_end;
 
-	igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 1), "GT %d not in C6\n", gt);
+	igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt), 1000, 1), "GT %d not in C6\n", gt);
 
 	if (flag == TEST_S2IDLE) {
 		/*
@@ -300,7 +300,7 @@ static void toggle_gt_c6(int fd, int n)
 		igt_assert_lte(0, fw_handle);
 		/* check if all gts are in C0 after forcewake is acquired */
 		xe_for_each_gt(fd, gt)
-			igt_assert_f(!xe_is_gt_in_c6(fd, gt),
+			igt_assert_f(!xe_gt_is_in_c6(fd, gt),
 				     "Forcewake acquired, GT %d should be in C0\n", gt);
 
 		if (n == NUM_REPS)
@@ -309,7 +309,7 @@ static void toggle_gt_c6(int fd, int n)
 		close(fw_handle);
 		/* check if all gts are in C6 after forcewake is released */
 		xe_for_each_gt(fd, gt)
-			igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 1),
+			igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt), 1000, 1),
 				     "Forcewake released, GT %d should be in C6\n", gt);
 
 		if (n == NUM_REPS)
@@ -406,7 +406,7 @@ igt_main
 	igt_subtest_with_dynamic("gt-c6-on-idle") {
 		xe_for_each_gt(fd, gt)
 			igt_dynamic_f("gt%u", gt)
-				igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 1),
+				igt_assert_f(igt_wait(xe_gt_is_in_c6(fd, gt), 1000, 1),
 					     "GT %d not in C6\n", gt);
 	}
 
-- 
2.47.0


  parent reply	other threads:[~2025-01-04  7:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04  7:15 [PATCH i-g-t 1/8] tests/intel/xe_drm_fdinfo: Do not end cork not started Lucas De Marchi
2025-01-04  7:15 ` [PATCH i-g-t 2/8] lib/xe/xe_gt: Fix header guards and boilerplate Lucas De Marchi
2025-01-06 22:58   ` Cavitt, Jonathan
2025-01-04  7:15 ` [PATCH i-g-t 3/8] lib/xe: Move functions from xe_util to xe_gt Lucas De Marchi
2025-01-06 22:58   ` Cavitt, Jonathan
2025-01-07 17:57     ` Lucas De Marchi
2025-01-04  7:15 ` Lucas De Marchi [this message]
2025-01-06 22:58   ` [PATCH i-g-t 4/8] lib/xe: Rename xe_is_gt_in_c6() Cavitt, Jonathan
2025-01-04  7:15 ` [PATCH i-g-t 5/8] lib/xe: Split nsec to ticks abstraction Lucas De Marchi
2025-01-06 22:58   ` Cavitt, Jonathan
2025-01-04  7:15 ` [PATCH i-g-t 6/8] lib/xe/xe_spin: Move declarations around Lucas De Marchi
2025-01-06 22:58   ` Cavitt, Jonathan
2025-01-07 18:05     ` Lucas De Marchi
2025-01-04  7:15 ` [PATCH i-g-t 7/8] treewide: s/ctx/cork/ when referring to xe_cork Lucas De Marchi
2025-01-06 22:58   ` Cavitt, Jonathan
2025-01-04  7:15 ` [PATCH i-g-t 8/8] tests/intel/xe_drm_fdinfo: Stop asserting on usage percentage Lucas De Marchi
2025-01-06 22:58   ` Cavitt, Jonathan
2025-01-07 19:06     ` Lucas De Marchi
2025-01-06 14:58 ` ✓ i915.CI.BAT: success for series starting with [i-g-t,1/8] tests/intel/xe_drm_fdinfo: Do not end cork not started (rev2) Patchwork
2025-01-06 15:05 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-06 15:08 ` [PATCH i-g-t 1/8] tests/intel/xe_drm_fdinfo: Do not end cork not started Cavitt, Jonathan
2025-01-06 17:22   ` Lucas De Marchi
2025-01-06 17:03 ` ✓ i915.CI.Full: success for series starting with [i-g-t,1/8] tests/intel/xe_drm_fdinfo: Do not end cork not started (rev2) Patchwork
2025-01-07  6:07 ` ✗ Xe.CI.Full: failure " Patchwork

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=20250104071548.737612-4-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox