public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] media: camss: Link CAMSS power domain on MSM8996
@ 2023-05-26 18:07 Yassine Oudjana
  2023-05-26 18:07 ` [PATCH v2 1/3] dt-bindings: media: camss: qcom,msm8996-camss: Add CAMSS power domain Yassine Oudjana
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Yassine Oudjana @ 2023-05-26 18:07 UTC (permalink / raw)
  To: Robert Foss, Todor Tomov, Bryan O'Donoghue, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Mauro Carvalho Chehab,
	Rob Herring, Krzysztof Kozlowski, Hans Verkuil
  Cc: Yassine Oudjana, Yassine Oudjana, Vladimir Zapolskiy, linux-media,
	linux-arm-msm, devicetree, linux-kernel

From: Yassine Oudjana <y.oudjana@protonmail.com>

CAMSS on MSM8996 has been broken since commit
46cc03175498 ("media: camss: Split power domain management").
This would happen when trying to start streaming:

[  199.097810] ------------[ cut here ]------------
[  199.097893] camss_top_ahb_clk status stuck at 'off'
[  199.097913] WARNING: CPU: 3 PID: 728 at drivers/clk/qcom/clk-branch.c:91 clk_branch_wait+0x140/0x160
...
[  199.100064]  clk_branch_wait+0x140/0x160
[  199.100112]  clk_branch2_enable+0x30/0x40
[  199.100159]  clk_core_enable+0x6c/0xb0
[  199.100211]  clk_enable+0x2c/0x50
[  199.100257]  camss_enable_clocks+0x94/0xe0 [qcom_camss]
[  199.100342]  csiphy_set_power+0x154/0x2a0 [qcom_camss]
...
[  199.101594] ---[ end trace 0000000000000000 ]---
[  199.101736] qcom-camss a34000.camss: clock enable failed: -16
[  199.101813] qcom-camss a34000.camss: Failed to power up pipeline: -16

Turns out camss_top_ahb_clk needs the CAMSS power domain to be on. Before
the change, VFE power domains were enabled before CSIPHY enabled clocks,
and since the CAMSS power domain was their parent, it got enabled as well.
With the VFE power domains now enabled after CSIPHY is powered on, the
CAMSS power domain remains off and things go south when CSIPHY tries to
enable camss_top_ahb_clk.

Link the CAMSS power domain in camss_configure_pd to make sure it gets
enabled before CSIPHY tries to enable clocks.

Changes since v1:
  - Wrap commit messages at 75 lines.
  - Remove duplicate "media" from and shorten the subject of the first
    patch.
  - Expand the commit message of the second patch.
  - Fix "Fixes" tag in the third patch as well as other commit references.

Yassine Oudjana (3):
  dt-bindings: media: camss: qcom,msm8996-camss: Add CAMSS power domain
  arm64: dts: qcom: msm8996: Add CAMSS power domain and
    power-domain-names to CAMSS
  media: camss: Link CAMSS power domain

 .../bindings/media/qcom,msm8996-camss.yaml          | 13 ++++++++++++-
 arch/arm64/boot/dts/qcom/msm8996.dtsi               |  4 +++-
 drivers/media/platform/qcom/camss/camss.c           |  9 ++++++++-
 3 files changed, 23 insertions(+), 3 deletions(-)

-- 
2.40.1


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

end of thread, other threads:[~2026-03-29 13:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-26 18:07 [PATCH v2 0/3] media: camss: Link CAMSS power domain on MSM8996 Yassine Oudjana
2023-05-26 18:07 ` [PATCH v2 1/3] dt-bindings: media: camss: qcom,msm8996-camss: Add CAMSS power domain Yassine Oudjana
2023-05-26 19:46   ` Conor Dooley
2023-05-26 20:05     ` Bryan O'Donoghue
2023-05-26 20:19       ` Conor Dooley
2023-05-26 20:21         ` Bryan O'Donoghue
2023-05-26 20:36           ` Konrad Dybcio
2023-05-26 20:40             ` Bryan O'Donoghue
2023-05-26 20:43               ` Konrad Dybcio
2023-05-26 20:47                 ` Bryan O'Donoghue
2023-05-27  6:05             ` Yassine Oudjana
2023-05-27 15:52               ` Konrad Dybcio
2023-05-26 18:07 ` [PATCH v2 2/3] arm64: dts: qcom: msm8996: Add CAMSS power domain and power-domain-names to CAMSS Yassine Oudjana
2023-05-26 18:07 ` [PATCH v2 3/3] media: camss: Link CAMSS power domain Yassine Oudjana
2023-05-26 20:49   ` Bryan O'Donoghue
2023-05-26 20:57     ` Konrad Dybcio
2023-05-26 21:17       ` Bryan O'Donoghue
2023-05-26 21:28         ` Konrad Dybcio
2023-05-26 21:38           ` Bryan O'Donoghue
2023-05-27  6:02     ` Yassine Oudjana
2023-05-27 11:13       ` Bryan O'Donoghue
2023-05-26 20:57   ` Bryan O'Donoghue
2026-03-29 13:00 ` [PATCH v2 0/3] media: camss: Link CAMSS power domain on MSM8996 Christopher Obbard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox