From: Cho KyongHo Date: Fri, 13 Apr 2018 05:09:01 +0000 (+0900) Subject: dma-buf: include dma-buf container to kernel build X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bbb789d08d4355ffb0c8074fcb0c56777dc0c78d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dma-buf: include dma-buf container to kernel build This commit follows commut bdaed72c4 ("dma-buf: introduce dma-buf container"). dma-buf container has been excluded from the kernel build until the dmabuf container support by ION is removed by commit e4af6c288 ("android: ion: remove linux/dmabuf_container.h") not to cause kernel build break. Change-Id: Id0d3e7f82ace28622efbbbd4e5fa263076059109 Signed-off-by: Cho KyongHo --- diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index ed3b785bae37..8f069e4d0a4a 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -30,4 +30,13 @@ config SW_SYNC WARNING: improper use of this can result in deadlocking kernel drivers from userspace. Intended for test and debug only. +config DMA_BUF_CONTAINER + bool "dma-buf container support" + default y + depends on DMA_SHARED_BUFFER + ---help--- + dma-buf container is a dma-buf that can contain multiple different + dma-buf objects. It is useful when delivering a lot of dma-buf objects + between processes or user and kernel to reduce communication overhead. + endmenu diff --git a/drivers/dma-buf/Makefile b/drivers/dma-buf/Makefile index c33bf8863147..e741999ae1c8 100644 --- a/drivers/dma-buf/Makefile +++ b/drivers/dma-buf/Makefile @@ -1,3 +1,4 @@ obj-y := dma-buf.o dma-fence.o dma-fence-array.o reservation.o seqno-fence.o obj-$(CONFIG_SYNC_FILE) += sync_file.o obj-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o +obj-$(CONFIG_DMA_BUF_CONTAINER) += dma-buf-container.o diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 8b1dda7a2d3c..59d3d00b42af 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -408,6 +408,11 @@ void dma_buf_vunmap(struct dma_buf *, void *vaddr); #ifdef CONFIG_DMA_BUF_CONTAINER struct dma_buf *dma_buf_get_any(int fd); +#else +static inline struct dma_buf *dma_buf_get_any(int fd) +{ + return dma_buf_get(fd); +} #endif