[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240710084200.6561-1-shun-yi.wang@mediatek.com>
Date: Wed, 10 Jul 2024 16:41:59 +0800
From: Shun-yi Wang <shun-yi.wang@...iatek.com>
To: Bjorn Andersson <andersson@...nel.org>, Mathieu Poirier
<mathieu.poirier@...aro.org>
CC: Matthias Brugger <matthias.bgg@...il.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
<linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
<jason-ch.chen@...iatek.com>, <yaya.chang@...iatek.com>,
<teddy.chen@...iatek.com>, shun-yi.wang <shun-yi.wang@...iatek.com>
Subject: [PATCH RFC 0/1] Support CMA regions
From: "shun-yi.wang" <shun-yi.wang@...iatek.com>
In order to reserve specific Contiguous Memory Allocator (CMA) regions
for hardware use. When the name of the reserved region contains "cma",
then a corresponding CMA heap is added.
In the DTS (Device Tree Source), we may have several memory regions
with different names, e.g.,
&scp {
...
memory-region = <&mem_reserved_1>, <&mem_reserved_2>;
};
mem_reserved_1: xxx-xxx-region {
...
};
mem_reserved_2: xxx-xxx-cma-region {
...
};
When the name of the region contains "cma", a corresponding heap
allocator is added by cma_heap_add().
However, we are unsure if using the name "cma" as an identifier
is a good practice.
I sincerely hope that you can provide me some suggestions, thanks.
Especially within the segment of '#ifdef CONFIG_DMA_BUF_HEAPS_CMA'
Note: The cma_heap_add() is introduced from this patch:
dma-buf: heaps: Introduce cma_heap_add() for non-default CMA heap
shun-yi.wang (1):
remoteproc: mediatek: Support reserved CMA regions
drivers/remoteproc/mtk_scp.c | 38 ++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)
--
2.18.0
Powered by blists - more mailing lists