From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B10110E543 for ; Tue, 8 Nov 2022 23:58:02 +0000 (UTC) From: =?UTF-8?q?Ma=C3=ADra=20Canal?= To: igt-dev@lists.freedesktop.org Date: Tue, 8 Nov 2022 20:57:22 -0300 Message-Id: <20221108235724.126287-5-mcanal@igalia.com> In-Reply-To: <20221108235724.126287-1-mcanal@igalia.com> References: <20221108235724.126287-1-mcanal@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 4/6] lib/igt_v3d: Add PAGE_SIZE macro to V3D List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: petri.latvala@intel.com, Emma Anholt Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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 --- 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