All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/xe/xe_sriov_provisioning: Drop sched_if_idle reads
@ 2025-10-22 15:58 Marcin Bernatowicz
  2025-10-22 22:44 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Marcin Bernatowicz @ 2025-10-22 15:58 UTC (permalink / raw)
  To: igt-dev
  Cc: Marcin Bernatowicz, Jakub Kolakowski, Lukasz Laguna,
	Michal Wajdeczko

Reflect kernel change making sched_if_idle debugfs attribute write-only.
Remove related getters, checks, and update default attributes and tests.

Link: https://lore.kernel.org/intel-xe/20251021210549.2114-1-michal.wajdeczko@intel.com/

Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 lib/xe/xe_sriov_provisioning.c | 41 +---------------------------------
 lib/xe/xe_sriov_provisioning.h |  2 --
 tests/intel/xe_pmu.c           |  9 ++++----
 3 files changed, 5 insertions(+), 47 deletions(-)

diff --git a/lib/xe/xe_sriov_provisioning.c b/lib/xe/xe_sriov_provisioning.c
index ff9d1f7d2..28ce3d95b 100644
--- a/lib/xe/xe_sriov_provisioning.c
+++ b/lib/xe/xe_sriov_provisioning.c
@@ -570,42 +570,6 @@ void xe_sriov_set_engine_reset(int pf, unsigned int gt_num, bool value)
 	igt_fail_on(__xe_sriov_set_engine_reset(pf, gt_num, value));
 }
 
-/**
- * __xe_sriov_get_sched_if_idle - Get the scheduling if idle policy for a given GT
- * @pf: PF device file descriptor
- * @gt_num: GT number
- * @value: Pointer to store the read scheduling if idle policy status
- *
- * Reads the scheduling if idle policy status for the given PF device @pf on GT @gt_num.
- *
- * Return: 0 on success, negative error code on failure.
- */
-int __xe_sriov_get_sched_if_idle(int pf, unsigned int gt_num, bool *value)
-{
-	return __xe_sriov_pf_debugfs_get_boolean(pf, 0, gt_num, "sched_if_idle", value);
-}
-
-/**
- * xe_sriov_get_sched_if_idle - Get the scheduling if idle policy for a given GT
- * @pf: PF device file descriptor
- * @gt_num: GT number
- *
- * A throwing version of __xe_sriov_get_sched_if_idle().
- * Instead of returning an error code, it returns the scheduling if idle policy status
- * and asserts in case of an error.
- *
- * Return: The scheduling if idle status for the given GT.
- *         Asserts in case of failure.
- */
-bool xe_sriov_get_sched_if_idle(int pf, unsigned int gt_num)
-{
-	bool value;
-
-	igt_fail_on(__xe_sriov_get_sched_if_idle(pf, gt_num, &value));
-
-	return value;
-}
-
 /**
  * __xe_sriov_set_sched_if_idle - Set the scheduling if idle policy status for a given GT
  * @pf: PF device file descriptor
@@ -731,7 +695,6 @@ void xe_sriov_set_sched_priority(int pf, unsigned int vf_num, unsigned int gt_nu
  * Default scheduling attributes are as follows for each VF and PF:
  * - exec_quantum_ms equals zero (meaning infinity)
  * - preempt_timeout_us equals zero (meaning infinity)
- * - sched_if_idle equals false
  * - reset_engine equals false
  * - sched_priority equals XE_SRIOV_SCHED_PRIORITY_LOW
  */
@@ -739,13 +702,11 @@ void xe_sriov_require_default_scheduling_attributes(int pf)
 {
 	unsigned int totalvfs = igt_sriov_get_total_vfs(pf);
 	enum xe_sriov_sched_priority sched_priority;
-	bool sched_if_idle, reset_engine;
+	bool reset_engine;
 	uint32_t eq, pt;
 	unsigned int gt;
 
 	xe_for_each_gt(pf, gt) {
-		igt_skip_on(__xe_sriov_get_sched_if_idle(pf, gt, &sched_if_idle));
-		igt_require_f(!sched_if_idle, "sched_if_idle != false on gt%u\n", gt);
 		igt_skip_on(__xe_sriov_get_engine_reset(pf, gt, &reset_engine));
 		igt_require_f(!reset_engine, "reset_engine != false on gt%u\n", gt);
 
diff --git a/lib/xe/xe_sriov_provisioning.h b/lib/xe/xe_sriov_provisioning.h
index e1a9d0a63..8ee567bc8 100644
--- a/lib/xe/xe_sriov_provisioning.h
+++ b/lib/xe/xe_sriov_provisioning.h
@@ -134,8 +134,6 @@ int __xe_sriov_get_engine_reset(int pf, unsigned int gt_num, bool *value);
 bool xe_sriov_get_engine_reset(int pf, unsigned int gt_num);
 int __xe_sriov_set_engine_reset(int pf, unsigned int gt_num, bool value);
 void xe_sriov_set_engine_reset(int pf, unsigned int gt_num, bool value);
-int __xe_sriov_get_sched_if_idle(int pf, unsigned int gt_num, bool *value);
-bool xe_sriov_get_sched_if_idle(int pf, unsigned int gt_num);
 int __xe_sriov_set_sched_if_idle(int pf, unsigned int gt_num, bool value);
 void xe_sriov_set_sched_if_idle(int pf, unsigned int gt_num, bool value);
 int __xe_sriov_get_sched_priority(int pf, unsigned int vf_num,
diff --git a/tests/intel/xe_pmu.c b/tests/intel/xe_pmu.c
index 9525655ba..c630fd047 100644
--- a/tests/intel/xe_pmu.c
+++ b/tests/intel/xe_pmu.c
@@ -692,13 +692,13 @@ static void engine_activity_all_fn(int fd, struct drm_xe_engine_class_instance *
 	}
 }
 
-static void engine_activity_fn(int fd, struct drm_xe_engine_class_instance *eci, int function)
+static void engine_activity_fn(int fd, struct drm_xe_engine_class_instance *eci,
+			       int function, bool sched_if_idle)
 {
 	uint64_t config, engine_active_ticks, engine_total_ticks, before[2], after[2];
 	double busy_percent, exec_quantum_ratio;
 	struct xe_cork *cork = NULL;
 	int pmu_fd[2], fn_fd;
-	bool sched_if_idle;
 	uint32_t vm;
 
 	if (function > 0) {
@@ -748,7 +748,6 @@ static void engine_activity_fn(int fd, struct drm_xe_engine_class_instance *eci,
 	if (function > 0)
 		close(fn_fd);
 
-	sched_if_idle = xe_sriov_get_sched_if_idle(fd, eci->gt_id);
 	if (sched_if_idle)
 		assert_within_epsilon(engine_active_ticks, engine_total_ticks, tolerance);
 	else
@@ -1188,13 +1187,13 @@ igt_main
 		igt_describe("Validate per-function engine activity");
 		test_each_engine("fn-engine-activity-load", fd, eci)
 			for (int fn = 0; fn < num_fns; fn++)
-				engine_activity_fn(fd, eci, fn);
+				engine_activity_fn(fd, eci, fn, false);
 
 		igt_describe("Validate per-function engine activity when sched-if-idle is set");
 		test_each_engine("fn-engine-activity-sched-if-idle", fd, eci) {
 			xe_sriov_set_sched_if_idle(fd, eci->gt_id, 1);
 			for (int fn = 0; fn < num_fns; fn++)
-				engine_activity_fn(fd, eci, fn);
+				engine_activity_fn(fd, eci, fn, true);
 		}
 
 		igt_fixture
-- 
2.43.0


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

end of thread, other threads:[~2025-11-19 14:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22 15:58 [PATCH i-g-t] lib/xe/xe_sriov_provisioning: Drop sched_if_idle reads Marcin Bernatowicz
2025-10-22 22:44 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-10-23  0:01 ` ✓ i915.CI.BAT: " Patchwork
2025-10-23  3:41 ` ✗ Xe.CI.Full: failure " Patchwork
     [not found]   ` <c55a1762-fbdc-41c9-b425-2d812409600c@linux.intel.com>
2025-10-23 10:48     ` Bernatowicz, Marcin
2025-10-23 13:04 ` ✓ i915.CI.Full: success " Patchwork
2025-11-19 14:15 ` [PATCH i-g-t] " Laguna, Lukasz

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.