From b3ebe7cd106ef5f5a6673ab1594bd12c18b992e3 Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Tue, 23 Mar 2021 15:47:13 -0700 Subject: [PATCH] Add legacy-align parameter to DmabufHeapAlloc() The parameter is intended to make the API backwards compatible with legacy ION devices. It will be ignored for devices that support DMA-BUF heaps. Test: build Bug: 154310076 Change-Id: Ic5b49269283caa7d05d9468f8ed7f02e1b3c1f1e Merged-In: Ic5b49269283caa7d05d9468f8ed7f02e1b3c1f1e --- trusty/libtrusty/tipc-test/tipc_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trusty/libtrusty/tipc-test/tipc_test.c b/trusty/libtrusty/tipc-test/tipc_test.c index 94aedd75b..29c6f939f 100644 --- a/trusty/libtrusty/tipc-test/tipc_test.c +++ b/trusty/libtrusty/tipc-test/tipc_test.c @@ -914,7 +914,7 @@ static int send_fd_test(void) { } size_t buf_size = PAGE_SIZE * num_pages; - dma_buf = DmabufHeapAlloc(allocator, "system", buf_size, 0); + dma_buf = DmabufHeapAlloc(allocator, "system", buf_size, 0, 0 /* legacy align */); if (dma_buf < 0) { ret = dma_buf; fprintf(stderr, "Failed to create dma-buf fd of size %zu err (%d)\n", buf_size, ret);