[PATCH i-g-t v2 3/8] lib/xe: Rename xe_is_gt_in_c6()
Lucas De Marchi
lucas.demarchi at intel.com
Tue Jan 7 20:26:10 UTC 2025
Use xe_gt_ as namespace.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at 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 a4791071f..1fb6d2b53 100644
--- a/tests/intel/xe_gt_freq.c
+++ b/tests/intel/xe_gt_freq.c
@@ -199,7 +199,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 {
@@ -214,7 +214,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 {
@@ -233,7 +233,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);
}
@@ -264,7 +264,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 {
@@ -465,7 +465,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);
}
@@ -483,7 +483,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 8a9e2c89e..06f4a0bc6 100644
--- a/tests/intel/xe_pm_residency.c
+++ b/tests/intel/xe_pm_residency.c
@@ -209,7 +209,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) {
/*
@@ -299,7 +299,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)
@@ -308,7 +308,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)
@@ -405,7 +405,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
More information about the igt-dev
mailing list