mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Randolph Sapp <rs@ti.com>, Devarsh Thakkar <devarsht@ti.com>,
	<nm@ti.com>, <vigneshr@ti.com>, <kristo@kernel.org>,
	<robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <praneeth@ti.com>, <a-bhatia1@ti.com>, <j-luthra@ti.com>,
	<b-brnich@ti.com>, <detheridge@ti.com>, <p-mantena@ti.com>,
	<vijayp@ti.com>
Subject: Re: [PATCH 0/3] Add global CMA reserve area
Date: Mon, 24 Jun 2024 11:33:42 -0500	[thread overview]
Message-ID: <24c0ed06-3c32-4cc3-922c-4717d35a1112@ti.com> (raw)
In-Reply-To: <D1ZXO8F3XN2I.3CTTE245I0TYY@ti.com>

On 6/14/24 12:58 PM, Randolph Sapp wrote:
> On Thu Jun 13, 2024 at 10:08 AM CDT, Devarsh Thakkar wrote:
>> Add global CMA reserve area for AM62x, AM62A and AM62P SoCs.
>> These SoCs do not have MMU and hence require contiguous memory pool to
>> support various multimedia use-cases.
>>
>> Brandon Brnich (1):
>>    arm64: dts: ti: k3-am62p5-sk: Reserve 576 MiB of global CMA
>>
>> Devarsh Thakkar (2):
>>    arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA
>>    arm64: dts: ti: k3-am62a7-sk: Reserve 576MiB of global CMA
>>
>>   arch/arm64/boot/dts/ti/k3-am62a7-sk.dts        | 9 +++++++++
>>   arch/arm64/boot/dts/ti/k3-am62p5-sk.dts        | 7 +++++++
>>   arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 8 ++++++++
>>   3 files changed, 24 insertions(+)
> 
> I'm still a little torn about putting this allocation into the device tree
> directly as the actual required allocation size depends on the task.
> 

That is the exact reason this does not belong in DT. For everyone *not*
using the most extreme case (12x decodes at the same time), this is
all wasted space. If one is running out of CMA, they can add more on
the kernel cmdline.

> If it's allowed though, this series is fine for introducing those changes. This
> uses the long-tested values we've been using on our tree for a bit now. The only
> thing that's a little worrying is the missing range definitions for devices with
> more than 32bits of addressable memory as Brandon has pointed out. Once that's
> addressed:
> 
> Reviewed-by: Randolph Sapp <rs@ti.com>
> 
> Specifying these regions using the kernel cmdline parameter via u-boot was
> brought up as a potential workaround. This is fine until you get into distro
> boot methods which will almost certainly attempt to override those. I don't
> know. Still a little odd. Curious how the community feels about it.
> 
> Technically the user or distro can still override it with the cmdline parameter
> if necessary, so this may be the best way to have a useful default.
> 

The most useful default is one that doesn't eat 576 MiB of memory "just in case".
Needing that much CMA is the exception case and should be the one that requires
adding something to the kernel cmdline.

If the kernel cmdline option does not work in some cases then we should
fix that instead of hard-coding a workaround here in DT. We are robbing
ourselves of a better solution here.

Andrew

  reply	other threads:[~2024-06-24 16:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 15:08 Devarsh Thakkar
2024-06-13 15:09 ` [PATCH 1/3] arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA Devarsh Thakkar
2024-06-13 15:09 ` [PATCH 2/3] arm64: dts: ti: k3-am62a7-sk: Reserve 576MiB " Devarsh Thakkar
2024-06-14 17:27   ` Brandon Brnich
2024-06-13 15:09 ` [PATCH 3/3] arm64: dts: ti: k3-am62p5-sk: Reserve 576 MiB " Devarsh Thakkar
2024-06-14 17:04   ` Brandon Brnich
2024-06-21 16:14     ` Devarsh Thakkar
2024-06-14 17:58 ` [PATCH 0/3] Add global CMA reserve area Randolph Sapp
2024-06-24 16:33   ` Andrew Davis [this message]
2024-06-28 15:57     ` Devarsh Thakkar
2024-06-28 16:35       ` Randolph Sapp
2024-06-30  7:09         ` Vignesh Raghavendra
2024-07-01 14:33           ` Andrew Davis
2024-07-01 18:26             ` Randolph Sapp
2024-07-05 13:18 ` (subset)[PATCH " Vignesh Raghavendra

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=24c0ed06-3c32-4cc3-922c-4717d35a1112@ti.com \
    --to=afd@ti.com \
    --cc=a-bhatia1@ti.com \
    --cc=b-brnich@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=detheridge@ti.com \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-luthra@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=p-mantena@ti.com \
    --cc=praneeth@ti.com \
    --cc=robh@kernel.org \
    --cc=rs@ti.com \
    --cc=vigneshr@ti.com \
    --cc=vijayp@ti.com \
    /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

all inboxes | Powered by JetHome®