From: Gurchetan Singh Date: Tue, 3 Dec 2019 01:36:24 +0000 (-0800) Subject: udmabuf: use cache_sgt_mapping option X-Git-Tag: v5.6-rc1~114^2~24^2~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc7a71da43b48333f84c6534ab43d240e34cf9eb;p=thirdparty%2Fkernel%2Flinux.git udmabuf: use cache_sgt_mapping option The GEM prime helpers do it, so should we. It's also possible to make it optional later. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann --- diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 9de539c1def47..be15eb6b05865 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -94,10 +94,11 @@ static void release_udmabuf(struct dma_buf *buf) } static const struct dma_buf_ops udmabuf_ops = { - .map_dma_buf = map_udmabuf, - .unmap_dma_buf = unmap_udmabuf, - .release = release_udmabuf, - .mmap = mmap_udmabuf, + .cache_sgt_mapping = true, + .map_dma_buf = map_udmabuf, + .unmap_dma_buf = unmap_udmabuf, + .release = release_udmabuf, + .mmap = mmap_udmabuf, }; #define SEALS_WANTED (F_SEAL_SHRINK)