diff options
author | Vinay Kalia <vinaykalia@google.com> | 2022-06-25 01:28:20 +0000 |
---|---|---|
committer | Ruofei Ma <ruofeim@google.com> | 2022-09-14 14:12:03 -0700 |
commit | c965e024911283b3881a1f63f89b609091524565 (patch) | |
tree | aac7599913f0c79fb4eb899dcf666a57031b963b | |
parent | 6f9b65f19e49653b2e435728de61b0b282c9563e (diff) | |
download | gchips-c965e024911283b3881a1f63f89b609091524565.tar.gz |
bigocean: Remove bigocean BW votes when not needed
When all the bigocean instances close, all the BW votes should
be removed.
bug: 233707844
bug: 237706931
Signed-off-by: Vinay Kalia <vinaykalia@google.com>
Change-Id: I1bc85a1f9fd043413eb55602e95d107b1d6564db
(cherry picked from commit 2571eaf565fb151e284c3ed6bd922800e398df70)
-rw-r--r-- | bigo_pm.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -115,12 +115,16 @@ static void bigo_scale_freq(struct bigo_core *core) static void bigo_get_bw(struct bigo_core *core, struct bts_bw *bw) { u32 load = bigo_get_total_load(core); - struct bigo_bw *bandwidth = bigo_get_target_bw(core, load); - bw->read = bandwidth->rd_bw; - bw->write = bandwidth->wr_bw; - bw->peak = bandwidth->pk_bw; - pr_debug("BW: load: %llu, rd: %u, wr: %u, pk: %u", load, bw->read, bw->write, bw->peak); + if (load) { + struct bigo_bw *bandwidth = bigo_get_target_bw(core, load); + bw->read = bandwidth->rd_bw; + bw->write = bandwidth->wr_bw; + bw->peak = bandwidth->pk_bw; + } else { + memset(bw, 0, sizeof(*bw)); + } + pr_debug("BW: load: %u, rd: %u, wr: %u, pk: %u", load, bw->read, bw->write, bw->peak); } static int bigo_scale_bw(struct bigo_core *core) |