[igt-dev] [PATCH i-g-t v3 5/7] lib/igt_v3d: Add PAGE_SIZE macro to V3D
Maíra Canal
mcanal at igalia.com
Tue Nov 29 18:40:36 UTC 2022
Some V3D tests use the page memory size, so create a macro to define the
page size as 4096 and replace this value for the macro in the V3D tests.
Reviewed-by: Melissa Wen <mwen at igalia.com>
Signed-off-by: Maíra Canal <mcanal at igalia.com>
---
lib/igt_v3d.h | 2 ++
tests/v3d/v3d_get_bo_offset.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/igt_v3d.h b/lib/igt_v3d.h
index 20429951..202c5e22 100644
--- a/lib/igt_v3d.h
+++ b/lib/igt_v3d.h
@@ -26,6 +26,8 @@
#include "v3d_drm.h"
+#define PAGE_SIZE 4096
+
struct v3d_bo {
int handle;
uint32_t offset;
diff --git a/tests/v3d/v3d_get_bo_offset.c b/tests/v3d/v3d_get_bo_offset.c
index f0318016..5c208f94 100644
--- a/tests/v3d/v3d_get_bo_offset.c
+++ b/tests/v3d/v3d_get_bo_offset.c
@@ -37,8 +37,8 @@ igt_main
"the same as the offset returned by the IOCTL");
igt_subtest("create-get-offsets") {
struct v3d_bo *bos[2] = {
- igt_v3d_create_bo(fd, 4096),
- igt_v3d_create_bo(fd, 4096),
+ igt_v3d_create_bo(fd, PAGE_SIZE),
+ igt_v3d_create_bo(fd, PAGE_SIZE),
};
uint32_t offsets[2] = {
igt_v3d_get_bo_offset(fd, bos[0]->handle),
--
2.38.1
More information about the igt-dev
mailing list