bcm27xx: update patches from RPi foundation
[openwrt/staging/luka.git] / target / linux / bcm27xx / patches-5.4 / 950-0727-udmabuf-use-cache_sgt_mapping-option.patch
1 From d57aecba0cd291e0c28e2c82c3d4bce06c5b5b94 Mon Sep 17 00:00:00 2001
2 From: Gurchetan Singh <gurchetansingh@chromium.org>
3 Date: Mon, 2 Dec 2019 17:36:24 -0800
4 Subject: [PATCH] udmabuf: use cache_sgt_mapping option
5
6 Commit bc7a71da43b48333f84c6534ab43d240e34cf9eb uptream.
7
8 The GEM prime helpers do it, so should we. It's also possible to make
9 it optional later.
10
11 Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
12 Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-1-gurchetansingh@chromium.org
13 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
14 ---
15 drivers/dma-buf/udmabuf.c | 9 +++++----
16 1 file changed, 5 insertions(+), 4 deletions(-)
17
18 --- a/drivers/dma-buf/udmabuf.c
19 +++ b/drivers/dma-buf/udmabuf.c
20 @@ -94,10 +94,11 @@ static void release_udmabuf(struct dma_b
21 }
22
23 static const struct dma_buf_ops udmabuf_ops = {
24 - .map_dma_buf = map_udmabuf,
25 - .unmap_dma_buf = unmap_udmabuf,
26 - .release = release_udmabuf,
27 - .mmap = mmap_udmabuf,
28 + .cache_sgt_mapping = true,
29 + .map_dma_buf = map_udmabuf,
30 + .unmap_dma_buf = unmap_udmabuf,
31 + .release = release_udmabuf,
32 + .mmap = mmap_udmabuf,
33 };
34
35 #define SEALS_WANTED (F_SEAL_SHRINK)