* [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA
@ 2021-04-08 10:05 David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA David Hildenbrand
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: David Hildenbrand @ 2021-04-08 10:05 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, David Hildenbrand, Joel Stanley, David Airlie,
Daniel Vetter, Andrew Jeffery, Lucas Stach, Russell King,
Christian Gmeiner, Mike Rapoport, Arnd Bergmann,
Bartlomiej Zolnierkiewicz, Linus Walleij, Michal Simek,
Masahiro Yamada, Randy Dunlap, Peter Collingbourne, linux-aspeed,
dri-devel, linux-arm-kernel, etnaviv, linux-fbdev
Trying to set CONFIG_CMA=y with CONFIG_DMA_CMA=n revealed that we have
three drivers that select these options. Random drivers should not
override user settings of such core knobs. Let's use "imply DMA_CMA"
instead, such that user configuration and dependencies are respected.
v1 -> v2:
- Fix DRM_CMA -> DMA_CMA
Cc: Joel Stanley <joel@jms.id.au>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Peter Collingbourne <pcc@google.com>
Cc: linux-aspeed@lists.ozlabs.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: etnaviv@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
David Hildenbrand (2):
drivers/video/fbdev: don't select DMA_CMA
drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv
drivers/gpu/drm/aspeed/Kconfig | 3 +--
drivers/gpu/drm/etnaviv/Kconfig | 3 +--
drivers/video/fbdev/Kconfig | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA
2021-04-08 10:05 [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA David Hildenbrand
@ 2021-04-08 10:05 ` David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv David Hildenbrand
2021-04-08 10:16 ` [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA Mike Rapoport
2 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2021-04-08 10:05 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, David Hildenbrand, Joel Stanley, David Airlie,
Daniel Vetter, Andrew Jeffery, Lucas Stach, Russell King,
Christian Gmeiner, Mike Rapoport, Arnd Bergmann,
Bartlomiej Zolnierkiewicz, Linus Walleij, Michal Simek,
Masahiro Yamada, Randy Dunlap, Peter Collingbourne, linux-aspeed,
dri-devel, linux-arm-kernel, etnaviv, linux-fbdev
Random drivers should not override a user configuration of core knobs
(e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect
dependencies and manual overrides.
"This is similar to "select" as it enforces a lower limit on another
symbol except that the "implied" symbol's value may still be set to n
from a direct dependency or with a visible prompt."
Implying DMA_CMA should be sufficient, as that depends on CMA.
Note: If this is a real dependency, we should use "depends on DMA_CMA"
instead - but I assume the driver can work without CMA just fine --
esp. when we wouldn't have HAVE_DMA_CONTIGUOUS or CMA right now.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
drivers/video/fbdev/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 4f02db65dede..d37cd5341e1b 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -2186,7 +2186,7 @@ config FB_HYPERV
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select FB_DEFERRED_IO
- select DMA_CMA if HAVE_DMA_CONTIGUOUS && CMA
+ imply DMA_CMA
help
This framebuffer driver supports Microsoft Hyper-V Synthetic Video.
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv
2021-04-08 10:05 [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA David Hildenbrand
@ 2021-04-08 10:05 ` David Hildenbrand
2021-04-08 10:16 ` [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA Mike Rapoport
2 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2021-04-08 10:05 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mm, David Hildenbrand, Joel Stanley, David Airlie,
Daniel Vetter, Andrew Jeffery, Lucas Stach, Russell King,
Christian Gmeiner, Mike Rapoport, Arnd Bergmann,
Bartlomiej Zolnierkiewicz, Linus Walleij, Michal Simek,
Masahiro Yamada, Randy Dunlap, Peter Collingbourne, linux-aspeed,
dri-devel, linux-arm-kernel, etnaviv, linux-fbdev
Random drivers should not override a user configuration of core knobs
(e.g., CONFIG_DMA_CMA=n). Use "imply" instead, to still respect
dependencies and manual overrides.
"This is similar to "select" as it enforces a lower limit on another
symbol except that the "implied" symbol's value may still be set to n
from a direct dependency or with a visible prompt."
Implying DMA_CMA should be sufficient, as that depends on CMA.
Note: If this is a real dependency, we should use "depends on DMA_CMA"
instead - but I assume the driver can work without CMA just fine --
esp. when we wouldn't have HAVE_DMA_CONTIGUOUS right now.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
drivers/gpu/drm/aspeed/Kconfig | 3 +--
drivers/gpu/drm/etnaviv/Kconfig | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/aspeed/Kconfig b/drivers/gpu/drm/aspeed/Kconfig
index 5e95bcea43e9..b35bb1aa9b91 100644
--- a/drivers/gpu/drm/aspeed/Kconfig
+++ b/drivers/gpu/drm/aspeed/Kconfig
@@ -6,9 +6,8 @@ config DRM_ASPEED_GFX
depends on MMU
select DRM_KMS_HELPER
select DRM_KMS_CMA_HELPER
- select DMA_CMA if HAVE_DMA_CONTIGUOUS
- select CMA if HAVE_DMA_CONTIGUOUS
select MFD_SYSCON
+ imply DMA_CMA
help
Chose this option if you have an ASPEED AST2500 SOC Display
Controller (aka GFX).
diff --git a/drivers/gpu/drm/etnaviv/Kconfig b/drivers/gpu/drm/etnaviv/Kconfig
index faa7fc68b009..5f5576b7221a 100644
--- a/drivers/gpu/drm/etnaviv/Kconfig
+++ b/drivers/gpu/drm/etnaviv/Kconfig
@@ -9,9 +9,8 @@ config DRM_ETNAVIV
select THERMAL if DRM_ETNAVIV_THERMAL
select TMPFS
select WANT_DEV_COREDUMP
- select CMA if HAVE_DMA_CONTIGUOUS
- select DMA_CMA if HAVE_DMA_CONTIGUOUS
select DRM_SCHED
+ imply DMA_CMA
help
DRM driver for Vivante GPUs.
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA
2021-04-08 10:05 [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv David Hildenbrand
@ 2021-04-08 10:16 ` Mike Rapoport
2 siblings, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2021-04-08 10:16 UTC (permalink / raw)
To: David Hildenbrand
Cc: linux-kernel, linux-mm, Joel Stanley, David Airlie,
Daniel Vetter, Andrew Jeffery, Lucas Stach, Russell King,
Christian Gmeiner, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Linus Walleij, Michal Simek, Masahiro Yamada, Randy Dunlap,
Peter Collingbourne, linux-aspeed, dri-devel, linux-arm-kernel,
etnaviv, linux-fbdev
On Thu, Apr 08, 2021 at 12:05:21PM +0200, David Hildenbrand wrote:
> Trying to set CONFIG_CMA=y with CONFIG_DMA_CMA=n revealed that we have
> three drivers that select these options. Random drivers should not
> override user settings of such core knobs. Let's use "imply DMA_CMA"
> instead, such that user configuration and dependencies are respected.
>
> v1 -> v2:
> - Fix DRM_CMA -> DMA_CMA
>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Russell King <linux+etnaviv@armlinux.org.uk>
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Peter Collingbourne <pcc@google.com>
> Cc: linux-aspeed@lists.ozlabs.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: etnaviv@lists.freedesktop.org
> Cc: linux-fbdev@vger.kernel.org
>
> David Hildenbrand (2):
> drivers/video/fbdev: don't select DMA_CMA
> drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv
>
> drivers/gpu/drm/aspeed/Kconfig | 3 +--
> drivers/gpu/drm/etnaviv/Kconfig | 3 +--
> drivers/video/fbdev/Kconfig | 2 +-
> 3 files changed, 3 insertions(+), 5 deletions(-)
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
> --
> 2.30.2
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-08 10:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 10:05 [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA David Hildenbrand
2021-04-08 10:05 ` [PATCH v2 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv David Hildenbrand
2021-04-08 10:16 ` [PATCH v2 0/2] drivers: don't select DMA_CMA or CMA Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).