soc: qcom: rpmh: Remove serialization of TCS commands
authorLina Iyer <ilina@codeaurora.org>
Thu, 7 Jan 2021 08:39:30 +0000 (14:09 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 7 Jan 2021 16:59:46 +0000 (10:59 -0600)
commitfef419c463d0dd95488a9750dc501ae43825e5d2
tree410173c1de4f9af64881ef558ec404e8d8f47c3f
parent1b3df368914b5e1783a9192b32418b24b7a721e5
soc: qcom: rpmh: Remove serialization of TCS commands

Requests sent to RPMH can be sent as fire-n-forget or response required,
with the latter ensuring the command has been completed by the hardware
accelerator. Commands in a request with tcs_cmd::wait set, would ensure
that those select commands are sent as response required, even though
the actual TCS request may be fire-n-forget.

Also, commands with .wait flag were also guaranteed to be complete
before the following command in the TCS is sent. This means that the
next command of the same request blocked until the current request is
completed. This could mean waiting for a voltage to settle or series of
NOCs be configured before the next command is sent. But drivers using
this feature have never cared about the serialization aspect. By not
enforcing the serialization we can allow the hardware to run in parallel
improving the performance.

Let's clarify the usage of this member in the tcs_cmd structure to mean
only completion and not serialization. This should also improve the
performance of bus requests where changes could happen in parallel.
Also, CPU resume from deep idle may see benefits from certain wake
requests.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/1610008770-13891-1-git-send-email-mkshah@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/soc/qcom/rpmh-rsc.c
include/soc/qcom/tcs.h