From patchwork Thu Apr 8 10:05:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 12190537 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 198AFC433B4 for ; Thu, 8 Apr 2021 10:05:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 971FF61175 for ; Thu, 8 Apr 2021 10:05:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 971FF61175 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2AD936B0080; Thu, 8 Apr 2021 06:05:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 284286B0081; Thu, 8 Apr 2021 06:05:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14BEA6B0082; Thu, 8 Apr 2021 06:05:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id EE1E66B0080 for ; Thu, 8 Apr 2021 06:05:45 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B290D1803F9B2 for ; Thu, 8 Apr 2021 10:05:45 +0000 (UTC) X-FDA: 78008768250.16.2A3D6F8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 69211A0003A4 for ; Thu, 8 Apr 2021 10:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617876344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3hIUGR7T1jq8/KKRgcERVMJAsaJS4XnhJM+Q6zBzCus=; b=Tl7UtTD/Dm2R2xqfJd2VMX6ElhyRcunUAH/h0rhmiJoCwEcKU60neE6K9gUq0twLh39bMb Djpq/5XDJ4poLMq3kAA1ItOft7hbhCoI3U03GEKwyw/Xp3+PE0yaoBk9tEr+977upEWr6K GT4WDcS1cxgj+0Y77KrERcv8i9Jc8oA= 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-270-e2_tv6p3MD6q1cn0ApacPw-1; Thu, 08 Apr 2021 06:05:39 -0400 X-MC-Unique: e2_tv6p3MD6q1cn0ApacPw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4518B107ACCA; Thu, 8 Apr 2021 10:05:37 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-231.ams2.redhat.com [10.36.114.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9E0B1972B; Thu, 8 Apr 2021 10:05:32 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery , Lucas Stach , Russell King , Christian Gmeiner , Mike Rapoport , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Linus Walleij , Michal Simek , Masahiro Yamada , Randy Dunlap , Peter Collingbourne , linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, etnaviv@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v2 1/2] drivers/video/fbdev: don't select DMA_CMA Date: Thu, 8 Apr 2021 12:05:22 +0200 Message-Id: <20210408100523.63356-2-david@redhat.com> In-Reply-To: <20210408100523.63356-1-david@redhat.com> References: <20210408100523.63356-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 69211A0003A4 X-Stat-Signature: t7rmcjze7twmhes93tkfrcrjhnbzzxbh Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf15; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=170.10.133.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617876344-759090 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 DMA_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 or CMA right now. Signed-off-by: David Hildenbrand --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 4f02db65dede..d37cd5341e1b 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -2186,7 +2186,7 @@ config FB_HYPERV select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_DEFERRED_IO - select DMA_CMA if HAVE_DMA_CONTIGUOUS && CMA + imply DMA_CMA help This framebuffer driver supports Microsoft Hyper-V Synthetic Video. From patchwork Thu Apr 8 10:05:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 12190539 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 87815C433ED for ; Thu, 8 Apr 2021 10:05:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C6266115B for ; Thu, 8 Apr 2021 10:05:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C6266115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 964416B0081; Thu, 8 Apr 2021 06:05:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93A3F8D0001; Thu, 8 Apr 2021 06:05:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DB716B0083; Thu, 8 Apr 2021 06:05:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 654376B0081 for ; Thu, 8 Apr 2021 06:05:50 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 30AE5362B for ; Thu, 8 Apr 2021 10:05:50 +0000 (UTC) X-FDA: 78008768460.20.7BD09F0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 33FAE80192EA for ; Thu, 8 Apr 2021 10:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617876349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z9Dj4SFSaVWyR+8NK+rxi5Rn3YTZvnpfh+Q8YuSQZyo=; b=ax0V9V52HsMKwmSN06rOpdAFGZBfBbI/pPENVWlu4g/h8BU2Xmr2xhWhY5E7w8qb3WulyO p94IGTKetOBjohWH68gXsS5lPJaA8p8BGKrGs3qO4lGjeoXHxVvuNpj91ojcDiOpJ1mKRz hHlagqXNLjtQaN5EKCbNb5HfvoP1Nnk= 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-447-OCTmOn1eMs6tx3dNB1cHHg-1; Thu, 08 Apr 2021 06:05:45 -0400 X-MC-Unique: OCTmOn1eMs6tx3dNB1cHHg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D820F6D241; Thu, 8 Apr 2021 10:05:41 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-231.ams2.redhat.com [10.36.114.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9112119D9F; Thu, 8 Apr 2021 10:05:37 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery , Lucas Stach , Russell King , Christian Gmeiner , Mike Rapoport , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Linus Walleij , Michal Simek , Masahiro Yamada , Randy Dunlap , Peter Collingbourne , linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, etnaviv@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v2 2/2] drivers/gpu/drm: don't select DMA_CMA or CMA from aspeed or etnaviv Date: Thu, 8 Apr 2021 12:05:23 +0200 Message-Id: <20210408100523.63356-3-david@redhat.com> In-Reply-To: <20210408100523.63356-1-david@redhat.com> References: <20210408100523.63356-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Rspamd-Queue-Id: 33FAE80192EA X-Stat-Signature: 1xzmcrxh3q5ri1qpxzue6ot1bsdkwdsn X-Rspamd-Server: rspam02 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617876343-391006 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 DMA_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. Signed-off-by: David Hildenbrand --- drivers/gpu/drm/aspeed/Kconfig | 3 +-- drivers/gpu/drm/etnaviv/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/aspeed/Kconfig b/drivers/gpu/drm/aspeed/Kconfig index 5e95bcea43e9..b35bb1aa9b91 100644 --- a/drivers/gpu/drm/aspeed/Kconfig +++ b/drivers/gpu/drm/aspeed/Kconfig @@ -6,9 +6,8 @@ config DRM_ASPEED_GFX depends on MMU select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER - select DMA_CMA if HAVE_DMA_CONTIGUOUS - select CMA if HAVE_DMA_CONTIGUOUS select MFD_SYSCON + imply DMA_CMA help Chose this option if you have an ASPEED AST2500 SOC Display Controller (aka GFX). diff --git a/drivers/gpu/drm/etnaviv/Kconfig b/drivers/gpu/drm/etnaviv/Kconfig index faa7fc68b009..5f5576b7221a 100644 --- a/drivers/gpu/drm/etnaviv/Kconfig +++ b/drivers/gpu/drm/etnaviv/Kconfig @@ -9,9 +9,8 @@ config DRM_ETNAVIV select THERMAL if DRM_ETNAVIV_THERMAL select TMPFS select WANT_DEV_COREDUMP - select CMA if HAVE_DMA_CONTIGUOUS - select DMA_CMA if HAVE_DMA_CONTIGUOUS select DRM_SCHED + imply DMA_CMA help DRM driver for Vivante GPUs.