From b007708642feb84db41492468392d502f8eff553 Mon Sep 17 00:00:00 2001 From: Carlos Llamas Date: Mon, 10 Jun 2024 16:08:37 +0000 Subject: [PATCH] ANDROID: dma-buf: align fd_flags and heap_flags with uapi The signature of dma_heap_buffer_alloc() was updated to match the uapi definition of 'struct dma_heap_allocation_data' as seen in [1]. Since in ACK we carry OOT patches that export this function and add dma_heap_bufferfd_alloc(), equivalent updates are made in this patch. Bug: 344501512 Cc: John Stultz Cc: Hailong.Liu Fixes: 8e1ec97355ef ("ANDROID: dma-heap: Provide accessors so that in-kernel drivers can allocate dmabufs from specific heaps") Fixes: 349e8360c9c8 ("ANDROID: dma-heap: Rework allocation calls to return struct dma_buf instead of fd") Link: https://lore.kernel.org/all/20240605012605.5341-1-21cnbao@gmail.com/ [1] Change-Id: Id27aa0970a06b51bebf00a6072baeff35f0d4358 Signed-off-by: Carlos Llamas --- drivers/dma-buf/dma-heap.c | 4 ++-- include/linux/dma-heap.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c index 104430200586..c9077f645b8d 100644 --- a/drivers/dma-buf/dma-heap.c +++ b/drivers/dma-buf/dma-heap.c @@ -105,8 +105,8 @@ struct dma_buf *dma_heap_buffer_alloc(struct dma_heap *heap, size_t len, EXPORT_SYMBOL_GPL(dma_heap_buffer_alloc); int dma_heap_bufferfd_alloc(struct dma_heap *heap, size_t len, - unsigned int fd_flags, - unsigned int heap_flags) + u32 fd_flags, + u64 heap_flags) { struct dma_buf *dmabuf; int fd; diff --git a/include/linux/dma-heap.h b/include/linux/dma-heap.h index 15bd3a7cd24d..90238183d53f 100644 --- a/include/linux/dma-heap.h +++ b/include/linux/dma-heap.h @@ -107,8 +107,8 @@ void dma_heap_buffer_free(struct dma_buf *); * @heap_flags: flags to pass to the dma heap */ int dma_heap_bufferfd_alloc(struct dma_heap *heap, size_t len, - unsigned int fd_flags, - unsigned int heap_flags); + u32 fd_flags, + u64 heap_flags); /** * dma_heap_try_get_pool_size_kb - Returns total dma-heap pool size in kb