Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp380259pxf; Thu, 8 Apr 2021 05:14:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyziEAjabXtZvnRpj431PP9/6dmaHj1G+SbmoQxCDQiqpttobi7RGIWaUwFooIOQ5FaRLON X-Received: by 2002:a05:6402:3511:: with SMTP id b17mr10955117edd.98.1617884076733; Thu, 08 Apr 2021 05:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617884076; cv=none; d=google.com; s=arc-20160816; b=tiZBX8/SPOkE9ClBXDg1DU7CzM7bLLzqoJZRU6MjWmeHBhUsh7RZHLp/GBwD6BEGTE KWPCkvXReyRir4Wjwd80uuzaHGKEygr28lK4qD2NxXtK8ebEF0gdL+ouhk1+NlP55I0y IKGuJTjn1e8l+GquEWSdkq1/tJFpzuaLV/ymY+CDwgThEhfaQG2EwzXVP9Dt3HXqeDCU Lv0KxB4F3AIJ1BdpuHfjIcQ+yZcfHatyvG13hTsB25XCXCdlxXrAA2FUrbarBiiMIxdw HiEfhgNxz1wQypXlxvwnd6sBaFPY5494Z5Oi2zps1sNV1mZOTPpEA3mjp6RdHSb4D5Eo xkDQ== 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=DEvYAn6johAXq67D+CnmexUHRlNcClZpe9Sfnj5Mnbg=; b=XAyWxwRwwjix1Brq6xgjp4pXNK+L85zeiLCtajrWkK0NTM6pFbrRIRHkgpxBInvTKb qSM8KjPjQnszhgyTNOEDK4vDZBMxlOfjpkZbG4b1WsFVHcINmhMtyoosNMH2ajMPEfZn hpbYHtkxPF/FYem2ohV0W1nuHJ2Ur5HgZVkr3BBVuQ7dC4vD4pHXBhA7fkjYqmqm1ZYZ oKb8FH3NWH03swWTy683EaLrA6RjS8R5ZxDvEcecFHcWwhL6sKYlw8qQDEN6ODZmG2Y7 5KVi635jyRm0591ATnrREVUNGzCXj4f6rggew5QHdTX9rxTk+8uiLXry40VTinhdh4eZ JwYQ== 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 w11si16113336ede.2.2021.04.08.05.14.13; Thu, 08 Apr 2021 05:14:36 -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 S231441AbhDHMNE (ORCPT + 99 others); Thu, 8 Apr 2021 08:13:04 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:54669 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbhDHMND (ORCPT ); Thu, 8 Apr 2021 08:13:03 -0400 Received: from mail-ot1-f51.google.com ([209.85.210.51]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MpD7H-1lvWIO0k4F-00qgzI; Thu, 08 Apr 2021 14:12:51 +0200 Received: by mail-ot1-f51.google.com with SMTP id y19-20020a0568301d93b02901b9f88a238eso2007403oti.11; Thu, 08 Apr 2021 05:12:50 -0700 (PDT) X-Gm-Message-State: AOAM533aQ5x2KJXqDZ4QIKID1luXPLRkW+oLSy1Gzf8ZUrad1i6ySbHB ufTeJn2FORdxmaa+3UyWrrpy67VYPvwhS1VrEEo= X-Received: by 2002:a9d:316:: with SMTP id 22mr7238748otv.210.1617883969787; Thu, 08 Apr 2021 05:12:49 -0700 (PDT) MIME-Version: 1.0 References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> <7496ac87-9676-1b4e-3444-c2a662ec376b@redhat.com> <3a2d64a7-8425-8daf-17ee-95b9f0c635f9@redhat.com> In-Reply-To: <3a2d64a7-8425-8daf-17ee-95b9f0c635f9@redhat.com> From: Arnd Bergmann Date: Thu, 8 Apr 2021 14:12:33 +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:Fhq6otmHI4POdFwHt6AOwgyAZRigRhN6pYbDOSuC4J1om7dvrxN 5Ja69gop/zE0tH6oGXFj2WuiEReiKVTdhjARmeZqehRikmeHB1KRTCWyAzVLPZwVHqmj4Jx 6aeO7SDSa6Y9EBsqax8EYS9n8MB67Gl2tRVMhvRKM+Bdy5fkBBIW72BtVuwevJh6orrXC2/ PWGIsjYCGxliLoXtNqRjg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:v1yEok7Aps8=:oJGvh1r5lWw1xJfdrq+xlr Ht9WHwiKNTWEOBrNy/4Bgan/MFdgbYC5OvRhWjdWFE8NWDfmSvAsJT0pdJF3P/eVwu2FApR67 4YCuSWZp2QV7APeU1Tqqej/hmGOQ+1TTef8YZQbVU9tVdq1TC6N8iwQQe74z/6EjKJJXcZJZz 81opv8h8QXywWH8nwCVSDi4BFruWpXuK15bVajIssq//NO0WmnQsDuCT9l86UxzF3UPnZNbQx z8ecfWzUimGTm33Xh7b2GpKEKSSnjbvWTl1NKGOrWMBJN12JzGSS1dk7GSNMGsZw81PYj1i/5 NXslN3720iOd/Qg8/A9UQw0QknFagfOI4FMIlzI/fAfnkeW8LBLi3owHrPz4PDoVjWBXetNDd FS7Uai+RV5dsFQSoUbMxyCAx9C0SNi6h3snLzp6ii88+ePyuDjDN8HNm9Qfon4t29xz1GtMo2 1JRBjAzZPks5cebUx+uOwaJYUzlTqnTxg2uMAhp93SPzLhOUky1+nMgP2DtyHLA2Ywt5hrKge ABKjLB2RnIGpsEev7X0TWm+jpwFGfgKMwpUmU/t22vn89iLI/5upVlGcILlCaMjuCGklDmav9 FoIuKO9SXBk3Et8Rj8wEXzbiymI3/iX3wm Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 8, 2021 at 2:00 PM David Hildenbrand wrote: > > On 08.04.21 13:44, Arnd Bergmann wrote: > > On Thu, Apr 8, 2021 at 1:00 PM David Hildenbrand wrote: > >>> > >>> It is a somewhat awkward way to say "prevent this symbol from > >>> being =y if the dependency is =m". > >> > >> What would be the right thing to do in the case here then to achieve the > >> "if DRMA_ASPEED_GFX is enabled, also enable DMA_CMA id possible"? > >> > >> One approach could be to have for DMA_CMA > >> > >> default y if DRMA_ASPEED_GFX > >> > >> but it feels like the wrong way to tackle this. > > > > I'm still not sure what you are trying to achieve. Is the idea only to provide > > a useful default for DMA_CMA depending on which drivers are enabled? > > "Random drivers should not override a user configuration of core knobs > (e.g., CONFIG_DMA_CMA=n)." > > Let's assume I'm a distribution and want to set CONFIG_CMA=n or want to > set CONFIG_DMA_CMA=n with CONFIG_CMA=y; there is no way to do that with > e.g., DRMA_ASPEED_GFX=y because it will always override my (user!) > setting -- even though it doesn't really always need it. Using "select" > is the problem here. I agree on the part of removing the 'select' if we don't need it. The part I couldn't figure out was what the 'imply' is supposed to help with. Most other users that added imply tried (and failed) to fix a build problem. > > This is something you could do using a hidden helper symbol like > > > > config DRMA_ASPEED_GFX > > bool "Aspeed display driver" > > select DRM_WANT_CMA > > > > config DRM_WANT_CMA > > bool > > help > > Select this from any driver that benefits from CMA being enabled > > > > config DMA_CMA > > bool "Use CMA helpers for DRM" > > default DRM_WANT_CMA > > > > Arnd > > > > That's precisely what I had first, with an additional "WANT_CMA" -- but > looking at the number of such existing options (I was able to spot 1 !) > I wondered if there is a better approach to achieve the same; "imply" > sounded like a good candidate. I can probably find a couple more, but regardless of how many others exist, this would be a much clearer way of doing it than 'imply' since it has none of the ambiguity and misuse problems. I think the reason we don't see more is that generally speaking, those defaults are widely ignored anyway. You almost always start out with a defconfig file that contains everything you know you need, and then you add bits to that. Having the default in any form only helps to make that defconfig file one line shorter, while requiring other users to add another line to turn it off when they do not want it. Arnd