[PATCH i-g-t] tests/intel/xe_oa: Adapt tests for 128MB OA buffer size

Sai Teja Pottumuttu sai.teja.pottumuttu at intel.com
Tue Nov 12 18:59:01 UTC 2024


The support for larger OA buffer size of 128MB is being introduced
into xe. Thus make the changes required to adapt xe_oa tests for
the increased OA buffer size.

Note that buffer-fill and enable-disable tests had a hardcoded buf_size
assuming OA buffer size to be 16MB and report size to be 256B, the
patch corrects this by allocating a buffer of OA_BUFFER_SIZE itself.

Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu at intel.com>
---
 tests/intel/xe_oa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 33e978a48..9ea7e73d2 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -63,7 +63,7 @@
 #define PIPE_CONTROL_PPGTT_WRITE	(0 << 2)
 #define PIPE_CONTROL_GLOBAL_GTT_WRITE   (1 << 2)
 
-#define MAX_OA_BUF_SIZE (16 * 1024 * 1024)
+#define MAX_OA_BUF_SIZE (128 * 1024 * 1024)
 #define OA_BUFFER_SIZE MAX_OA_BUF_SIZE
 
 #define RING_FORCE_TO_NONPRIV_ADDRESS_MASK 0x03fffffc
@@ -2364,7 +2364,7 @@ test_buffer_fill(const struct drm_xe_engine_class_instance *hwe)
 		.properties_ptr = to_user_pointer(properties),
 	};
 	size_t report_size = get_oa_format(fmt).size;
-	int buf_size = 65536 * report_size;
+	int buf_size = OA_BUFFER_SIZE;
 	uint8_t *buf = malloc(buf_size);
 	int len;
 	size_t oa_buf_size = MAX_OA_BUF_SIZE;
@@ -2590,7 +2590,7 @@ test_enable_disable(const struct drm_xe_engine_class_instance *hwe)
 		.properties_ptr = to_user_pointer(properties),
 	};
 	size_t report_size = get_oa_format(fmt).size;
-	int buf_size = 65536 * report_size;
+	int buf_size = OA_BUFFER_SIZE;
 	uint8_t *buf = malloc(buf_size);
 	size_t oa_buf_size = MAX_OA_BUF_SIZE;
 	int n_full_oa_reports = oa_buf_size / report_size;
-- 
2.34.1



More information about the igt-dev mailing list