[igt-dev] [PATCH i-g-t 2/4] lib/intel_allocator: Fixed start alignment

Dominik Karol Piatkowski dominik.karol.piatkowski at intel.com
Wed Dec 14 07:29:42 UTC 2022


On some platforms it may be required to use aligned start address.

Signed-off-by: Dominik Karol Piatkowski <dominik.karol.piatkowski at intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 lib/intel_allocator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
index 64616984..060a65ce 100644
--- a/lib/intel_allocator.c
+++ b/lib/intel_allocator.c
@@ -927,6 +927,8 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
 	if (!default_alignment)
 		req.open.default_alignment = gem_detect_safe_alignment(fd);
 
+	req.open.start = ALIGN(req.open.start, req.open.default_alignment);
+
 	/* Get child_tid only once at open() */
 	if (child_tid == -1)
 		child_tid = gettid();
-- 
2.34.1



More information about the igt-dev mailing list