Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp411083ybl; Wed, 4 Dec 2019 04:57:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzeGibVYVcnqmAWuUfoXHtyh98jtmSATvrhWzqOQtEwdBipPShzcl7Mj78CIks27gfWRcaA X-Received: by 2002:a05:6808:117:: with SMTP id b23mr2262284oie.8.1575464260968; Wed, 04 Dec 2019 04:57:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575464260; cv=none; d=google.com; s=arc-20160816; b=cFjE8woH1LX2x4ALTzkLP83yBdXK+dFTROHEnhiMf1SNxliVkjFHODGakUwOzUlaoX PCp/r8fh1LcNaxOoYEMIBaFPNd8AOGO3WehSxfGvdr/nHzBOKwOFJ1hyySpSnEGWzqs/ kdseuN4givp1NiCnmZ4NaUPStaLwPbdkpW3XMVdMjqivuXwYydxzj7snWWkbx2FwNPtT U6kED0xb3khiZYtz7Fsy12nDbUmDXAOYTkTxjPhsV9ghDUWMX23MwJ9D7hf7MXI8RW+M gOsu8wRz8CfLEXDLRuPpcbfX0YFdULFdy0DzDEucSium38Z2lPtbUTHBM8jRK8BoG7+c hG0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TgpH7NvXWaoZuBwB+m9RcmY36WdRo3QU7S6K/92e0IA=; b=DpuazK1ypROd66w+Jc11nYZNVKsRubXUqO9Tsm0Pr4gT2FJVUCDPtVbq1tK6rA6SfV RwCwht/+tUuq9/Rs3eInN/aosrFWQ4KQXqwYuNp6E6Ncblee0IMiWPT2YSsQU+VYBoh9 vK1cxsTpca/a/9flK7bEGEHlmn3v0SuOYaWCRdRGpPVb6ogdWHTd/5i20mKBVEri6+X5 tLRYqWStuUu9hMXrnYzcHgC3fkpeiqqI5zjPGtLglGaH/E8YLTb+am6ctWDoaRT0P+05 EaVKWzAAJFNG0VeTzRvlNpfLDP9KTXWLofQgbYZbJcMaU0UlkEr7HBGDJGQ7EvzlyrUq IGJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18si3174777oia.80.2019.12.04.04.57.29; Wed, 04 Dec 2019 04:57:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbfLDM4r (ORCPT + 99 others); Wed, 4 Dec 2019 07:56:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:37462 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726010AbfLDM4q (ORCPT ); Wed, 4 Dec 2019 07:56:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DCDE2B35E; Wed, 4 Dec 2019 12:56:44 +0000 (UTC) From: Nicolas Saenz Julienne To: Rob Herring , Mark Rutland , Eric Anholt , Stefan Wahren , Florian Fanelli Cc: mbrugger@suse.com, phil@raspberrypi.org, Nicolas Saenz Julienne , devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: dts: bcm2711: fix soc's node dma-ranges Date: Wed, 4 Dec 2019 13:56:33 +0100 Message-Id: <20191204125633.27696-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Raspberry Pi's firmware has a feature to select how much memory to reserve for its GPU called 'gpu_mem'. The possible values go from 16MB to 944MB, with a default of 64MB. This memory resides in the topmost part of the lower 1GB memory area and grows bigger expanding towards the begging of memory. It turns out that with low 'gpu_mem' values (16MB and 32MB) the size of the memory available to the system in the lower 1GB area can outgrow the interconnect's dma-range as its size was selected based on the maximum system memory available given the default gpu_mem configuration. This makes that memory slice unavailable for DMA. And may cause nasty kernel warnings if CMA happens to include it. Change soc's dma-ranges to really reflect it's HW limitation, which is being able to only DMA to the lower 1GB area. Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support") Signed-off-by: Nicolas Saenz Julienne --- NOTE: I'd appreciate if someone from the RPi foundation commented on this as it's something that I'll propose to be backported to their tree. arch/arm/boot/dts/bcm2711.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index 5b61cd915f2b..d6a0e350b7b4 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -43,7 +43,7 @@ soc { <0x7c000000 0x0 0xfc000000 0x02000000>, <0x40000000 0x0 0xff800000 0x00800000>; /* Emulate a contiguous 30-bit address range for DMA */ - dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>; + dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>; /* * This node is the provider for the enable-method for -- 2.24.0