summaryrefslogtreecommitdiffstats
path: root/drivers/dma-buf/heaps
diff options
context:
space:
mode:
authorBarry Song <v-songbaohua@oppo.com>2024-06-06 04:02:13 +0200
committerSumit Semwal <sumit.semwal@linaro.org>2024-06-19 16:35:34 +0200
commitb9578c49456340ca4d3c7ddbaca054ffc2b51bc1 (patch)
treeb3dd77097824f0144bb38247c5c40ccd83a7f189 /drivers/dma-buf/heaps
parentdrm/panfrost: Add support for Mali on the MT8188 SoC (diff)
downloadlinux-b9578c49456340ca4d3c7ddbaca054ffc2b51bc1.tar.xz
linux-b9578c49456340ca4d3c7ddbaca054ffc2b51bc1.zip
dma-buf/heaps: Correct the types of fd_flags and heap_flags
dma_heap_allocation_data defines the UAPI as follows: struct dma_heap_allocation_data { __u64 len; __u32 fd; __u32 fd_flags; __u64 heap_flags; }; But dma heaps are casting both fd_flags and heap_flags into unsigned long. This patch makes dma heaps - cma heap and system heap have consistent types with UAPI. Signed-off-by: Barry Song <v-songbaohua@oppo.com> Acked-by: John Stultz <jstultz@google.com> Reviewed-by: Carlos Llamas <cmllamas@google.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240606020213.49854-1-21cnbao@gmail.com
Diffstat (limited to 'drivers/dma-buf/heaps')
-rw-r--r--drivers/dma-buf/heaps/cma_heap.c4
-rw-r--r--drivers/dma-buf/heaps/system_heap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c
index 4a63567e93ba..c384004b918e 100644
--- a/drivers/dma-buf/heaps/cma_heap.c
+++ b/drivers/dma-buf/heaps/cma_heap.c
@@ -274,8 +274,8 @@ static const struct dma_buf_ops cma_heap_buf_ops = {
static struct dma_buf *cma_heap_allocate(struct dma_heap *heap,
unsigned long len,
- unsigned long fd_flags,
- unsigned long heap_flags)
+ u32 fd_flags,
+ u64 heap_flags)
{
struct cma_heap *cma_heap = dma_heap_get_drvdata(heap);
struct cma_heap_buffer *buffer;
diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
index 9076d47ed2ef..d78cdb9d01e5 100644
--- a/drivers/dma-buf/heaps/system_heap.c
+++ b/drivers/dma-buf/heaps/system_heap.c
@@ -333,8 +333,8 @@ static struct page *alloc_largest_available(unsigned long size,
static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
unsigned long len,
- unsigned long fd_flags,
- unsigned long heap_flags)
+ u32 fd_flags,
+ u64 heap_flags)
{
struct system_heap_buffer *buffer;
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);