From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>
Subject: [PATCH i-g-t 2/2] lib/igt_fb: Calculate fb size according to display requirement
Date: Thu, 11 Jul 2024 13:02:10 +0200 [thread overview]
Message-ID: <20240711110210.207882-3-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20240711110210.207882-1-zbigniew.kempczynski@intel.com>
Minimum page alignment may vary from display alignment so lets pick
maximum of those to satisfy its need.
Note for scanout Battlemage requires bo allocation in 64K contigues
pages alignment whereas normal objects might be allocated in 4K page
increments.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
lib/igt_fb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ab162a5b74..030b4db84d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -956,7 +956,9 @@ static uint64_t calc_fb_size(struct igt_fb *fb)
}
if (is_xe_device(fb->fd))
- size = ALIGN(size, xe_get_default_alignment(fb->fd));
+ size = ALIGN(size, max_t(uint32_t,
+ xe_get_default_alignment(fb->fd),
+ xe_get_display_alignment(fb->fd)));
return size;
}
--
2.34.1
next prev parent reply other threads:[~2024-07-11 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 11:02 [PATCH i-g-t 0/2] Use display alignment for fb size calculation Zbigniew Kempczyński
2024-07-11 11:02 ` [PATCH i-g-t 1/2] lib/xe_query: Add display alignment helper Zbigniew Kempczyński
2024-07-11 11:02 ` Zbigniew Kempczyński [this message]
2024-07-11 13:01 ` ✓ CI.xeBAT: success for Use display alignment for fb size calculation Patchwork
2024-07-11 13:14 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-11 15:37 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-11 22:19 ` ✗ 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=20240711110210.207882-3-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.com \
--cc=matthew.auld@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