google_cpm: use 0 cp_limit in gcpm_update_votes()
gcpm_update_votes() is called on start of DC with the ->cp_fcc_hold_limit.
A negative hold limit is used to re-enable WLC_CP and PPS_CP after a
shutdown from the MDIS thermal engine.
Bug: 231656227
Signed-off-by: AleX Pelosi <[email protected]>
Change-Id: Ie40f907e9f136b325805a5aa98554f99a1d95684
diff --git a/google_cpm.c b/google_cpm.c
index 6889185..8fa0fc2 100644
--- a/google_cpm.c
+++ b/google_cpm.c
@@ -638,6 +638,8 @@
struct gvotable_election *el;
int ret;
+ pr_debug("%s: cp_limit=%d\n", __func__, cp_limit);
+
/* update DC_FCC limit before disabling the others */
if (cp_limit > 0)
ret = gcpm_dc_fcc_update(gcpm, enable ? cp_limit : -1);
@@ -645,12 +647,12 @@
/* vote on DC_ICL */
el = gcpm_get_dc_icl_votable(gcpm);
if (el)
- gvotable_recast_ballot(el, "MDIS", enable && cp_limit <= 0);
+ gvotable_recast_ballot(el, "MDIS", enable && cp_limit == 0);
/* vote on MSC_FCC: applied only when CP is not enabled */
el = gcpm_get_fcc_votable(gcpm);
if (el)
- gvotable_recast_ballot(el, "MDIS", enable && cp_limit <= 0);
+ gvotable_recast_ballot(el, "MDIS", enable && cp_limit == 0);
/* vote on GCPM_FCC: valid only on cp */
el = gcpm_get_cp_votable(gcpm);
@@ -1446,7 +1448,7 @@
int pps_done, ret;
/* DC_FCC limit might be enabled as soon as we enter WLC_DC */
- ret = gcpm_update_votes(gcpm, -1);
+ ret = gcpm_update_votes(gcpm, 0);
if (ret < 0)
pr_err("PPS_DC: wlc_dc_rd cannot update votes (%d)\n", ret);