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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 89459C43461 for ; Thu, 8 Apr 2021 11:38:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37ACF61139 for ; Thu, 8 Apr 2021 11:38:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231152AbhDHLie (ORCPT ); Thu, 8 Apr 2021 07:38:34 -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-Google-Smtp-Source: ABdhPJySG7qOaE9NShNXxHx9QrPK+umWifIaVL7kyUfSfMRMt7h7zvfu4kAyJkMeLpb8wsS1VXGRaA== 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 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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 69755C433B4 for ; Thu, 8 Apr 2021 11:40:12 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EFBC861151 for ; Thu, 8 Apr 2021 11:40:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFBC861151 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZVE6E3X9+ihptkYMKMRKdtLG4JJynOew6G2Fxn1RCLo=; b=l7ziR2u0Tf31LAb8GIqVmLiM3 /rQSwn4NLDPjOSv8nIUNn92SR15ccXcUa9WDhI7+BNzYysHgw4qg/E8ItAv47Nm2Zzh2Hir0Hz5A8 /jdlrnRzOT5355FxaRSp/VObHu+gL+d0RC/2jsIgO7mep0xn5ipZhbqG+yx7xXzLZLTh3ofqAzpfB u8eVnIunSPPDErtAxEJpcy1GFYI+v6DmZEVe2FvDg5JVrgZHZZLl9TfUQTdBvowZdxUAH8yOJ86k4 rNjAGjUSQvP74ZvPhI5e7hmCv4AkelDt3yl2BV1fKuaYiyTyyhN+A9LRf4UIddyztKtMtLi1qpZzG PJWCKWm3A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUSzR-007rfY-NM; Thu, 08 Apr 2021 11:38:26 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUSzN-007rf4-1N for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 11:38:23 +0000 Received: by mail-wr1-x42c.google.com with SMTP id s7so1647389wru.6 for ; Thu, 08 Apr 2021 04:38:20 -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=M5lDJilc/1PP2CJQdWrwEjQ32mmDqFWVVJ45Q5+pwyOKcxHPPPSUmaSBp1SHcDMptP p7N8bY+08mmIIqmVmXVl3QDRBKdU44Zr0cPZ0QHPkYhvCAk0+OWVE8f43D1DEH5dcgW9 4MbURnyqWoz1NGjJbj6/Nmd2sdQJm45dFP2G1ejTLeNzS97nv7J1n0Q9OxCGCns0ecOD vOogYcgNGdr1dfiN4HNLUZiwfXHR/Cdu4OOrvKVqyMcPfzQ4TtQQb4zGFY5osyB32oKp amXpyhJRDxCBEIc23O/HHHf1C/qWnoWHkr9hkUqkfkNgoujSWMxBSyDPYxBleledixb3 jsMA== X-Gm-Message-State: AOAM530v5KqH4nt6hvhjnbwEDB0jfflSM8cNCllNn8Vk/faAbaO66Q/K JGzOdHRgluEV76X4gXI4gmiRhw== X-Google-Smtp-Source: ABdhPJySG7qOaE9NShNXxHx9QrPK+umWifIaVL7kyUfSfMRMt7h7zvfu4kAyJkMeLpb8wsS1VXGRaA== 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-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_123821_265108_551C8530 X-CRM114-Status: GOOD ( 26.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 DABD1C433B4 for ; Thu, 8 Apr 2021 11:38:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FE9361154 for ; Thu, 8 Apr 2021 11:38:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FE9361154 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A31116EAA8; Thu, 8 Apr 2021 11:38:22 +0000 (UTC) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C6796EAA8 for ; Thu, 8 Apr 2021 11:38:21 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id x15so1788722wrq.3 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=EdTjqqRMiX3yYoUHEJzs3X8LASXa7NqHYJqS0X7GLzqrApq6mmW3cFnzZabroZSKhj TskwPiUE1K7GMh15PfbpzLorheHgreppH/YPw1oEa/C6835mj3cMZ/qHIPv5/AZMIpZx dpgr8stHPc38waGTWgglZTk8EtmSsKzhj6FlSGmo+pXEyj3SnKjkrOnNLpfE4m01hpEM vNjYEUquxgKmC1+abzSa7YnG+UYaWZjU/86E7D4dwfLuj4yNJKqU95M3tdRFpCVmnUdP khKjII6Nwdv5kjBQZTXnpYd03/6MSh0yOZlIbS/f11ZnzPgaI3jr1Qzw/A6LPQSlsLCg TbDg== X-Gm-Message-State: AOAM531dTGZIx2dtBTvoKluUkAR8JWOk0wTZDlQPUw9phtMG+Rus4CXK YB1Q8KUKRnRQJj3oJ1T7MXClaQ== X-Google-Smtp-Source: ABdhPJySG7qOaE9NShNXxHx9QrPK+umWifIaVL7kyUfSfMRMt7h7zvfu4kAyJkMeLpb8wsS1VXGRaA== 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 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-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Fbdev development list , linux-aspeed , David Hildenbrand , David Airlie , dri-devel , Linux-MM , Masahiro Yamada , Michal Simek , Joel Stanley , Russell King , Bartlomiej Zolnierkiewicz , The etnaviv authors , Peter Collingbourne , Linux ARM , Andrew Jeffery , Randy Dunlap , Linux Kernel Mailing List , Mike Rapoport Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel