From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41A18C43460 for ; Fri, 9 Apr 2021 12:36:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E4A9C610CA for ; Fri, 9 Apr 2021 12:36:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4A9C610CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 82EC86B008A; Fri, 9 Apr 2021 08:36:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7DE236B008C; Fri, 9 Apr 2021 08:36:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 631636B0092; Fri, 9 Apr 2021 08:36:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 46E986B008A for ; Fri, 9 Apr 2021 08:36:06 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EE2481F0A for ; Fri, 9 Apr 2021 12:36:05 +0000 (UTC) X-FDA: 78012775890.19.2BCA8C8 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by imf27.hostedemail.com (Postfix) with ESMTP id 2099980192E7 for ; Fri, 9 Apr 2021 12:35:58 +0000 (UTC) Received: by mail-lj1-f177.google.com with SMTP id u4so6266933ljo.6 for ; Fri, 09 Apr 2021 05:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Tg6sgY5o6KJ5S57CRLT5oBYc675XGvjvO0a75IDhy4M=; b=tD/+WsHQQWYusIiNpWcK7bwWVSNKlMLnyRF8CoJ3CZhMIHxMdvtXVATkH2bY6CsvV6 4EeqLJcMu8Lx6dXjIGijM9Z71Ysw7FoPhIt4pVwzFK6l7vQQG0p8gmVQcZtmvl5D6mmc vnQ4vXPZDk4T7ERYAIs5HJIK9/rMwsb/PGlIkgHlPxrLJNQV9qOSD2eFT+qGhgN9rW/v i+5TnZ7zezyrlf0LjEA3nkURPCbcKV3D0THgJHWfMYiU94A6/Dnr2CLqYXHUaZSeUV9C jYnvEDTnSyDvM2CCXvtBaB8N7OxfbX9Umv48J+Clvg4cWNbqEuv5MYIvFfkzoLNaHZdC sk4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Tg6sgY5o6KJ5S57CRLT5oBYc675XGvjvO0a75IDhy4M=; b=tTjoer7EQ9APIhgalwQcauLV8mYtTxn7x8p9hjzFD3wvffb9cpVx/zkBRVvO/JUHd3 p4yLXy67E4S2cJXtVJn7fI9Ktl1Uj/6xrV+D8Tn2xVqtDalY0SJZLqoYITaAq7RJoyWH 2YeSpY+7CRuAEY6Vcq9zwqFH/EnfDOgMypCa2O2ZH7JnFJxYGGkkvAxYOAZ9+Nbjhnsz j77QKO6exeL4MvaHE6afhq0hZFxiuaxPATuwlL6jz0iQzpexap7kjyIGCxFAbTdeJ4wi Qjlnw1cK/KCxq65uzlAKKcOXN6CVfelXXVleU/5Kjt5zQAdiZKjqCI+XLJBHnmrT9C4b XVFg== X-Gm-Message-State: AOAM530oHsoGa+pu1e2U94T/5xFecbVSzvQp62TdiJWRgRdv3T8mEM4L SbbEo89ze+I1fVxek29gIkKEVzBHLVbu0yKWql0hTQ== X-Google-Smtp-Source: ABdhPJxh1RNVQiQp5bCHRakekzyhAZR4aqS7papfBzgGL0DdgK61i7YYHDZZLT+jLT3UuH+d/zlCtwSkkzSHByUlUhw= X-Received: by 2002:a2e:1649:: with SMTP id 9mr9682701ljw.74.1617971763963; Fri, 09 Apr 2021 05:36:03 -0700 (PDT) MIME-Version: 1.0 References: <20210409112035.27221-1-david@redhat.com> In-Reply-To: <20210409112035.27221-1-david@redhat.com> From: Linus Walleij Date: Fri, 9 Apr 2021 14:35:52 +0200 Message-ID: Subject: Re: [PATCH v3] drivers: introduce and use WANT_DMA_CMA for soft dependencies on DMA_CMA To: David Hildenbrand Cc: linux-kernel , Linux Memory Management List , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Joel Stanley , Andrew Jeffery , Lucas Stach , Russell King , Christian Gmeiner , Paul Cercueil , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Andrew Morton , Mike Rapoport , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Eric Anholt , Michal Simek , Masahiro Yamada , "Alexander A. Klimov" , Peter Collingbourne , Suman Anna , Jason Gunthorpe , "open list:DRM PANEL DRIVERS" , linux-aspeed , Linux ARM , The etnaviv authors , linux-mips@vger.kernel.org, Linux Fbdev development list , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 5hro9ppfpfsmsbaq16g3geyjp8r6o6py X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2099980192E7 Received-SPF: none (linaro.org>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=mail-lj1-f177.google.com; client-ip=209.85.208.177 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617971758-106572 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Apr 9, 2021 at 1:20 PM David Hildenbrand 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 > 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