Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7830d36 authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

clk: msm: clock-rpm: Don't send unnecessary RPM requests



Fix an ancient inefficiency where an active-set vote with
the same value may be sent twice. This also applies to the
sleep set, but sleep set requests are buffered and so are
not sent to the RPM until power collapse anyway. In any
case apply the same treatment to both contexts.

Consider an RPM clock A and its peer B. It is not possible
to simply look at the peer clock's request and determine if a
duplicate rate needs to be sent. B is also A's peer, therefore
it is not possible to know if the peer's last request was actually
sent or it was short circuited by the same logic that A is
working through. There needs to exist data storage common to
both clocks in order to ensure that requests are not dropped.

Therefore, implement this optimization by simply caching the
last request in a variable that is common to *both* clocks,
the active set clocks and the active+sleep clock. If the new
request is the same as the previous request, don't send it
to the RPM.

Change-Id: Id0e0a96fa5ea4f7422454e85001adca6071da6b6
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 861a4ae9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment