Hi Sumit, Christian,
This patch series adds missing dependencies on DMA_SHARED_BUFFER to various options of DMA-BUF, and drops a bogus select.
As drivers/dma-buf/Kconfig contains interleaved options that select or depend on DMA_SHARED_BUFFER, they can't be wrapped inside a big "if DMA_SHARED_BUFFER / endif" block.
Thanks!
Geert Uytterhoeven (3): dma-buf: DMABUF_MOVE_NOTIFY should depend on DMA_SHARED_BUFFER dma-buf: DMABUF_DEBUG should depend on DMA_SHARED_BUFFER dma-buf: DMABUF_SYSFS_STATS should depend on DMA_SHARED_BUFFER
drivers/dma-buf/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Move notify between drivers is an option of DMA-BUF. Enabling DMABUF_MOVE_NOTIFY without DMA_SHARED_BUFFER does not have any impact, as drivers/dma-buf/ is not entered during the build when DMA_SHARED_BUFFER is disabled.
Fixes: bb42df4662a44765 ("dma-buf: add dynamic DMA-buf handling v15") Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org --- drivers/dma-buf/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index 9561e3d2d4285d55..de5a17c40a33d336 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -42,6 +42,7 @@ config UDMABUF config DMABUF_MOVE_NOTIFY bool "Move notify between drivers (EXPERIMENTAL)" default n + depends on DMA_SHARED_BUFFER help Don't pin buffers if the dynamic DMA-buf interface is available on both the exporter as well as the importer. This fixes a security
DMA-BUF debug checks are an option of DMA-BUF. Enabling DMABUF_DEBUG without DMA_SHARED_BUFFER does not have any impact, as drivers/dma-buf/ is not entered during the build when DMA_SHARED_BUFFER is disabled.
Fixes: 84335675f2223cbd ("dma-buf: Add debug option") Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org --- drivers/dma-buf/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index de5a17c40a33d336..d53782f4f51b54f7 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -53,6 +53,7 @@ config DMABUF_MOVE_NOTIFY
config DMABUF_DEBUG bool "DMA-BUF debug checks" + depends on DMA_SHARED_BUFFER default y if DMA_API_DEBUG help This option enables additional checks for DMA-BUF importers and
DMA-BUF sysfs statistics are an option of DMA-BUF. It does not make much sense to bother the user with a question about DMA-BUF sysfs statistics if DMA-BUF itself is not enabled. Worse, enabling the statistics enables the feature.
Fixes: bdb8d06dfefd666d ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs") Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org --- drivers/dma-buf/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index d53782f4f51b54f7..541efe01abc7c432 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -76,7 +76,7 @@ menuconfig DMABUF_HEAPS
menuconfig DMABUF_SYSFS_STATS bool "DMA-BUF sysfs statistics" - select DMA_SHARED_BUFFER + depends on DMA_SHARED_BUFFER help Choose this option to enable DMA-BUF sysfs statistics in location /sys/kernel/dmabuf/buffers.
Hello Geert,
On Thu, 2 Sept 2021 at 18:19, Geert Uytterhoeven geert@linux-m68k.org wrote:
Hi Sumit, Christian,
This patch series adds missing dependencies on DMA_SHARED_BUFFER to various options of DMA-BUF, and drops a bogus select.
As drivers/dma-buf/Kconfig contains interleaved options that select or depend on DMA_SHARED_BUFFER, they can't be wrapped inside a big "if DMA_SHARED_BUFFER / endif" block.
Thanks for catching these issues and the patch-set. LGTM!
I'll apply them over.
Thanks!
Geert Uytterhoeven (3): dma-buf: DMABUF_MOVE_NOTIFY should depend on DMA_SHARED_BUFFER dma-buf: DMABUF_DEBUG should depend on DMA_SHARED_BUFFER dma-buf: DMABUF_SYSFS_STATS should depend on DMA_SHARED_BUFFER
drivers/dma-buf/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
-- 2.25.1
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Best, Sumit.
dri-devel@lists.freedesktop.org