diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 18:04:33 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-19 07:17:21 +0100 |
commit | 62b7f5931c54e96fca56dd8761b0e466d355c881 (patch) | |
tree | 1258b392752379833a075df006c2f6d7ac4be51d /target/linux/bcm27xx/patches-5.4/950-0718-udmabuf-add-a-pointer-to-the-miscdevice-in-dma-buf-p.patch | |
parent | 76d1168d0d4b9d76e2ad78c0fc6b255561deb284 (diff) | |
download | upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.tar.gz upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.tar.bz2 upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.zip |
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f07e572f64)
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0718-udmabuf-add-a-pointer-to-the-miscdevice-in-dma-buf-p.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0718-udmabuf-add-a-pointer-to-the-miscdevice-in-dma-buf-p.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0718-udmabuf-add-a-pointer-to-the-miscdevice-in-dma-buf-p.patch b/target/linux/bcm27xx/patches-5.4/950-0718-udmabuf-add-a-pointer-to-the-miscdevice-in-dma-buf-p.patch new file mode 100644 index 0000000000..68feae3d48 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0718-udmabuf-add-a-pointer-to-the-miscdevice-in-dma-buf-p.patch @@ -0,0 +1,67 @@ +From ad21bb0b5abf5414e31ac3e41ff60216bee52982 Mon Sep 17 00:00:00 2001 +From: Gurchetan Singh <gurchetansingh@chromium.org> +Date: Mon, 2 Dec 2019 17:36:25 -0800 +Subject: [PATCH] udmabuf: add a pointer to the miscdevice in dma-buf + private data + +Commit c1bbed668997268c9edccdc9db1bd1487d9e20b0 upstream. + +Will be used later. + +v2: rename 'udmabuf_misc' to 'device' (kraxel) + +Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org> +Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-2-gurchetansingh@chromium.org +Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> +--- + drivers/dma-buf/udmabuf.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/drivers/dma-buf/udmabuf.c ++++ b/drivers/dma-buf/udmabuf.c +@@ -18,6 +18,7 @@ static const size_t size_limit_mb = 64; + struct udmabuf { + pgoff_t pagecount; + struct page **pages; ++ struct miscdevice *device; + }; + + static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) +@@ -104,8 +105,9 @@ static const struct dma_buf_ops udmabuf_ + #define SEALS_WANTED (F_SEAL_SHRINK) + #define SEALS_DENIED (F_SEAL_WRITE) + +-static long udmabuf_create(const struct udmabuf_create_list *head, +- const struct udmabuf_create_item *list) ++static long udmabuf_create(struct miscdevice *device, ++ struct udmabuf_create_list *head, ++ struct udmabuf_create_item *list) + { + DEFINE_DMA_BUF_EXPORT_INFO(exp_info); + struct file *memfd = NULL; +@@ -172,6 +174,7 @@ static long udmabuf_create(const struct + exp_info.priv = ubuf; + exp_info.flags = O_RDWR; + ++ ubuf->device = device; + buf = dma_buf_export(&exp_info); + if (IS_ERR(buf)) { + ret = PTR_ERR(buf); +@@ -209,7 +212,7 @@ static long udmabuf_ioctl_create(struct + list.offset = create.offset; + list.size = create.size; + +- return udmabuf_create(&head, &list); ++ return udmabuf_create(filp->private_data, &head, &list); + } + + static long udmabuf_ioctl_create_list(struct file *filp, unsigned long arg) +@@ -228,7 +231,7 @@ static long udmabuf_ioctl_create_list(st + if (IS_ERR(list)) + return PTR_ERR(list); + +- ret = udmabuf_create(&head, list); ++ ret = udmabuf_create(filp->private_data, &head, list); + kfree(list); + return ret; + } |