Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/xe_pmu: Fix test to accept single VF configs
@ 2026-09-28 18:57 Umesh Nerlige Ramappa
  2026-09-28 22:19 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Umesh Nerlige Ramappa @ 2026-09-28 18:57 UTC (permalink / raw)
  To: igt-dev, marcin.bernatowicz, soham.purkait

Some platforms my support just one VF, so remove the need for 2 VFs in
the tests.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 tests/intel/xe_pmu.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/intel/xe_pmu.c b/tests/intel/xe_pmu.c
index 364e643fe5bb..d41ebba1faef 100644
--- a/tests/intel/xe_pmu.c
+++ b/tests/intel/xe_pmu.c
@@ -982,7 +982,7 @@ static void test_gt_frequency(int fd, struct drm_xe_engine_class_instance *eci)
 
 static unsigned int enable_and_provision_vfs(int fd)
 {
-	unsigned int num_vfs, vf;
+	unsigned int num_vfs, vf, total_vfs;
 	uint32_t pf_exec_quantum_ms = 64, vf_exec_quantum_ms = 32;
 	uint32_t pf_preempt_timeout_us = 64000, vf_preempt_timeout_us = 32000;
 
@@ -995,11 +995,13 @@ static unsigned int enable_and_provision_vfs(int fd)
 				       NULL);
 	autoprobe = igt_sriov_is_driver_autoprobe_enabled(fd);
 
+	total_vfs = igt_sriov_get_total_vfs(fd);
+	num_vfs = total_vfs > 2 ? 2 : total_vfs;
+
 	/* Enable VF's */
 	igt_sriov_disable_driver_autoprobe(fd);
-	igt_sriov_enable_vfs(fd, 2);
-	num_vfs = igt_sriov_get_enabled_vfs(fd);
-	igt_require(num_vfs == 2);
+	igt_sriov_enable_vfs(fd, num_vfs);
+	igt_require(igt_sriov_get_enabled_vfs(fd) == num_vfs);
 
 	/* Set 32ms for VF execution quantum and 64ms for PF execution quantum */
 	xe_sriov_admin_bulk_set_exec_quantum_ms(fd, vf_exec_quantum_ms);
-- 
2.53.0


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

end of thread, other threads:[~2026-10-01 21:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 18:57 [PATCH] tests/intel/xe_pmu: Fix test to accept single VF configs Umesh Nerlige Ramappa
2026-09-28 22:19 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-09-28 22:35 ` ✓ i915.CI.BAT: " Patchwork
2026-09-29  4:18 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-10-01 21:19   ` Umesh Nerlige Ramappa
2026-09-29  7:10 ` ✗ i915.CI.Full: " Patchwork
2026-10-01 10:31 ` [PATCH] " Bernatowicz, Marcin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox