[PATCH i-g-t 3/5] benchmarks/gem_wsim: use xe_bb_size() helper

Matthew Auld matthew.auld at intel.com
Wed Jan 24 18:07:11 UTC 2024


No need to open code this anymore.

Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 benchmarks/gem_wsim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index 955b6799e..257134539 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -1743,8 +1743,8 @@ xe_alloc_step_batch(struct workload *wrk, struct w_step *w)
 	struct dep_entry *dep;
 	int i;
 
-	w->bb_size = ALIGN(PAGE_SIZE + xe_cs_prefetch_size(fd),
-			   xe_get_default_alignment(fd));
+	w->bb_size = xe_bb_size(fd, PAGE_SIZE);
+
 	w->bb_handle = xe_bo_create(fd, vm->id, w->bb_size,
 				    vram_if_possible(fd, eq->hwe_list[0].gt_id),
 				    DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM);
-- 
2.43.0



More information about the igt-dev mailing list