From: "Jason-ch Chen (陳建豪)" <Jason-ch.Chen@mediatek.com>
To: "mathieu.poirier@linaro.org" <mathieu.poirier@linaro.org>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"jason-ch.chen@mediatek.corp-partner.google.com"
<jason-ch.chen@mediatek.corp-partner.google.com>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"andersson@kernel.org" <andersson@kernel.org>
Subject: Re: [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size
Date: Thu, 27 Jun 2024 02:31:16 +0000 [thread overview]
Message-ID: <114254797e6645ce3207c8d49486ad5365cbd245.camel@mediatek.com> (raw)
In-Reply-To: <ZmcrCLOCo0Q0W6AU@p14s>
Hi Mathieu,
Sorry for the late response.
On Mon, 2024-06-10 at 10:34 -0600, Mathieu Poirier wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On Thu, Jun 06, 2024 at 01:00:11PM +0200, AngeloGioacchino Del Regno
> wrote:
> > Il 06/06/24 11:06, jason-ch chen ha scritto:
> > > From: Jason Chen <Jason-ch.Chen@mediatek.com>
> > >
> > > Increase MT8188 SCP core0 DRAM size for HEVC driver.
>
> This is telling me _what_ gets done rather than _why_ it gets done.
>
I will modify the commit message in the next version.
> > >
> >
> > ....so the second core only gets a maximum of 0x200000 of SRAM?
> > I'm not sure how useful is the secondary SCP core, at this point,
> with so little
> > available SRAM but... okay, as you wish.
> >
> > Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> >
> >
> > > Signed-off-by: Jason Chen <Jason-ch.Chen@mediatek.com>
> > > ---
> > > drivers/remoteproc/mtk_scp.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/remoteproc/mtk_scp.c
> b/drivers/remoteproc/mtk_scp.c
> > > index b885a9a041e4..2119fc62c3f2 100644
> > > --- a/drivers/remoteproc/mtk_scp.c
> > > +++ b/drivers/remoteproc/mtk_scp.c
> > > @@ -1390,7 +1390,7 @@ static const struct mtk_scp_sizes_data
> default_scp_sizes = {
> > > };
> > > static const struct mtk_scp_sizes_data mt8188_scp_sizes = {
> > > -.max_dram_size = 0x500000,
> > > +.max_dram_size = 0x800000,
>
> Do you require to fix a "reserved-memory" node in a device tree file
> to account
> for this?
Using a "reserved-memory" node to calculate max_dram_size presents
challenges due to alignment requirements in dma_alloc_coherent().
For example,
static const struct mtk_scp_sizes_data mt8188_scp_c1_sizes = {
.max_dram_size = 0xA00000,
.ipi_share_buffer_size = 600,
};
We require 2560 pages (10M) for SCP core1 usage, but alignment
constraints necessitate searching for a free region of 2^12 pages
(16M). This misalignment between the reserved 10M and the required 16M
prevents successful allocation.
Adjusting the reserved memory to 16M for core1 would lead to a 6M
wastage. To avoid this, reserving a larger memory block is advisable.
This block can be partially used by SCP core1, with the remainder
allocated to feature drivers. Consequently, setting the max_dram_size
in SCP configurations is a practical solution to meet these
requirements.
Thanks,
Jason
>
> Thanks,
> Mathieu
>
> > > .ipi_share_buffer_size = 600,
> > > };
> >
> >
prev parent reply other threads:[~2024-06-27 2:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 9:06 [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size jason-ch chen
2024-06-06 11:00 ` AngeloGioacchino Del Regno
2024-06-10 16:34 ` Mathieu Poirier
2024-06-27 2:31 ` Jason-ch Chen (陳建豪) [this message]
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=114254797e6645ce3207c8d49486ad5365cbd245.camel@mediatek.com \
--to=jason-ch.chen@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=jason-ch.chen@mediatek.corp-partner.google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=matthias.bgg@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).