Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp312750pxf; Thu, 8 Apr 2021 03:45:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp1la+FFi7FJDVFUB6HPYcqg+8XSpLGC+FJvbCyoHbx6qSvjdcysIx4ygbqMGrEUT6niC3 X-Received: by 2002:a17:90b:378f:: with SMTP id mz15mr8033690pjb.70.1617878751097; Thu, 08 Apr 2021 03:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617878751; cv=none; d=google.com; s=arc-20160816; b=flRuzJ8qICEFFUuUM2rzJz1U/rMi/wOTvjiQzm/j6V7zKGIq77wM+FJfIJwbIynHum VnqYctrhX9GC5mCvQCQ3/0Za2V3irdHBLpTrES0GC7wLwOdlBOMGtvWNmXNXprAmcLnY iCAbt7fQDv73PwQcHLZ4upgrexi+UisuZZZITlD+F/ibKIqqAXJ4Lpzy3qFmpGyNSP6q o1DKzmlXVI92YA2zI7YkUCbFB28Ii5elce7MF0ut4pzqaXNWLwEq/y/AdPl64z+Wn1BZ 9PXHJOVNbAEg977BgUsSAHj9hwtKJucWFUH4zEMR6ZzK8dv11j5z+0imoTT6D/mcc6xd yQSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=6PbfzPkRVHIZkwfFdr0YRTTfjEH/3s4dv23TUprad4s=; b=KVIME0bonZO65o+wBzpYHvUSPnZCmgvTvOWThmwCdfLCzpR2gGxFEdgC4QeSjJUHpl aqDaZqPRo0LiEA6l9UtsxH4BRSj8AQopSb/VpFsjW3iPjAUP3vc6n3k2tTtsS7V5Jse3 2ZUCvXwC+NXMqjieMhYd6wOWHndhXOtQwbyfCXhbOR0uqFX0Ih2emVPvEk9BgV3cMEhg kcJb2lSxmo13+xFniEMoz/zOlUt6G4skHpU6dgiW9Sdjac/qfSGfuWAQWLyDBp2p+SWm Y9wtezBspvq2vIeQqSFpdOwU4ftxU8WTMWigYs+3HtOzMo1bjUWxQg0CHboewOtlu/fV ZDwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si24712966pfl.94.2021.04.08.03.45.38; Thu, 08 Apr 2021 03:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbhDHKpR (ORCPT + 99 others); Thu, 8 Apr 2021 06:45:17 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:42449 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbhDHKpP (ORCPT ); Thu, 8 Apr 2021 06:45:15 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MZTVu-1l6kMj0BHi-00WYhw; Thu, 08 Apr 2021 12:45:03 +0200 Received: by mail-wm1-f53.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so3793931wmq.1; Thu, 08 Apr 2021 03:45:02 -0700 (PDT) X-Gm-Message-State: AOAM532U5DmibPh5axgL06iKWCJDxcQM065UjrxcNOQs6UVtqhBfYMTK I4eN57J54/L8hQgd75IY/BgJxXQnSZ6owHhCfrA= X-Received: by 2002:a1c:4c0c:: with SMTP id z12mr7558571wmf.38.1617878702742; Thu, 08 Apr 2021 03:45:02 -0700 (PDT) MIME-Version: 1.0 References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> In-Reply-To: From: Arnd Bergmann Date: Thu, 8 Apr 2021 12:44:46 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv To: David Hildenbrand Cc: Linux Kernel Mailing List , Linux-MM , Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery , Lucas Stach , Russell King , Christian Gmeiner , Mike Rapoport , Bartlomiej Zolnierkiewicz , Linus Walleij , Michal Simek , Masahiro Yamada , Randy Dunlap , Peter Collingbourne , linux-aspeed , dri-devel , Linux ARM , The etnaviv authors , Linux Fbdev development list Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:01bNjQRf0DYjZTk/3T6t8Ul/ByuLNZHbaYNUKAIkE/wUn0iS+nJ r+h1hTknz6RnJwK+4yvsSTTMDMfP0wL/SBleBUgrfq8H2feG3qdKiYvzS8OVk72H7KQScSR knajtXwvzME3w0XfFP0a/6Wd30DjfL/sgcg7Bf7y7ZaQXKCU4GVJL2zM8mqHXzPWrBP2UHe 10Efb4EJhESAXIRtFm2Zw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:aDTbPNUdFEo=:vhAsJPTvzcLggZm9K/4Tpl htY+I+Iu8AdJIb0v4563U2egO7I4kONwaespbZfWaJXeQWBb+fVkWGntATwNxaDywY24u4S3F 94wUCL6AZJz0UEEHJm8NQeMUCts0nLcS73G0AUpXicJ9ovYIG1CQDXmqwLgkIOAxmsiEtFR6I ULAL3i9ElfeRXPsX1QFTuDb0gmpskonTu6j+cpupC+3EoSedZWz3ERUyCwyzlpBBa67zwOqJL KJ8x8miIl2o+cagsDe+3/iV7Y7SbCHne4zTfjmxDRarhU4OMIZBoNGUfCouWNQ/c9bvvVZ4nb Y/srdzXinqVQGwisicSq7/fOhhcyCC5F9isVUG1OQ28VA+HSgI4HhM2ov6XmRXTnwwNCXWsNZ Z+F4fMpsEOKMZope86rm/lIdg/JGRqWNEPHjw8tXgCh+eNkdIoVkJ0nqdhWSoxRT97T+fPvln R5kuG+6wD0SkwOuMaBYimNtIYZ3GFF7Yt/Wgt8pewIjWrSBdpeIkkhpmGW5Vnk7H7g7/PdKA0 qlPWufSxFXKY/CCB2WSl6Y6xsMryR6lSxzD8BctnF1OwB1l0xAR0074Knkm1Bpy8JPWoylhgE XXZnWjddIwV59gB0NeRvEsVNvLZJPK1T63 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 8, 2021 at 12:29 PM David Hildenbrand wrote: > On 08.04.21 12:20, Arnd Bergmann wrote: > > On Thu, Apr 8, 2021 at 11:22 AM David Hildenbrand wrote: > >> > >> 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" :) Yes, but that's a different set of problems > > > > 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. Ok, at least that makes it easier. > > 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? I thought you were trying to solve the problem where DRMA_ASPEED_GFX can optionally link against CMA but would fail to build when the CMA code is in a loadable module. If the problem you are trying to solve is a different one, you need a different solution, not what I posted above. > > 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". That used to be the meaning, but it changed a few years ago. Now it means "when a used manually turns on this symbol, turn on the implied one as well, but let them turn it off again if they choose". This is pretty much a NOP. > Your example looks more like a NOP - no? > Or will it have the same effect? The example I gave is only meaningful if both are tristate, which is not the case here as you explain. It is a somewhat awkward way to say "prevent this symbol from being =y if the dependency is =m". Arnd