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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 D02FAC43460 for ; Thu, 8 Apr 2021 12:01:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0F8761181 for ; Thu, 8 Apr 2021 12:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbhDHMBj (ORCPT ); Thu, 8 Apr 2021 08:01:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47462 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231372AbhDHMBg (ORCPT ); Thu, 8 Apr 2021 08:01:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617883285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9w9YC3zCV/phM+v6dbwLtZQB2bWMLSUUDF9CJsBj118=; b=SYQQ6b5Ab1oPrYJTG3R7VJEj2KMCrIS76KAJEADW5MVN4rQANjVmXdhErcGbG4z7iEFgwy IdXnoZXf0qnVtMFmPX7uBTjK+PrISvbsFIkXt89lQcdsD2ywGB8u7RiQa7fUPhur6gL8jb FduycXLXb0kAI1NJbqeqIAD5dl97UWs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-ipUMHffwO8qCjSquithB5A-1; Thu, 08 Apr 2021 08:01:20 -0400 X-MC-Unique: ipUMHffwO8qCjSquithB5A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E741F8710FD; Thu, 8 Apr 2021 12:00:54 +0000 (UTC) Received: from [10.36.112.70] (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4480460853; Thu, 8 Apr 2021 12:00:49 +0000 (UTC) Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv To: Arnd Bergmann 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 References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> <7496ac87-9676-1b4e-3444-c2a662ec376b@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <3a2d64a7-8425-8daf-17ee-95b9f0c635f9@redhat.com> Date: Thu, 8 Apr 2021 14:00:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > 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. -- Thanks, David / dhildenb 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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 416CFC433B4 for ; Thu, 8 Apr 2021 12:03:10 +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 CED1661003 for ; Thu, 8 Apr 2021 12:03:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CED1661003 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G7tW4fV6TSvvDQT8IedXaeK871ExM6hASsiYOrfkkkA=; b=oFdH89+fswAE244CfzOLLAoNc N3Ns+bP7U6zDScQyOfFQan7sYZg3isiiRaJJHjkEFYrCMLpZhUQAuF2FmfBBPmZvriBxVhH7LSMbR jYKA3EaKZr209ZlPdbWhK3uCpCqJX1nzKJbBzVcYBEvHWG82huEAfux+EY5cEfCjk9kl2eyQjn5fo GDqIASDrbfKWFdgWu9Z+OwswQ0jN+eWshvwluxdxJENPJr04FaezPqMFaToJ6PMedX7eOsm4o6/H9 TFsb+0+DO9ClB1BLicLrGw7AyyFvt3+Fh9yFdqQQDIeo949DGeG4AIddQH6oFkf+fq6GgEPacFbCQ Jq8qHqmUQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUTLl-007vIc-JM; Thu, 08 Apr 2021 12:01:29 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUTLi-007vIA-2h for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 12:01:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617883285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9w9YC3zCV/phM+v6dbwLtZQB2bWMLSUUDF9CJsBj118=; b=SYQQ6b5Ab1oPrYJTG3R7VJEj2KMCrIS76KAJEADW5MVN4rQANjVmXdhErcGbG4z7iEFgwy IdXnoZXf0qnVtMFmPX7uBTjK+PrISvbsFIkXt89lQcdsD2ywGB8u7RiQa7fUPhur6gL8jb FduycXLXb0kAI1NJbqeqIAD5dl97UWs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-ipUMHffwO8qCjSquithB5A-1; Thu, 08 Apr 2021 08:01:20 -0400 X-MC-Unique: ipUMHffwO8qCjSquithB5A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E741F8710FD; Thu, 8 Apr 2021 12:00:54 +0000 (UTC) Received: from [10.36.112.70] (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4480460853; Thu, 8 Apr 2021 12:00:49 +0000 (UTC) Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv To: Arnd Bergmann 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 References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> <7496ac87-9676-1b4e-3444-c2a662ec376b@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <3a2d64a7-8425-8daf-17ee-95b9f0c635f9@redhat.com> Date: Thu, 8 Apr 2021 14:00:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_130126_403709_09E98186 X-CRM114-Status: GOOD ( 27.67 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > > 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. -- Thanks, David / dhildenb _______________________________________________ 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=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 48459C433ED for ; Thu, 8 Apr 2021 12:01:28 +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 EB07D6115B for ; Thu, 8 Apr 2021 12:01:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB07D6115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 3ECCE6EAC0; Thu, 8 Apr 2021 12:01:27 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD6106EABD for ; Thu, 8 Apr 2021 12:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617883285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9w9YC3zCV/phM+v6dbwLtZQB2bWMLSUUDF9CJsBj118=; b=SYQQ6b5Ab1oPrYJTG3R7VJEj2KMCrIS76KAJEADW5MVN4rQANjVmXdhErcGbG4z7iEFgwy IdXnoZXf0qnVtMFmPX7uBTjK+PrISvbsFIkXt89lQcdsD2ywGB8u7RiQa7fUPhur6gL8jb FduycXLXb0kAI1NJbqeqIAD5dl97UWs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-ipUMHffwO8qCjSquithB5A-1; Thu, 08 Apr 2021 08:01:20 -0400 X-MC-Unique: ipUMHffwO8qCjSquithB5A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E741F8710FD; Thu, 8 Apr 2021 12:00:54 +0000 (UTC) Received: from [10.36.112.70] (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4480460853; Thu, 8 Apr 2021 12:00:49 +0000 (UTC) Subject: Re: [PATCH v1 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv To: Arnd Bergmann References: <20210408092011.52763-1-david@redhat.com> <20210408092011.52763-3-david@redhat.com> <7496ac87-9676-1b4e-3444-c2a662ec376b@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <3a2d64a7-8425-8daf-17ee-95b9f0c635f9@redhat.com> Date: Thu, 8 Apr 2021 14:00:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 ARM , Linux Fbdev development list , linux-aspeed , Bartlomiej Zolnierkiewicz , David Airlie , Andrew Jeffery , Randy Dunlap , The etnaviv authors , Linux Kernel Mailing List , dri-devel , Michal Simek , Linux-MM , Joel Stanley , Russell King , Peter Collingbourne , Masahiro Yamada , Mike Rapoport Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. > > 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. -- Thanks, David / dhildenb _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel