Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp352293pxf; Thu, 8 Apr 2021 04:39:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaDxs/+U4ughh5s33Uqc76zCbaCox89YuC7Q57ADQlS8IP9fNwkopt3+3qOCKwjwtRKDn5 X-Received: by 2002:a17:906:ff46:: with SMTP id zo6mr9786831ejb.123.1617881982299; Thu, 08 Apr 2021 04:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617881982; cv=none; d=google.com; s=arc-20160816; b=OQQ9pQEBMYJLhsMjpOEoWwGeKetx6wfoQoDUuFuTTfM0txTWqq+ROS//I6AibTc/pr Syg5dxfRzetKBVral4OJiGGnBElhR38Wi3U1FZv4QCmLBTs2MuTXw6kNd8lLcc9sQvTo loPu295E+zFkIoU4DC10Sq2ljXYAGRJF2nNt5zmsmKwNxIe59hFO7AAhv7KAPXydTS1G xsar1UGVOJfFwgpfJkcHnUamqWSBXoE6NEqDCLuOv5v1QTsxQJwu3xNheoSlbQ8UYbXu Tc4NbS6QPxiPiBmSSsVz9RBmI+oaxdGCJzNcQcv1TMKIBK43t6GmrSDQnM76iwLllDAs 0QEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=HNjO0LstTaF0YJ+tzxAFP4Syvm5fGCE8nxebVcvJLjU=; b=0Mnwo5nwk5TSENDMi83z5sqh5JM8rvAnPbNx7uiV8UX0aquP1aHEvM8OytEv6Udzcv VZWfYWCkH5NOhsQd4LWFeYZF1/KCaZ8hHaXXuMLKxzkZQhME5oNzPahd22r+VoiQaQTl ysQCWd5nsYGP8CU6Kp1bNpwUMa/RUqOaiAZbx+DGF2CygRjHwHGwcf4kN0TSBFsAuQKk PJt+SoJcJgYHHDK7zj3lQQaWyRfQveOh22nJRhffWt88GlOxVeF5xAzPG5yk29Te9Zvp +KRsUgdbuud4MrUMA4xEv6yHtTitXp+C1zLaUB4qLXjZ+QpEEV6KMDRu+4ZhGZjsFUDZ yNtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=eS60djC9; 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 hs11si26598745ejc.561.2021.04.08.04.39.19; Thu, 08 Apr 2021 04:39:42 -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; dkim=pass header.i=@ffwll.ch header.s=google header.b=eS60djC9; 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 S230443AbhDHLid (ORCPT + 99 others); Thu, 8 Apr 2021 07:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbhDHLid (ORCPT ); Thu, 8 Apr 2021 07:38:33 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E74C061761 for ; Thu, 8 Apr 2021 04:38:21 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id x7so1758589wrw.10 for ; Thu, 08 Apr 2021 04:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=HNjO0LstTaF0YJ+tzxAFP4Syvm5fGCE8nxebVcvJLjU=; b=eS60djC9Lqi8q7fWOXC+yuTwdoDdp/fK2d8XmHmBdVmsTRb7l+NFwK+960b7+jwa0f FmsY22x6AYJ4yv6tWLC7INl0trTXzlztAcd+b0jK6akV35kkzli/s4AEGxnp0E9T3Hzm WeCrdaOppkgKGi6FkMG4W1g5pPS3g8Esg94hM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=HNjO0LstTaF0YJ+tzxAFP4Syvm5fGCE8nxebVcvJLjU=; b=X8o98sRy0rYuJ99tA23iRHrStvkKX5Rwnvcx87o33n+2qokZjJBJjSPLGWRESFb7Kj H54Tj54meqxp08C8SI2iiaD7IMdCBy4UN96rmk9NEK5ulNWaJbrqqUDDUYLeryGtj9EK xxj6q5FOlXztpvrGLulo0dfVmnMtWPtCBCX2tzqhHsj01ecNe9264vCCSgCJntO2F2D4 5lO3TyjadG5AvSsIlEEuzxfp7VpgUcDOm+U7jDUWenm/jo5TKZCj3+Zn+RBN5LDePqj3 7lqn1HlIlhXi5Xysi4Ldb99RSYFZf4RI0hsehtcTpljt8nXjMdJw55rJdJQcOAG3lX7h IGvA== X-Gm-Message-State: AOAM532KfgZBCxm5HGBW06qbiLeYpULclSKyxsa+gBurRQgOF7m+qhRc HKtI4n4z33ox9PGtI7o6anuZuA== X-Received: by 2002:a5d:6d0f:: with SMTP id e15mr9348009wrq.218.1617881900156; Thu, 08 Apr 2021 04:38:20 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n5sm24657875wrp.50.2021.04.08.04.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 04:38:19 -0700 (PDT) Date: Thu, 8 Apr 2021 13:38:17 +0200 From: Daniel Vetter To: Arnd Bergmann Cc: David Hildenbrand , 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 Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv Message-ID: Mail-Followup-To: Arnd Bergmann , David Hildenbrand , Linux Kernel Mailing List , Linux-MM , Joel Stanley , David Airlie , 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 References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 08, 2021 at 12:20:50PM +0200, 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. > > In particular, it does not prevent a configuration with 'DRM_CMA=m' > and 'DRMA_ASPEED_GFX=y', or any build failures from such > a configuration. > > If you want this kind of soft dependency, you need > 'depends on DRM_CMA || !DRM_CMA'. The problem is that depends on is a real pain for users to find their drivers. This is why we have a ton of select, because the kconfig ui tends to suck. If you want to change this, we need automatic conflict resolution like apt and other package managers have, with suggestions how to fix the config if you want to enable a driver, but some of its requirements are missing. The current approach of hiding driver symbols complete if any of their dependencies are off is really not great. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch