[PATCH 2/3] media: qcom: camss: Vote interconnect bandwidth on SDM845
From: EMCP333 via B4 Relay
Date: Sun Nov 22 2026 - 00:13:57 EST
From: EMCP333 <emcp@xxxxxxxx>
sdm845_resources has no icc_res, so on SDM845 CAMSS never votes for
memory bandwidth: while streaming, the camnoc HF and SF masters show no
votes in interconnect_summary. They get whatever another client holds
on the same mmss_noc to mem_noc path, in practice the display, and with
the display off capture stalls.
On a OnePlus 6T (imx519, 1920x1080 RAW10 into the simple pipeline), ten
100-frame captures each:
display on: 10 of 10 runs complete
display off: 2 of 10 complete, 8 stall at 0-1 frames
Add a table with the sm8250 values for the AHB, HF and SF paths, plus
the second HF port that SDM845 splits its two full VFEs across. As on
the other SoCs, the votes are applied at runtime resume and dropped at
runtime suspend. A device tree without the interconnects gets no votes,
as before.
Tested on a OnePlus 6T with this change on the postmarketOS sdm845
kernel (6.18): with the display off, 10 of 10 1080p captures of 100
frames complete, and the camnoc HF ports vote 2 GB/s while streaming
and nothing when idle.
The code and this changelog were prepared with the help of an AI coding
assistant. The submitter has reviewed both and takes responsibility for
them.
Signed-off-by: EMCP333 <emcp@xxxxxxxx>
---
drivers/media/platform/qcom/camss/camss.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index f8e5cf9f3f..0ed497b7b6 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -2219,6 +2219,30 @@ static const struct camss_subdev_resources vfe_res_8250[] = {
},
};
+static const struct resources_icc icc_res_845[] = {
+ /* Same values as sm8250, plus the second HF port SDM845 splits its VFEs across */
+ {
+ .name = "ahb",
+ .icc_bw_tbl.avg = 38400,
+ .icc_bw_tbl.peak = 76800,
+ },
+ {
+ .name = "hf_0",
+ .icc_bw_tbl.avg = 2097152,
+ .icc_bw_tbl.peak = 2097152,
+ },
+ {
+ .name = "hf_1",
+ .icc_bw_tbl.avg = 2097152,
+ .icc_bw_tbl.peak = 2097152,
+ },
+ {
+ .name = "sf_mnoc",
+ .icc_bw_tbl.avg = 0,
+ .icc_bw_tbl.peak = 2097152,
+ },
+};
+
static const struct resources_icc icc_res_sm8250[] = {
{
.name = "cam_ahb",
@@ -5690,6 +5714,8 @@ static const struct camss_resources sdm845_resources = {
.csiphy_res = csiphy_res_845,
.csid_res = csid_res_845,
.vfe_res = vfe_res_845,
+ .icc_res = icc_res_845,
+ .icc_path_num = ARRAY_SIZE(icc_res_845),
.csiphy_num = ARRAY_SIZE(csiphy_res_845),
.csid_num = ARRAY_SIZE(csid_res_845),
.vfe_num = ARRAY_SIZE(vfe_res_845),
--
2.47.3