* [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size @ 2024-06-06 9:06 jason-ch chen 2024-06-06 11:00 ` AngeloGioacchino Del Regno 0 siblings, 1 reply; 4+ messages in thread From: jason-ch chen @ 2024-06-06 9:06 UTC (permalink / raw) To: Bjorn Andersson, Mathieu Poirier, Matthias Brugger, AngeloGioacchino Del Regno Cc: Project_Global_Chrome_Upstream_Group, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, Jason Chen From: Jason Chen <Jason-ch.Chen@mediatek.com> Increase MT8188 SCP core0 DRAM size for HEVC driver. 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, .ipi_share_buffer_size = 600, }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size 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 0 siblings, 1 reply; 4+ messages in thread From: AngeloGioacchino Del Regno @ 2024-06-06 11:00 UTC (permalink / raw) To: jason-ch chen, Bjorn Andersson, Mathieu Poirier, Matthias Brugger Cc: Project_Global_Chrome_Upstream_Group, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, Jason Chen 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. > ....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, > .ipi_share_buffer_size = 600, > }; > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size 2024-06-06 11:00 ` AngeloGioacchino Del Regno @ 2024-06-10 16:34 ` Mathieu Poirier 2024-06-27 2:31 ` Jason-ch Chen (陳建豪) 0 siblings, 1 reply; 4+ messages in thread From: Mathieu Poirier @ 2024-06-10 16:34 UTC (permalink / raw) To: AngeloGioacchino Del Regno Cc: jason-ch chen, Bjorn Andersson, Matthias Brugger, Project_Global_Chrome_Upstream_Group, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, Jason Chen 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. > > > > ....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? Thanks, Mathieu > > .ipi_share_buffer_size = 600, > > }; > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] remoteproc: mediatek: Increase MT8188 SCP core0 DRAM size 2024-06-10 16:34 ` Mathieu Poirier @ 2024-06-27 2:31 ` Jason-ch Chen (陳建豪) 0 siblings, 0 replies; 4+ messages in thread From: Jason-ch Chen (陳建豪) @ 2024-06-27 2:31 UTC (permalink / raw) To: mathieu.poirier@linaro.org, angelogioacchino.delregno@collabora.com Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-remoteproc@vger.kernel.org, jason-ch.chen@mediatek.corp-partner.google.com, Project_Global_Chrome_Upstream_Group, linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com, andersson@kernel.org 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, > > > }; > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-27 2:31 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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).