lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230503072543.4837-1-y.oudjana@protonmail.com>
Date:   Wed,  3 May 2023 10:25:40 +0300
From:   Yassine Oudjana <yassine.oudjana@...il.com>
To:     Robert Foss <rfoss@...nel.org>, Todor Tomov <todor.too@...il.com>,
        "Bryan O'Donoghue" <bryan.odonoghue@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Hans Verkuil <hansverk@...co.com>
Cc:     Yassine Oudjana <y.oudjana@...tonmail.com>,
        Yassine Oudjana <yassine.oudjana@...il.com>,
        Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>,
        linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 0/3] media: camss: Link CAMSS power domain on MSM8996

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

CAMSS on MSM8996 has been broken since commit
46cc03175498 (media: camss: Split power domain management, 2022-07-04).

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.

Yassine Oudjana (3):
  media: dt-bindings: media: camss: qcom,msm8996-camss: Add CAMSS power
    domain and power-domain-names
  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.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ