Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv
From: David Hildenbrand <hidden>
Date: 2021-04-08 10:37:54
Also in:
dri-devel, linux-aspeed, linux-fbdev, linux-mm, lkml
On 08.04.21 12:27, David Hildenbrand wrote:
On 08.04.21 12:20, Arnd Bergmann wrote:quoted
On Thu, Apr 8, 2021 at 11:22 AM David Hildenbrand [off-list ref] wrote:quoted
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 DRM_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.'imply' is almost never the right solution, and it tends to cause more problems than it solves.I thought that was the case with "select" :)quoted
In particular, it does not prevent a configuration with 'DRM_CMA=m'I assume you meant "DRM_CMA=n" ? DRM_CMA cannot be built as a module.quoted
and 'DRMA_ASPEED_GFX=y', or any build failures from such a configuration.I don't follow. "DRM_CMA=n" and 'DRMA_ASPEED_GFX=y' is supposed to work just fine (e.g., without HAVE_DMA_CONTIGUOUS) or what am I missing?quoted
If you want this kind of soft dependency, you need 'depends on DRM_CMA || !DRM_CMA'.Seriously? I think the point of imply is "please enable if possible and not prevented by someone else". Your example looks more like a NOP - no? Or will it have the same effect?
I just tried (remove CONFIG_DMA_CMA from .config followed by make) and the default will be set to "N" (when querying the user). So it indeed looks like a NOP - unless I am missing something. -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel