interconnect: qcom: Fix the commit bit not getting set

Fix the BCM commit bit not getting set for TCS commands that don't wait
for completion. The current code overloads the commit/wait behavior
using the same "commit" argument to tcs_cmd_gen(), which means we'll
only commit commands that wait for completion. The commit bit needs to
be set for the last command in each VCD regardless of the wait behavior.
Add a dedicated "wait" parameter to tcs_cmd_gen() to separate this
behavior.

Change-Id: I8d577f24b07de2f37f13365c43690bae954508f4
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
This commit is contained in:
Mike Tipton 2020-04-08 09:38:48 -07:00
commit 894746d0da

View file

@ -102,7 +102,7 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm, bool init)
}
static inline void tcs_cmd_gen(struct tcs_cmd *cmd, u64 vote_x, u64 vote_y,
u32 addr, bool commit)
u32 addr, bool commit, bool wait)
{
bool valid = true;
@ -127,7 +127,7 @@ static inline void tcs_cmd_gen(struct tcs_cmd *cmd, u64 vote_x, u64 vote_y,
* Set the wait for completion flag on command that need to be completed
* before the next command.
*/
cmd->wait = commit;
cmd->wait = wait;
}
static void tcs_list_gen(struct bcm_voter *voter, int bucket,
@ -136,7 +136,7 @@ static void tcs_list_gen(struct bcm_voter *voter, int bucket,
{
struct qcom_icc_bcm *bcm;
struct list_head *bcm_list = &voter->commit_list;
bool commit;
bool commit, wait;
size_t idx = 0, batch = 0, cur_vcd_size = 0;
memset(n, 0, sizeof(int) * MAX_VCD);
@ -148,11 +148,13 @@ static void tcs_list_gen(struct bcm_voter *voter, int bucket,
bcm->aux_data.vcd !=
list_next_entry(bcm, list)->aux_data.vcd) {
cur_vcd_size = 0;
if (voter->tcs_wait & BIT(bucket))
commit = true;
commit = true;
}
wait = commit && (voter->tcs_wait & BIT(bucket));
tcs_cmd_gen(&tcs_list[idx], bcm->vote_x[bucket],
bcm->vote_y[bucket], bcm->addr, commit);
bcm->vote_y[bucket], bcm->addr, commit, wait);
idx++;
n[batch]++;
/*