Skip to content

Commit 2104a66

Browse files
author
Jyri Sarha
committed
lib: fast-get: use vregion_type from mod_alloc_ctx
Use vregion_type from struct mod_alloc_ctx to control which vregion memory type fast_get() uses for allocations. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent b18bc95 commit 2104a66

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zephyr/lib/fast-get.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ const void *fast_get(struct mod_alloc_ctx *alloc, const void *dram_ptr, size_t s
219219
}
220220

221221
if (alloc && alloc->vreg && size <= FAST_GET_MAX_COPY_SIZE)
222-
/* A userspace allocation, that won't be shared */
223-
ret = vregion_alloc_align(alloc->vreg, VREGION_MEM_TYPE_INTERIM, alloc_size,
222+
/* Use mem type set by caller (mod_fast_get sets per module state) */
223+
ret = vregion_alloc_align(alloc->vreg, alloc->vregion_type, alloc_size,
224224
alloc_align);
225225
else
226226
ret = sof_heap_alloc(heap, alloc_flags, alloc_size, alloc_align);

0 commit comments

Comments
 (0)