devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Phil Elwell <phil@raspberrypi.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Eric Anholt <eric@anholt.net>, Stefan Wahren <wahrenst@gmx.net>
Cc: mbrugger@suse.com, 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: Re: [PATCH] ARM: dts: bcm2711: fix soc's node dma-ranges
Date: Fri, 6 Dec 2019 10:13:36 -0800	[thread overview]
Message-ID: <b778e086-378d-9271-6370-7fd4e60ae250@gmail.com> (raw)
In-Reply-To: <e72de603-2ad9-5a3b-109e-8ee14bf3293c@raspberrypi.org>

On 12/6/19 2:16 AM, Phil Elwell wrote:
> Hi Nicolas,
> 
> On 06/12/2019 00:08, Florian Fainelli wrote:
>> On 12/4/19 4:56 AM, Nicolas Saenz Julienne wrote:
>>> 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 <nsaenzjulienne@suse.de>
>>> ---
>>>
>>> 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.
> 
> The 0x3c000000 size was a mistake that arose from c0000000 + 3c000000 =
> fc000000, but that is mixing apples and oranges (actually DMA addresses
> and host physical addresses). Please correct it as you are proposing.

Do you want to add an Acked-by or Reviewed-by tag to make this statement
official?
-- 
Florian

  reply	other threads:[~2019-12-06 18:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 12:56 [PATCH] ARM: dts: bcm2711: fix soc's node dma-ranges Nicolas Saenz Julienne
2019-12-06  0:08 ` Florian Fainelli
2019-12-06 10:16   ` Phil Elwell
2019-12-06 18:13     ` Florian Fainelli [this message]
2019-12-09  9:16       ` Phil Elwell
2019-12-09 18:12 ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b778e086-378d-9271-6370-7fd4e60ae250@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mbrugger@suse.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=phil@raspberrypi.org \
    --cc=robh+dt@kernel.org \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).