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:
Vikram Mulukutla <markivx@codeaurora.org>
Loading
Please register or sign in to comment