[PATCH i-g-t 1/5] lib/intel_allocator: Fixed start offset

Dominik Karol Piatkowski dominik.karol.piatkowski at intel.com
Tue Dec 13 07:04:56 UTC 2022


On some platforms it may be required to use non-zero 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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
index 3004f15a..64616984 100644
--- a/lib/intel_allocator.c
+++ b/lib/intel_allocator.c
@@ -910,6 +910,9 @@ static uint64_t __intel_allocator_open_full(int fd, uint32_t ctx,
 	struct alloc_resp resp;
 	uint64_t gtt_size;
 
+	if (!start)
+		req.open.start = gem_detect_safe_start_offset(fd);
+
 	if (!end) {
 		igt_assert_f(can_report_gtt_size(fd), "Invalid fd\n");
 		gtt_size = gem_aperture_size(fd);
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list