summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2023-12-17 19:08:46 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2023-12-17 19:08:47 -0800
commitd41c3759bce0ac779e4688168d916a104cebd114 (patch)
treee49044ec9f7e7bc70edccd3f10ab7aab21d57b84
parent1bd8bac14ff6f42d213c875d928c69d021fbbdd4 (diff)
parentbcf23bfdae261ba2b5d5ab87106edd899f8a5b87 (diff)
downloadgchips-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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bigo_pm.c b/bigo_pm.c
index 871b68f..f56c715 100644
--- a/bigo_pm.c
+++ b/bigo_pm.c
@@ -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);