Messages in this thread | | | From | Linus Walleij <> | Date | Fri, 9 Apr 2021 14:35:52 +0200 | Subject | Re: [PATCH v3] drivers: introduce and use WANT_DMA_CMA for soft dependencies on DMA_CMA |
| |
On Fri, Apr 9, 2021 at 1:20 PM David Hildenbrand <david@redhat.com> wrote:
> Random drivers should not override a user configuration of core knobs > (e.g., CONFIG_DMA_CMA=n). Applicable drivers would like to use DMA_CMA, > which depends on CMA, if possible; however, these drivers also have to > tolerate if DMA_CMA is not available/functioning, for example, if no CMA > area for DMA_CMA use has been setup via "cma=X". In the worst case, the > driver cannot do it's job properly in some configurations.
Looks good to me. At least a lot better than what we have. Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Let's see if this approach is better for soft dependencies (and if we > actually have some hard dependencies in there). This is the follow-up > of > https://lkml.kernel.org/r/20210408092011.52763-1-david@redhat.com > https://lkml.kernel.org/r/20210408100523.63356-1-david@redhat.com
You can just add these to the commit message with Link: when applying so people can easily find the discussion from the commit.
> I was wondering if it would make sense in some drivers to warn if either > CONFIG_DMA_CMA is not available or if DRM_CMA has not been configured > properly - just to give people a heads up that something might more likely > go wrong; that would, however, be future work.
I think the frameworks (DRM_*_CMA_HELPER) should pr_info something about it so the individual drivers don't have to sanity check their entire world.
Yours, Linus Walleij
| |