mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] media: qcom: camss: Interconnect votes for SDM845
@ 2026-11-22  5:13 EMCP333 via B4 Relay
  2026-11-22  5:13 ` [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects EMCP333 via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22  5:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain
  Cc: Bryan O'Donoghue, Mauro Carvalho Chehab, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, linux-media, linux-arm-msm, devicetree,
	linux-kernel, EMCP333

CAMSS on SDM845 declares no interconnect paths, so it never votes for
memory bandwidth and runs on whatever the display happens to hold. With
the display off, capture stalls: on a OnePlus 6T, 8 of 10 1080p
captures stopped after 0-1 frames, against 10 of 10 complete with the
display on.

Patch 1 allows the four paths in the binding, patch 2 gives the driver
a bandwidth table for SDM845, and patch 3 adds the paths to sdm845.dtsi.

Patches 1 and 2 are for the media tree and patch 3 for the Qualcomm
tree. The driver gets a NULL path, and so no votes, from a device tree
without the paths, so patch 2 is safe on its own; patch 3 needs patch
1 for dtbs_check.

Tested on the phone with 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 while streaming and not when idle. On
v7.4-rc2, dt_binding_check and dtbs_check are clean and camss builds
with W=1 and no warnings.

The same three commits also ran on v7.4-rc3: with the display off, 10
of 10 captures of 100 frames, no camss errors, and the camss bandwidth
requests go from zero to non-zero while streaming and back to zero
after.

---
EMCP333 (3):
      dt-bindings: media: qcom,sdm845-camss: Add interconnects
      media: qcom: camss: Vote interconnect bandwidth on SDM845
      arm64: dts: qcom: sdm845: Add CAMSS interconnects

 .../bindings/media/qcom,sdm845-camss.yaml          | 20 +++++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845.dtsi               | 10 +++++++++
 drivers/media/platform/qcom/camss/camss.c          | 26 ++++++++++++++++++++++
 3 files changed, 56 insertions(+)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261122-b4-camss-sdm845-icc-1d4cd8c3ec17

Best regards,
--  
EMCP333 <emcp@enser.io>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects
  2026-11-22  5:13 [PATCH 0/3] media: qcom: camss: Interconnect votes for SDM845 EMCP333 via B4 Relay
@ 2026-11-22  5:13 ` EMCP333 via B4 Relay
  2026-11-22 12:15   ` Bryan O'Donoghue
  2026-11-22  5:13 ` [PATCH 2/3] media: qcom: camss: Vote interconnect bandwidth on SDM845 EMCP333 via B4 Relay
  2026-11-22  5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845: Add CAMSS interconnects EMCP333 via B4 Relay
  2 siblings, 1 reply; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22  5:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain
  Cc: Bryan O'Donoghue, Mauro Carvalho Chehab, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, linux-media, linux-arm-msm, devicetree,
	linux-kernel, EMCP333

From: EMCP333 <emcp@enser.io>

CAMSS on SDM845 reaches DDR through two camnoc HF ports and one SF
port, and its registers through the config NoC. Describe the four
paths, named as in the sm6150 binding, which has the same two HF ports.

They are optional, so existing device trees stay valid. The driver
votes on them where they are present.

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@enser.io>
---
 .../devicetree/bindings/media/qcom,sdm845-camss.yaml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
index be09cf3a3b..8c87ecd406 100644
--- a/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
@@ -76,6 +76,16 @@ properties:
       - const: vfe1
       - const: vfe_lite
 
+  interconnects:
+    maxItems: 4
+
+  interconnect-names:
+    items:
+      - const: ahb
+      - const: hf_0
+      - const: hf_1
+      - const: sf_mnoc
+
   iommus:
     maxItems: 4
 
@@ -233,6 +243,7 @@ examples:
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/qcom,camcc-sdm845.h>
     #include <dt-bindings/clock/qcom,gcc-sdm845.h>
+    #include <dt-bindings/interconnect/qcom,sdm845.h>
 
     soc {
       #address-cells = <2>;
@@ -337,6 +348,15 @@ examples:
           "vfe1",
           "vfe_lite";
 
+        interconnects = <&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_CAMERA_CFG 0>,
+          <&mmss_noc MASTER_CAMNOC_HF0 0 &mem_noc SLAVE_EBI1 0>,
+          <&mmss_noc MASTER_CAMNOC_HF1 0 &mem_noc SLAVE_EBI1 0>,
+          <&mmss_noc MASTER_CAMNOC_SF 0 &mem_noc SLAVE_EBI1 0>;
+        interconnect-names = "ahb",
+          "hf_0",
+          "hf_1",
+          "sf_mnoc";
+
         iommus = <&apps_smmu 0x0808 0x0>,
           <&apps_smmu 0x0810 0x8>,
           <&apps_smmu 0x0c08 0x0>,

-- 
2.47.3



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] media: qcom: camss: Vote interconnect bandwidth on SDM845
  2026-11-22  5:13 [PATCH 0/3] media: qcom: camss: Interconnect votes for SDM845 EMCP333 via B4 Relay
  2026-11-22  5:13 ` [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects EMCP333 via B4 Relay
@ 2026-11-22  5:13 ` EMCP333 via B4 Relay
  2026-11-22  5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845: Add CAMSS interconnects EMCP333 via B4 Relay
  2 siblings, 0 replies; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22  5:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain
  Cc: Bryan O'Donoghue, Mauro Carvalho Chehab, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, linux-media, linux-arm-msm, devicetree,
	linux-kernel, EMCP333

From: EMCP333 <emcp@enser.io>

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@enser.io>
---
 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] arm64: dts: qcom: sdm845: Add CAMSS interconnects
  2026-11-22  5:13 [PATCH 0/3] media: qcom: camss: Interconnect votes for SDM845 EMCP333 via B4 Relay
  2026-11-22  5:13 ` [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects EMCP333 via B4 Relay
  2026-11-22  5:13 ` [PATCH 2/3] media: qcom: camss: Vote interconnect bandwidth on SDM845 EMCP333 via B4 Relay
@ 2026-11-22  5:13 ` EMCP333 via B4 Relay
  2026-11-22 12:31   ` Bryan O'Donoghue
  2 siblings, 1 reply; 6+ messages in thread
From: EMCP333 via B4 Relay @ 2026-11-22  5:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain
  Cc: Bryan O'Donoghue, Mauro Carvalho Chehab, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, linux-media, linux-arm-msm, devicetree,
	linux-kernel, EMCP333

From: EMCP333 <emcp@enser.io>

Give CAMSS its four interconnect paths: the AHB config path, and the two
camnoc HF ports plus the SF port into DDR. Without them CAMSS has no
bandwidth votes of its own, and capture stalls when the display is off.

Tested on a OnePlus 6T: with the display off, 10 of 10 1080p captures of
100 frames complete, with CAMSS voting on both HF ports while streaming.

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@enser.io>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 844b840bc5..4710556324 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4518,6 +4518,16 @@ camss: camss@acb3000 {
 				"vfe_lite_cphy_rx",
 				"vfe_lite_src";
 
+			interconnects = <&gladiator_noc MASTER_APPSS_PROC 0
+					 &config_noc SLAVE_CAMERA_CFG 0>,
+					<&mmss_noc MASTER_CAMNOC_HF0 0 &mem_noc SLAVE_EBI1 0>,
+					<&mmss_noc MASTER_CAMNOC_HF1 0 &mem_noc SLAVE_EBI1 0>,
+					<&mmss_noc MASTER_CAMNOC_SF 0 &mem_noc SLAVE_EBI1 0>;
+			interconnect-names = "ahb",
+					     "hf_0",
+					     "hf_1",
+					     "sf_mnoc";
+
 			iommus = <&apps_smmu 0x0808 0x0>,
 				 <&apps_smmu 0x0810 0x8>,
 				 <&apps_smmu 0x0c08 0x0>,

-- 
2.47.3



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects
  2026-11-22  5:13 ` [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects EMCP333 via B4 Relay
@ 2026-11-22 12:15   ` Bryan O'Donoghue
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2026-11-22 12:15 UTC (permalink / raw)
  To: emcp, Vladimir Zapolskiy, Loic Poulain
  Cc: Bryan O'Donoghue, Mauro Carvalho Chehab, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, linux-media, linux-arm-msm, devicetree,
	linux-kernel

On 22/11/2026 05:13, EMCP333 via B4 Relay wrote:
> From: EMCP333 <emcp@enser.io>
> 
> CAMSS on SDM845 reaches DDR through two camnoc HF ports and one SF
> port, and its registers through the config NoC. Describe the four
> paths, named as in the sm6150 binding, which has the same two HF ports.
> 
> They are optional, so existing device trees stay valid. The driver
> votes on them where they are present.
> 
> 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@enser.io>
> ---
>   .../devicetree/bindings/media/qcom,sdm845-camss.yaml | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
> index be09cf3a3b..8c87ecd406 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
> @@ -76,6 +76,16 @@ properties:
>         - const: vfe1
>         - const: vfe_lite
> 
> +  interconnects:
> +    maxItems: 4
> +
> +  interconnect-names:
> +    items:
> +      - const: ahb
> +      - const: hf_0
> +      - const: hf_1
> +      - const: sf_mnoc
> +
>     iommus:
>       maxItems: 4
> 
> @@ -233,6 +243,7 @@ examples:
>       #include <dt-bindings/interrupt-controller/arm-gic.h>
>       #include <dt-bindings/clock/qcom,camcc-sdm845.h>
>       #include <dt-bindings/clock/qcom,gcc-sdm845.h>
> +    #include <dt-bindings/interconnect/qcom,sdm845.h>
> 
>       soc {
>         #address-cells = <2>;
> @@ -337,6 +348,15 @@ examples:
>             "vfe1",
>             "vfe_lite";
> 
> +        interconnects = <&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_CAMERA_CFG 0>,
> +          <&mmss_noc MASTER_CAMNOC_HF0 0 &mem_noc SLAVE_EBI1 0>,
> +          <&mmss_noc MASTER_CAMNOC_HF1 0 &mem_noc SLAVE_EBI1 0>,
> +          <&mmss_noc MASTER_CAMNOC_SF 0 &mem_noc SLAVE_EBI1 0>;

Ah come on. "The LLM made this and I reviewed it" but this is what 
sm6150 upstream looks like:


             interconnects = <&gem_noc MASTER_APPSS_PROC 
QCOM_ICC_TAG_ACTIVE_ONLY
                              &config_noc SLAVE_CAMERA_CFG 
QCOM_ICC_TAG_ACTIVE_ONLY>,
                             <&mmss_noc MASTER_CAMNOC_HF0 
QCOM_ICC_TAG_ALWAYS
                              &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
                             <&mmss_noc MASTER_CAMNOC_HF1 
QCOM_ICC_TAG_ALWAYS
                              &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
                             <&mmss_noc MASTER_CAMNOC_SF QCOM_ICC_TAG_ALWAYS
                              &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
             interconnect-names = "ahb",
                                  "hf_0",
                                  "hf_1",
                                  "sf_mnoc";

Please _actually_ review it, the patchlog even calls out the source yaml 
used as reference.

> +        interconnect-names = "ahb",
> +          "hf_0",
> +          "hf_1",
> +          "sf_mnoc";
> +
>           iommus = <&apps_smmu 0x0808 0x0>,
>             <&apps_smmu 0x0810 0x8>,
>             <&apps_smmu 0x0c08 0x0>,
> 
> --
> 2.47.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: sdm845: Add CAMSS interconnects
  2026-11-22  5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845: Add CAMSS interconnects EMCP333 via B4 Relay
@ 2026-11-22 12:31   ` Bryan O'Donoghue
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2026-11-22 12:31 UTC (permalink / raw)
  To: emcp, Vladimir Zapolskiy, Loic Poulain
  Cc: Bryan O'Donoghue, Mauro Carvalho Chehab, Robert Foss,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, linux-media, linux-arm-msm, devicetree,
	linux-kernel

On 22/11/2026 05:13, EMCP333 via B4 Relay wrote:
> +			interconnects = <&gladiator_noc MASTER_APPSS_PROC 0
> +					 &config_noc SLAVE_CAMERA_CFG 0>,
> +					<&mmss_noc MASTER_CAMNOC_HF0 0 &mem_noc SLAVE_EBI1 0>,
> +					<&mmss_noc MASTER_CAMNOC_HF1 0 &mem_noc SLAVE_EBI1 0>,
> +					<&mmss_noc MASTER_CAMNOC_SF 0 &mem_noc SLAVE_EBI1 0>;
> +			interconnect-names = "ahb",
> +					     "hf_0",
> +					     "hf_1",
> +					     "sf_mnoc";
> +

Same thing use the defines not the integers.

---
bod

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-22 12:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22  5:13 [PATCH 0/3] media: qcom: camss: Interconnect votes for SDM845 EMCP333 via B4 Relay
2026-11-22  5:13 ` [PATCH 1/3] dt-bindings: media: qcom,sdm845-camss: Add interconnects EMCP333 via B4 Relay
2026-11-22 12:15   ` Bryan O'Donoghue
2026-11-22  5:13 ` [PATCH 2/3] media: qcom: camss: Vote interconnect bandwidth on SDM845 EMCP333 via B4 Relay
2026-11-22  5:13 ` [PATCH 3/3] arm64: dts: qcom: sdm845: Add CAMSS interconnects EMCP333 via B4 Relay
2026-11-22 12:31   ` Bryan O'Donoghue

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®