From patchwork Tue Jan 17 18:46:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13105020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91564C677F1 for ; Tue, 17 Jan 2023 19:58:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbjAQT6G (ORCPT ); Tue, 17 Jan 2023 14:58:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbjAQTtO (ORCPT ); Tue, 17 Jan 2023 14:49:14 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8F497497D; Tue, 17 Jan 2023 10:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1673981206; x=1705517206; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iVEJ8ngNMnmubogwgqBceWjbGwsJF2hG5TCwZ0pb0v4=; b=zMHWsay/2eF4eSkIO16Xwuexf+5hK9BGElAD8JeDU8qUAfKUZGmIt4JY Fn8cNpyCM31IItTcP3boCxAJzjGbaNqPZl/W1lDoX7h5le+dQUFPKgWUl oVYy+n9qqu0hUf2WvY3qahNUSWh8bjqwftNfyxmflBrDtiBY+KKR0iL7t g=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 17 Jan 2023 10:46:36 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.45.79.139]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 10:46:36 -0800 Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 17 Jan 2023 10:46:36 -0800 From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Konrad Dybcio CC: Rob Herring , Krzysztof Kozlowski , , , , Andrew Halaney , Manivannan Sadhasivam Subject: [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Date: Tue, 17 Jan 2023 10:46:30 -0800 Message-ID: <20230117184630.2775905-1-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org While booting the CRD, a series of CMA allocation errors can be seen in the kernel log: cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12 Growing the CMA region and querying /proc/meminfo indicates that a newly booted system (currently) uses 64MB CMA. Define a memory region sufficiently large for the current use cases, to avoid forcing users to add this themselves, through command line parameters etc. While fixing the CRD define the same region for the X13s. Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio --- Changes since v1: - Updated commit message arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++ .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 4e92dc28e2ce..6f686377dc3e 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan { regulator-boot-on; }; + + reserved-memory { + linux,cma { + compatible = "shared-dma-pool"; + size = <0x0 0x8000000>; + reusable; + linux,cma-default; + }; + }; }; &apps_rsc { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 55ecbee19a58..8d485e0000cf 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan { regulator-boot-on; }; + reserved-memory { + linux,cma { + compatible = "shared-dma-pool"; + size = <0x0 0x8000000>; + reusable; + linux,cma-default; + }; + }; + thermal-zones { skin-temp-thermal { polling-delay-passive = <250>;