[igt-dev] [PATCH i-g-t 4/6] lib/igt_v3d: Add PAGE_SIZE macro to V3D
Maíra Canal
mcanal at igalia.com
Tue Nov 8 23:57:22 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.
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 976a28b8..b2d2f186 100644
--- a/tests/v3d/v3d_get_bo_offset.c
+++ b/tests/v3d/v3d_get_bo_offset.c
@@ -33,8 +33,8 @@ igt_main
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