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 D5541C433B4 for ; Fri, 9 Apr 2021 08:37:57 +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 651366102A for ; Fri, 9 Apr 2021 08:37:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 651366102A 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=Gzeto+IpC7xUblwIWTguz1oWwOdjl1/dnf4tKFmrMvM=; b=alL2NgDtSy8ar3aqlKXyvqd3U O1e8xiVxLIBpO7B7A0Mj1SL14z1GJnOFXNdF/3EJ316SnjKPmApuEeTqLhImpyfCvD9upEx+nrzZO EBeaxJS0sb15Dn+As1jn1HZcRoC6WTynUN/iVKbYwOWSQ7rgT+AomniiOqd0acpdKjyZutWhZERLK U3X/t6vm4tAUhVkOeKLBIr0uyFvoxa0KHs2BR1aBis37NE2E6sYGz8/IWGYe4EHOg4ZyxQEBkj3yn rgOx/n1Zc0bBM9eeZr3scyu06VHmtdNuKFLtAGZWD2tT5tK3nvhq3Ne9QleJWBImbbVAG3qJf9dEi pK2SSLQzg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUmb2-00041o-DJ; Fri, 09 Apr 2021 08:34:32 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUmaz-0003sZ-K6 for linux-arm-kernel@desiato.infradead.org; Fri, 09 Apr 2021 08:34:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=0CK2pH4tMSS36srqXiWiXDwOybdtTZO1Syr9BWG62Vc=; b=XzZFiO/nLg3bQQ1yONi7PDAmHK jo2gI5bwU4preHbUx7qPp4C/lJkNrGlpr4ovPOkTGXYY3DOY5N9TVKSXnfvqu3TmSJCWUfo/IkILU YIUbtILmZKzrCgbkjGQR7iQgyMYnjhrWNXGrwAPngLlIkqvk9vgBe49GrG6G3wMTshhkbSmmwNFdP TXN1p/WfdZ1dN84YxmHPk91rCo6Hv17oSt1hN5Ogg/9ICTNvRVTLk56ilAHGKeim+W5ulq6k0Ev3K 5wLCCbxgs2TvkAFMCTrnVhtJN8BdEieSzCkp5qxyfhjHiI6SCgoRAhvARjfnefCT7kc8wFgxFVqn2 KPk6OguA==; Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUmDQ-0001ny-T1 for linux-arm-kernel@lists.infradead.org; Fri, 09 Apr 2021 08:10:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617955803; 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=0CK2pH4tMSS36srqXiWiXDwOybdtTZO1Syr9BWG62Vc=; b=F3ueDW85TNCW2aZdVleOdvrmVdrjdYqaxKHzc0CO4mLwgsCV5auxR2c54clHYUOfZVVoMV 0yNPbcby9tUzJCFWQE81mUxb8otwvU0HujVDZu+meEd/Q2C2JfYBb9bVw2O0jebeH+pzgx SaN/VpP/zhEDI1ekm/KGec2CdwKWvug= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617955803; 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=0CK2pH4tMSS36srqXiWiXDwOybdtTZO1Syr9BWG62Vc=; b=F3ueDW85TNCW2aZdVleOdvrmVdrjdYqaxKHzc0CO4mLwgsCV5auxR2c54clHYUOfZVVoMV 0yNPbcby9tUzJCFWQE81mUxb8otwvU0HujVDZu+meEd/Q2C2JfYBb9bVw2O0jebeH+pzgx SaN/VpP/zhEDI1ekm/KGec2CdwKWvug= 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-586-RZ0ZAZfyOVWdvZcWXExmQA-1; Fri, 09 Apr 2021 04:10:01 -0400 X-MC-Unique: RZ0ZAZfyOVWdvZcWXExmQA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 77CF783DD2E; Fri, 9 Apr 2021 08:09:58 +0000 (UTC) Received: from [10.36.115.11] (ovpn-115-11.ams2.redhat.com [10.36.115.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id E145319811; Fri, 9 Apr 2021 08:09:52 +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: Linus Walleij , Linux Kernel Mailing List , Linux-MM , Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery , Lucas Stach , Russell King , Christian Gmeiner , Mike Rapoport , Bartlomiej Zolnierkiewicz , 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> <3a2d64a7-8425-8daf-17ee-95b9f0c635f9@redhat.com> <2ef3b65c-c0ef-7bbe-0e05-39ee8f2bae48@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Fri, 9 Apr 2021 10:09:51 +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.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_091012_635507_09ED8B11 X-CRM114-Status: GOOD ( 24.41 ) 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 22:29, Arnd Bergmann wrote: > On Thu, Apr 8, 2021 at 6:45 PM David Hildenbrand wrote: >> On 08.04.21 14:49, Linus Walleij wrote: >>> On Thu, Apr 8, 2021 at 2:01 PM David Hildenbrand wrote: >>> >>>>> 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 !) >>> >>> If you do this it probably makes sense to fix a few other drivers >>> Kconfig in the process. It's not just a problem with your driver. >>> "my" drivers: >>> >> >> :) I actually wanted to convert them to "depends on DMA_CMA" but ran >> into recursive dependencies ... >> >>> drivers/gpu/drm/mcde/Kconfig >>> drivers/gpu/drm/pl111/Kconfig >>> drivers/gpu/drm/tve200/Kconfig > > Right, this is the main problem caused by using 'select' to > force-enable symbols that other drivers depend on. > > Usually, the answer is to be consistent about the use of 'select' > and 'depends on', using the former only to enable symbols that > are hidden, while using 'depends on' for anything that is an > actual build time dependency. > >> I was assuming these are "real" dependencies. Will it also work without >> DMA_CMA? > > I think in this case, it is fairly likely to work without DMA_CMA when the > probe function gets called during a fresh boot, but fairly likely to fail if > it gets called after the system has run for long enough to fragment the > free memory. > > The point of DMA_CMA is to make it work reliably. Right, and even at runtime there is no guarantee that DMA_CMA will do anything -- especially if we don't reserve a CMA region (e.g., "cma=X"). So this really sounds like a "desires DMA_CMA" and achieving that via an additional symbol or via "default y if ..." for DMA_CMA sounds reasonable. Thanks! -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel