From: "Maíra Canal" <mcanal@igalia.com>
To: igt-dev@lists.freedesktop.org
Cc: petri.latvala@intel.com, Emma Anholt <emma@anholt.net>
Subject: [igt-dev] [PATCH i-g-t v3 5/7] lib/igt_v3d: Add PAGE_SIZE macro to V3D
Date: Tue, 29 Nov 2022 15:40:36 -0300 [thread overview]
Message-ID: <20221129184038.72946-6-mcanal@igalia.com> (raw)
In-Reply-To: <20221129184038.72946-1-mcanal@igalia.com>
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@igalia.com>
Signed-off-by: Maíra Canal <mcanal@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
next prev parent reply other threads:[~2022-11-29 18:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 18:40 [igt-dev] [PATCH i-g-t v3 0/7] V3D IGT Tests Updates Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 1/7] include/drm-uapi: Update to the latest v3d_drm.h Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 2/7] tests/v3d: Move V3D tests to their own folder Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 3/7] tests/v3d: Remove unused or redundant includes Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 4/7] tests/v3d: Add igt_describe() to all V3D subtests Maíra Canal
2022-11-29 18:40 ` Maíra Canal [this message]
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 6/7] tests/v3d_create_bo: Create test for V3D's Create BO IOCTL Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 7/7] tests/v3d_perfmon: Create test for V3D's Perfmon IOCTLs Maíra Canal
2022-11-29 20:34 ` [igt-dev] ✓ Fi.CI.BAT: success for V3D IGT Tests Updates (rev3) Patchwork
2022-11-30 3:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221129184038.72946-6-mcanal@igalia.com \
--to=mcanal@igalia.com \
--cc=emma@anholt.net \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox