From: Michael Auer <mick@yoxcu.de>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Georgi Djakov <djakov@kernel.org>,
Mike Tipton <mike.tipton@oss.qualcomm.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] interconnect: qcom: sdm845: Drop the bootloader vote on ALC
Date: Thu, 19 Nov 2026 22:12:59 +0100 [thread overview]
Message-ID: <bb3baa94-f608-4fa7-aafe-9cb6619d186d@yoxcu.de> (raw)
In-Reply-To: <36d49272-f164-4bce-8203-622038d35e8c@oss.qualcomm.com>
Thanks Konrad, that is much simpler than my version. I'll test it on
the OnePlus 6 and send it as v2, without the binding change and the
dummy node.
On 11/13/26 10:23, Konrad Dybcio wrote:
> On 10/23/26 10:02 PM, Michael Auer wrote:
>> On 10/19/26 2:22 PM, Konrad Dybcio wrote:
>>> ALC essentially translates into "prevent DDR from sleeping to reduce
>>> latency", I don't know what a good framework for that func would be,
>>> but interconnect (even though it has the plumbing for BCMs) doesn't
>>> seem like it.
>> Thanks, that explains why the vote is so expensive in suspend.
>>
>> I don't really want to add a consumer API for that.
>> I only want to get rid of the vote the bootloader leaves behind.
> For a start, let's do something like:
>
> diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
> index 0880a287b0c0..f9d51f3d586d 100644
> --- a/drivers/interconnect/qcom/bcm-voter.c
> +++ b/drivers/interconnect/qcom/bcm-voter.c
> @@ -390,6 +390,46 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter)
> }
> EXPORT_SYMBOL_GPL(qcom_icc_bcm_voter_commit);
>
> +/*
> + * ALC is not modeled by any icc node, but the bootloader may leave it voted,
> + * which prevents the SoC from reaching CX collapse and AOSS shutdown.
> + */
> +static void bcm_voter_clear_alc(struct bcm_voter *voter)
> +{
> + struct tcs_cmd cmd;
> + u32 addr;
> + int ret;
> +
> + addr = cmd_db_read_addr("ALC");
> + if (!addr)
> + return;
> +
> + tcs_cmd_gen(&cmd, 12, 0, addr, true,
> + voter->tcs_wait & BIT(QCOM_ICC_BUCKET_AMC));
> +
> + ret = rpmh_write(voter->dev, RPMH_ACTIVE_ONLY_STATE, &cmd, 1);
> + if (ret) {
> + dev_err(voter->dev, "Error sending ALC AMC RPMH request (%d)\n", ret);
> + return;
> + }
> +
> + tcs_cmd_gen(&cmd, 0, 0, addr, true,
> + voter->tcs_wait & BIT(QCOM_ICC_BUCKET_WAKE));
> +
> + ret = rpmh_write(voter->dev, RPMH_WAKE_ONLY_STATE, &cmd, 1);
> + if (ret) {
> + dev_err(voter->dev, "Error sending ALC WAKE RPMH request (%d)\n", ret);
> + return;
> + }
> +
> + tcs_cmd_gen(&cmd, 0, 0, addr, true,
> + voter->tcs_wait & BIT(QCOM_ICC_BUCKET_SLEEP));
> +
> + ret = rpmh_write(voter->dev, RPMH_SLEEP_STATE, &cmd, 1);
> + if (ret)
> + dev_err(voter->dev, "Error sending ALC SLEEP RPMH request (%d)\n", ret);
> +}
> +
> static int qcom_icc_bcm_voter_probe(struct platform_device *pdev)
> {
> struct device_node *np = pdev->dev.of_node;
> @@ -409,6 +449,8 @@ static int qcom_icc_bcm_voter_probe(struct platform_device *pdev)
> INIT_LIST_HEAD(&voter->commit_list);
> INIT_LIST_HEAD(&voter->ws_list);
>
> + bcm_voter_clear_alc(voter);
> +
> mutex_lock(&bcm_voter_lock);
> list_add_tail(&voter->voter_node, &bcm_voters);
> mutex_unlock(&bcm_voter_lock);
>
> Konrad
prev parent reply other threads:[~2026-11-19 21:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 20:26 yoxcu
2026-10-13 20:26 ` [PATCH RFC 1/2] dt-bindings: interconnect: qcom,sdm845: Add MASTER_ALC yoxcu
2026-10-13 20:26 ` [PATCH RFC 2/2] interconnect: qcom: sdm845: Own the ALC BCM to drop its boot vote yoxcu
2026-11-10 14:13 ` Ard Biesheuvel
2026-10-19 12:22 ` [PATCH RFC 0/2] interconnect: qcom: sdm845: Drop the bootloader vote on ALC Konrad Dybcio
2026-10-23 20:02 ` Michael Auer
2026-11-13 9:23 ` Konrad Dybcio
2026-11-19 21:12 ` Michael Auer [this message]
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=bb3baa94-f608-4fa7-aafe-9cb6619d186d@yoxcu.de \
--to=mick@yoxcu.de \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djakov@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mike.tipton@oss.qualcomm.com \
--cc=robh@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
all inboxes | Powered by JetHome®