From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/2] xe/xe_create: Use system configuration page size
Date: Mon, 3 Apr 2023 12:33:58 +0200 [thread overview]
Message-ID: <20230403103359.165928-2-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230403103359.165928-1-zbigniew.kempczynski@intel.com>
During the review Maarten asked to use _SC_PAGESIZE, unfortunately
this left on branch I didn't merge. Fix this to be page size
independent.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
tests/xe/xe_create.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/xe/xe_create.c b/tests/xe/xe_create.c
index ae841f8092..74833639f4 100644
--- a/tests/xe/xe_create.c
+++ b/tests/xe/xe_create.c
@@ -50,6 +50,7 @@ static void create_invalid_size(int fd)
{
struct drm_xe_query_mem_region *memregion;
uint64_t memreg = all_memory_regions(fd), region;
+ const uint32_t page_size = sysconf(_SC_PAGESIZE);
uint32_t vm;
uint32_t handle;
int ret;
@@ -72,9 +73,9 @@ static void create_invalid_size(int fd)
* second try, add page size to min page size if it is
* bigger than page size.
*/
- if (memregion->min_page_size > PAGE_SIZE) {
+ if (memregion->min_page_size > page_size) {
ret = __create_bo(fd, vm,
- memregion->min_page_size + PAGE_SIZE,
+ memregion->min_page_size + page_size,
region, &handle);
if (!ret) {
gem_close(fd, handle);
--
2.34.1
next prev parent reply other threads:[~2023-04-03 10:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 10:33 [igt-dev] [PATCH i-g-t 0/2] Add missing change in xe_create Zbigniew Kempczyński
2023-04-03 10:33 ` Zbigniew Kempczyński [this message]
2023-04-03 10:33 ` [igt-dev] [PATCH i-g-t 2/2] intel-ci/xe-fast-feedback: Add xe_create@create-invalid-size subtest to BAT Zbigniew Kempczyński
2023-04-03 10:56 ` [igt-dev] [PATCH i-g-t 0/2] Add missing change in xe_create Mauro Carvalho Chehab
2023-04-03 12:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-03 16:05 ` [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=20230403103359.165928-2-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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