From 58c1dfe3b3fe69085a3c687c8fdc82e926425894 Mon Sep 17 00:00:00 2001 From: zhoumengjie Date: Thu, 29 Feb 2024 14:40:13 +0800 Subject: [PATCH] remove check heapflags Signed-off-by: zhoumengjie --- linux-5.10/rk3568_patch/kernel.patch | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/linux-5.10/rk3568_patch/kernel.patch b/linux-5.10/rk3568_patch/kernel.patch index 42ba21b..7b220c6 100644 --- a/linux-5.10/rk3568_patch/kernel.patch +++ b/linux-5.10/rk3568_patch/kernel.patch @@ -133978,7 +133978,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 }; static LIST_HEAD(heap_list); -@@ -49,20 +52,72 @@ static dev_t dma_heap_devt; +@@ -49,20 +52,70 @@ static dev_t dma_heap_devt; static struct class *dma_heap_class; static DEFINE_XARRAY_ALLOC(dma_heap_minors); @@ -134016,8 +134016,6 @@ index bbbfa28b2f6c..6c22995616a2 100644 + if (fd_flags & ~DMA_HEAP_VALID_FD_FLAGS) + return ERR_PTR(-EINVAL); + -+ if (heap_flags & ~DMA_HEAP_VALID_HEAP_FLAGS) -+ return ERR_PTR(-EINVAL); /* * Allocations from all heaps have to begin * and end on page boundaries. @@ -134055,7 +134053,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 static int dma_heap_open(struct inode *inode, struct file *file) { -@@ -90,12 +145,9 @@ static long dma_heap_ioctl_allocate(struct file *file, void *data) +@@ -90,12 +143,9 @@ static long dma_heap_ioctl_allocate(struct file *file, void *data) if (heap_allocation->fd) return -EINVAL; @@ -134071,7 +134069,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 if (fd < 0) return fd; -@@ -188,6 +240,47 @@ void *dma_heap_get_drvdata(struct dma_heap *heap) +@@ -188,6 +238,47 @@ void *dma_heap_get_drvdata(struct dma_heap *heap) { return heap->priv; } @@ -134119,7 +134117,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 /** * dma_heap_get_name() - get heap name -@@ -200,11 +293,11 @@ const char *dma_heap_get_name(struct dma_heap *heap) +@@ -200,11 +291,11 @@ const char *dma_heap_get_name(struct dma_heap *heap) { return heap->name; } @@ -134133,7 +134131,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 unsigned int minor; int ret; -@@ -218,10 +311,18 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) +@@ -218,10 +309,18 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) return ERR_PTR(-EINVAL); } @@ -134152,7 +134150,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 heap->name = exp_info->name; heap->ops = exp_info->ops; heap->priv = exp_info->priv; -@@ -246,28 +347,20 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) +@@ -246,28 +345,20 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) goto err1; } @@ -134191,7 +134189,7 @@ index bbbfa28b2f6c..6c22995616a2 100644 /* Add heap to the list */ list_add(&heap->list, &heap_list); -@@ -285,27 +378,88 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) +@@ -285,27 +376,88 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) kfree(heap); return err_ret; } -- Gitee