From: Michael Auer <mick@yoxcu.de>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Georgi Djakov <djakov@kernel.org>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Mike Tipton <mike.tipton@oss.qualcomm.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] interconnect: qcom: bcm-voter: Clear the ALC vote left by the bootloader
Date: Mon, 23 Nov 2026 22:01:44 +0100 [thread overview]
Message-ID: <20261123210146.1465862-1-mick@yoxcu.de> (raw)
In-Reply-To: <b11d2e6b-8802-4450-8eb1-7984034d5c4e@oss.qualcomm.com>
Hi Konrad,
> I was hoping you would test my suggestion before sending it out..
I did run it: the numbers in the commit message are from your code on
the OnePlus 6. What I only saw after the review is that just the
active-only write had an effect.
> My agent suggests that changing this to use rpmh_write_batch() as
> these aren't cached and should achieve the desired outcome, please
> explore that
For sleep and wake, rpmh_write_batch() also only queues the request,
on ctrlr->batch_cache, until rpmh_flush(). It skips the sleep == wake
check, but qcom_icc_bcm_voter_commit() calls rpmh_invalidate() on
every commit, and that frees the whole batch_cache.
I tried it on the OnePlus 6, with all three ALC votes sent through
rpmh_write_batch() and a debug print in rpmh.c: both ALC batches were
queued at probe and freed by rpmh_invalidate() 2 ms later, at the
first icc commit. They never reached rpmh_flush(), and after suspend
the vote was still the active-only (12, 0), as with v2. So ALC would
have to be added to the wake and sleep batches of every commit.
Also, a (0, 0) wake vote that reaches the hardware would turn ALC off
after the first resume.
rpmh_invalidate() does not touch the rpmh_write() cache, so I tested a
smaller change: active-only (12, 0) and sleep (0, 0) with rpmh_write(),
and no wake write. The active write also sets the cached wake value,
so the sleep and wake values differ and rpmh_flush() programs both.
On the OnePlus 6 the rpmh cache now has ALC at sleep (0, 0) and wake
(12, 0), and rpmh_flush() no longer skips it. The APPS DRV vote reads
(12, 0) after boot and again after 16 suspends. In a 25 minute suspend
test the SoC was in CX collapse for 86 % of the suspended time, the
same as with v2.
If that is what you meant, I will send it as v3.
Thanks,
Michael
prev parent reply other threads:[~2026-11-23 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 12:21 Michael Auer
2026-11-20 21:41 ` Michael Auer
2026-11-23 18:42 ` Konrad Dybcio
2026-11-23 21:01 ` 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=20261123210146.1465862-1-mick@yoxcu.de \
--to=mick@yoxcu.de \
--cc=andersson@kernel.org \
--cc=ardb@kernel.org \
--cc=djakov@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@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 \
/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®