interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes
authorMike Tipton <mdtipton@codeaurora.org>
Wed, 21 Jul 2021 17:54:31 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:22:18 +0000 (13:22 +0200)
commit16aecf1e36d9089b88af9b2581955ee22d065a38
tree8ccfb767f52d7ff4de78dc6417d1329900ad0acd
parent22b4917c85af0f0ccdd9f4c4cdbcfe7442e2fca7
interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes

commit ce5a595744126be4f1327e29e3c5ae9aac6b38d5 upstream.

We currently only enforce BW floors for a subset of nodes in a path.
All BCMs that need updating are queued in the pre_aggregate/aggregate
phase. The first set() commits all queued BCMs and subsequent set()
calls short-circuit without committing anything. Since the floor BW
isn't set in sum_avg/max_peak until set(), then some BCMs are committed
before their associated nodes reflect the floor.

Set the floor as each node is being aggregated. This ensures that all
all relevant floors are set before the BCMs are committed.

Fixes: 266cd33b5913 ("interconnect: qcom: Ensure that the floor bandwidth value is enforced")
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Link: https://lore.kernel.org/r/20210721175432.2119-4-mdtipton@codeaurora.org
[georgi: Removed unused variable]
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/interconnect/qcom/icc-rpmh.c