interconnect: qcom: icc-rpm: Add AB/IB calculations coefficients
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Fri, 25 Aug 2023 15:38:23 +0000 (17:38 +0200)
committerGeorgi Djakov <djakov@kernel.org>
Mon, 9 Oct 2023 12:07:22 +0000 (15:07 +0300)
commitdd014803f260b337daaabcde259daf70d5b26b5e
treeb27501fc8f2fd2b2c06e8ee19fc26b0eb4add092
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
interconnect: qcom: icc-rpm: Add AB/IB calculations coefficients

Presumably due to the hardware being so complex, some nodes (or busses)
have different (usually higher) requirements for bandwidth than what
the usual calculations would suggest.

Looking at the available downstream files, it seems like AB values are
adjusted per-bus and IB values are adjusted per-node.
With that in mind, introduce percentage-based coefficient struct members
and use them in the calculations.

One thing to note is that the IB coefficient is inverse (100/ib_percent)
which feels a bit backwards, but it's necessary for precision..

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230726-topic-icc_coeff-v4-1-c04b60caa467@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
drivers/interconnect/qcom/icc-rpm.c
drivers/interconnect/qcom/icc-rpm.h