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
This commit is contained in:
parent
ddd5cf24dc
commit
b3ebe7cd10
|
@ -914,7 +914,7 @@ static int send_fd_test(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t buf_size = PAGE_SIZE * num_pages;
|
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) {
|
if (dma_buf < 0) {
|
||||||
ret = dma_buf;
|
ret = dma_buf;
|
||||||
fprintf(stderr, "Failed to create dma-buf fd of size %zu err (%d)\n", buf_size, ret);
|
fprintf(stderr, "Failed to create dma-buf fd of size %zu err (%d)\n", buf_size, ret);
|
||||||
|
|
Loading…
Reference in New Issue