diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2023-12-17 19:08:46 -0800 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2023-12-17 19:08:47 -0800 |
commit | d41c3759bce0ac779e4688168d916a104cebd114 (patch) | |
tree | e49044ec9f7e7bc70edccd3f10ab7aab21d57b84 | |
parent | 1bd8bac14ff6f42d213c875d928c69d021fbbdd4 (diff) | |
parent | bcf23bfdae261ba2b5d5ab87106edd899f8a5b87 (diff) | |
download | gchips-d41c3759bce0ac779e4688168d916a104cebd114.tar.gz |
Merge android14-gs-pixel-5.15-24Q1 into android14-gs-pixel-5.15-24Q2
SBMerger: 571992243
Change-Id: Ic4fd9063e58cc793b46416e4cd6432654a298cc3
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | bigo_pm.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -19,7 +19,7 @@ #define BIGW_A0_CSR_PROG_FREQ 166000 -static inline u32 bigo_get_total_load(struct bigo_core *core) +static inline u32 bigo_get_total_load(struct bigo_core *core, bool use_bpp) { struct bigo_inst *inst; u32 load = 0; @@ -32,6 +32,9 @@ static inline u32 bigo_get_total_load(struct bigo_core *core) if (inst->idle) continue; curr_load = (u64)inst->width * inst->height * inst->fps / 1024; + if (use_bpp) { + curr_load *= inst->bpp; + } if (curr_load < core->pm.max_load - load) { load += curr_load; } else { @@ -84,7 +87,7 @@ static inline void bigo_set_freq(struct bigo_core *core, u32 freq) static void bigo_scale_freq(struct bigo_core *core) { - u32 load = bigo_get_total_load(core); + u32 load = bigo_get_total_load(core, true); u32 freq = bigo_get_target_freq(core, load); bigo_set_freq(core, freq); @@ -92,7 +95,7 @@ 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); + u32 load = bigo_get_total_load(core, false); if (load) { struct bigo_bw *bandwidth = bigo_get_target_bw(core, load); |