drivers: don't select DMA_CMA or CMA
Subsystems (7)
v2 cover drivers: don't select DMA_CMA or CMA
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
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(-)
Signature · 1 line
2.30.2
PATCH v2 1/2 drivers/video/fbdev: don't select DMA_CMA
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.
--- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/Kconfig +1 -1
@@ -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.
Signature · 1 line
2.30.2
PATCH v2 2/2 drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv
In reply to David HildenbrandRandom 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.
--- drivers/gpu/drm/aspeed/Kconfig | 3 +-- drivers/gpu/drm/etnaviv/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/aspeed/Kconfig +1 -2
@@ -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).
drivers/gpu/drm/etnaviv/Kconfig +1 -2
@@ -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.
Signature · 1 line
2.30.2
Quoted 29 lines · David Hildenbrand
Trying to set
CONFIG_CMA=ywithCONFIG_DMA_CMA=nrevealed that we have three drivers that select these options. Random drivers should not override user settings of such core knobs. Let's use "implyDMA_CMA" instead, such that user configuration and dependencies are respected.v1 -> v2:
- FixDRM_CMA->DMA_CMACc Joel Stanley <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Andrew Jeffery <[email protected]>Cc Lucas Stach <[email protected]>Cc Russell King <[email protected]>Cc Christian Gmeiner <[email protected]>Cc Mike Rapoport <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Cc Linus Walleij <[email protected]>Cc Michal Simek <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Randy Dunlap <[email protected]>Cc Peter Collingbourne <[email protected]>Cc linux-aspeed at lists.ozlabs.orgCc dri-devel at lists.freedesktop.orgCc linux-arm-kernel at lists.infradead.orgCc etnaviv at lists.freedesktop.orgCc linux-fbdev at vger.kernel.org
Quoted 8 lines
David Hildenbrand (2):
drivers/video/fbdev: don't selectDMA_CMAdrivers/gpu/drm: don't selectDMA_CMAor CMA from aspeed or etnavivdrivers/gpu/drm/aspeed/Kconfig | 3 +-- drivers/gpu/drm/etnaviv/Kconfig | 3 +-- drivers/video/fbdev/Kconfig | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-)
Quoted 3 lines
Signature · 1 line
2.30.2
Signature · 2 lines
Sincerely yours, Mike.