From 3455cd0b1c80f6f122ffbb625907c88148aa7900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20L=C3=BCtke=20Dreimann?= Date: Tue, 16 Aug 2022 15:26:37 +0200 Subject: [PATCH] fixed driver aligned alloc --- repos/dde_uos-intel-gpgpu/src/gpgpu/gpgpu_genode.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/repos/dde_uos-intel-gpgpu/src/gpgpu/gpgpu_genode.cc b/repos/dde_uos-intel-gpgpu/src/gpgpu/gpgpu_genode.cc index 2e9c664b38..2722600c3c 100644 --- a/repos/dde_uos-intel-gpgpu/src/gpgpu/gpgpu_genode.cc +++ b/repos/dde_uos-intel-gpgpu/src/gpgpu/gpgpu_genode.cc @@ -50,6 +50,16 @@ gpgpu_genode::~gpgpu_genode() void* gpgpu_genode::aligned_alloc(uint32_t alignment, uint32_t size) { + if(alignment == 0x1000) + { + alignment = 12; + } + else if(alignment != 0x0) + { + Genode::error("[GPU] Unsupported alignment: ", alignment); + return nullptr; + } + return alloc.alloc_aligned(size, alignment).convert( [&] (void *ptr) { return ptr; },