Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion drivers/interconnect/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,10 @@ void icc_set_tag(struct icc_path *path, u32 tag)

mutex_lock(&icc_lock);

for (i = 0; i < path->num_nodes; i++)
for (i = 0; i < path->num_nodes; i++) {
path->reqs[i].prev_tag = path->reqs[i].tag;
path->reqs[i].tag = tag;
}

mutex_unlock(&icc_lock);
}
Expand Down Expand Up @@ -709,6 +711,12 @@ int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
old_avg = path->reqs[0].avg_bw;
old_peak = path->reqs[0].peak_bw;

if (path->reqs[0].prev_tag == path->reqs[0].tag &&
(avg_bw == old_avg && peak_bw == old_peak)) {
mutex_unlock(&icc_bw_lock);
return 0;
}

for (i = 0; i < path->num_nodes; i++) {
node = path->reqs[i].node;

Expand Down
1 change: 1 addition & 0 deletions drivers/interconnect/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct icc_req {
struct device *dev;
bool enabled;
u32 tag;
u32 prev_tag;
u32 avg_bw;
u32 peak_bw;
};
Expand Down
Loading