Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/gem_ctx_param: Add GTT size test
@ 2024-12-03 10:16 Mikolaj Wasiak
  2024-12-03 14:34 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Mikolaj Wasiak @ 2024-12-03 10:16 UTC (permalink / raw)
  To: igt-dev, andi.shyti; +Cc: krzysztof.karas, eugene.kobyak

Create test checking if driver reports total GTT size.

Signed-off-by: Mikolaj Wasiak <mikolaj.wasiak@intel.com>
---
 tests/intel/gem_ctx_param.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/intel/gem_ctx_param.c b/tests/intel/gem_ctx_param.c
index 2e39a519b..bb208cf22 100644
--- a/tests/intel/gem_ctx_param.c
+++ b/tests/intel/gem_ctx_param.c
@@ -107,6 +107,9 @@
  *
  * SUBTEST: vm
  * Description: Tests that multiple contexts can share the same VMA
+ *
+ * SUBTEST: gtt-size
+ * Description: Tests that total size of GTT is power of two
  */
 
 IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation.");
@@ -468,6 +471,16 @@ igt_main
 	igt_subtest("vm")
 		test_vm(fd);
 
+	arg.param = I915_CONTEXT_PARAM_GTT_SIZE;
+
+	igt_describe("Tests that total size of GTT is power of two");
+	igt_subtest("gtt-size") {
+		gem_context_get_param(fd, &arg);
+
+		igt_assert_neq_u64(arg.value, 0);
+		igt_assert(is_power_of_two(arg.value));
+	}
+
 	arg.param = I915_CONTEXT_PARAM_PRIORITY;
 
 	igt_describe("Verify that context set param ioctl returns relevant error if driver "
-- 
2.47.1


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

end of thread, other threads:[~2024-12-13 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 10:16 [PATCH] tests/intel/gem_ctx_param: Add GTT size test Mikolaj Wasiak
2024-12-03 14:34 ` ✓ i915.CI.BAT: success for " Patchwork
2024-12-03 15:03 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-12-03 16:34 ` ✗ i915.CI.Full: " Patchwork
2024-12-03 16:37 ` ✗ Xe.CI.Full: " Patchwork
2024-12-09 22:19 ` [PATCH] " Andi Shyti
2024-12-13 15:01   ` Mikolaj Wasiak

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