Skip to content

Commit

Permalink
thermal: qcom: bcl: Return before thermal trip evaluates
Browse files Browse the repository at this point in the history
Returning before thermal trips due to lower battery should
fix the lag due to restricted thermals. This what BCL does.

test: check 2-3 cycles of battery percentage under 10%
result: Fixes device lag completely. Maintains constant performance

Signed-off-by: Panchajanya1999 <[email protected]>
(cherry picked from commit ecc53270590cc372ed7c509fcefe3de7fe7269d9)
Signed-off-by: Panchajanya1999 <[email protected]>
Signed-off-by: Forenche <[email protected]>
  • Loading branch information
Panchajanya1999 authored and Forenche committed Jul 27, 2021
1 parent f6763a3 commit 101a1ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/thermal/qcom/bcl_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ static void bcl_evaluate_soc(struct work_struct *work)

bcl_perph->trip_val = battery_percentage;
mutex_unlock(&bcl_perph->state_trans_lock);

return; //return before thermal handle trips with percentage

of_thermal_handle_trip(bcl_perph->tz_dev);

return;
eval_exit:
mutex_unlock(&bcl_perph->state_trans_lock);
}
Expand Down

0 comments on commit 101a1ec

Please sign in to comment.