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 <jstultz@google.com>
Cc: Hailong.Liu <hailong.liu@oppo.com>
Fixes: 8e1ec97355 ("ANDROID: dma-heap: Provide accessors so that in-kernel drivers can allocate dmabufs from specific heaps")
Fixes: 349e8360c9 ("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 <cmllamas@google.com>
This commit is contained in:
Carlos Llamas
2024-06-10 16:08:37 +00:00
committed by Treehugger Robot
parent fbd1fef4d7
commit b007708642
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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