From: Jeffrey Hugo <quic_jhugo@quicinc.com>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@somainline.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
Imran Khan <kimran@codeaurora.org>,
"Rajendra Nayak" <quic_rjendra@quicinc.com>,
Joonwoo Park <joonwoop@codeaurora.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"Joerg Roedel" <joro@8bytes.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Jami Kettunen <jami.kettunen@somainline.org>,
<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <iommu@lists.linux.dev>
Subject: Re: [PATCH v3 5/6] clk: qcom: mmcc-msm8998: Fix the SMMU GDSC
Date: Thu, 10 Aug 2023 13:50:16 -0600 [thread overview]
Message-ID: <fcf9fb85-0e78-21db-ee73-aee5193f37ce@quicinc.com> (raw)
In-Reply-To: <868ee2b6-3b48-4d32-9614-fa9b3e057257@linaro.org>
On 8/10/2023 12:46 PM, Konrad Dybcio wrote:
> On 10.08.2023 20:20, Jeffrey Hugo wrote:
>> On 8/9/2023 1:20 PM, Konrad Dybcio wrote:
>>> The SMMU GDSC doesn't have to be ALWAYS-ON and shouldn't feature the
>>> HW_CTRL flag (it's separate from hw_ctrl_addr). In addition to that,
>>> it should feature a cxc entry for bimc_smmu_axi_clk and be marked as
>>> votable.
>>
>> I appear to have confused HW_CTRL with hw_ctrl_addr. Thanks for fixing that.
>>
>> I recall I made it always-on for display handoff. The bootloader on the laptops will enable the display, which means the MDP is active and using the SMMU. The SMMU is powered by the GDSC as you know. The MDP is going to be polling a framebuffer in DDR, which EFI services (efifb) is going to be updating. All of this is active during linux boot, which is how the kernel bootlog gets printed on screen.
> This is essentially a missing / mis-configuration from the linux/dt POV and
> I think the consensus for using display without describing it properly with
> mdss has been to do one of:
>
> - adding a simple-framebuffer node with all the necessary clocks/pds
> - adding "clk_ignore_unused pd_ignore_unused" to your cmdline
>
>>
>> If I remember right, the GDSC will be registered. When it is done probing, there will be no consumers. So the Linux framework will step in and turn it off before the consumers come up. This kills power to the SMMU. If the SMMU doesn't come back on before the MDP polls DDR again, you get a bus hang and a crash.
> Yep
>
>> I assumed that any msm8998 device would be using the MDP/GPU and thus the SMMU would pretty much always be powered on.
> This flag however bans putting it to sleep when not in use.
>
>>
>> I expected this patch to break the laptop. It does not in my testing. However, I see that I disabled the MMCC node in DT with a todo about the display. So the GDSC is never registered, and then never gets turned off. I believe that todo is pending some updates I need to make to the TI DSI/eDP bridge because the I2C port on the bridge is not wired up. I should really dust that off and complete it.
> Right, so what you have now is a third, untold "solution" to the problem
> described above.. not really a supported configuration as it's not "correct"
>
> I'd happily see you wire up the bridge et al though!
>
>
>> Regardless, even with the todo addressed, I think removing always-on will still break the laptops unless the bootloader handoff of display was solved and I missed it.
>>
>> I get that for your usecase, a phone where the bootloader does not init the display, always-on has the potential to burn extra power. I'm not sure how to make both of us happy through.
>>
>> Do you have any suggestions?
> Hope my replies above are enough.
I still think there is an issue, but my setup is not as complete as your
on mainline. I'll clean things up and we'll solve the issues when we
get to them.
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
next prev parent reply other threads:[~2023-08-10 19:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 19:20 [PATCH v3 0/6] MMCC MSM8998 fixes Konrad Dybcio
2023-08-09 19:20 ` [PATCH v3 1/6] arm64: dts: qcom: msm8998: Drop bus clock reference from MMSS SMMU Konrad Dybcio
2023-08-09 19:20 ` [PATCH v3 2/6] arm64: dts: qcom: msm8998: Add missing power domain to " Konrad Dybcio
2023-08-09 19:20 ` [PATCH v3 3/6] clk: qcom: gcc-msm8998: Don't check halt bit on some branch clks Konrad Dybcio
2023-08-09 19:20 ` [PATCH v3 4/6] clk: qcom: mmcc-msm8998: " Konrad Dybcio
2023-08-09 19:20 ` [PATCH v3 5/6] clk: qcom: mmcc-msm8998: Fix the SMMU GDSC Konrad Dybcio
2023-08-10 18:20 ` Jeffrey Hugo
2023-08-10 18:46 ` Konrad Dybcio
2023-08-10 19:50 ` Jeffrey Hugo [this message]
2023-08-09 19:20 ` [PATCH v3 6/6] dt-bindings: arm-smmu: Fix MSM8998 clocks description Konrad Dybcio
2023-08-11 11:44 ` [PATCH v3 0/6] MMCC MSM8998 fixes Will Deacon
2023-08-14 3:27 ` (subset) " Bjorn Andersson
2023-09-20 17:14 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fcf9fb85-0e78-21db-ee73-aee5193f37ce@quicinc.com \
--to=quic_jhugo@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@somainline.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=iommu@lists.linux.dev \
--cc=jami.kettunen@somainline.org \
--cc=jeffrey.l.hugo@gmail.com \
--cc=joonwoop@codeaurora.org \
--cc=joro@8bytes.org \
--cc=kimran@codeaurora.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=mturquette@baylibre.com \
--cc=quic_rjendra@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sboyd@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).