thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold
authorSumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Fri, 6 Nov 2020 17:06:33 +0000 (22:36 +0530)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sat, 7 Nov 2020 18:02:31 +0000 (19:02 +0100)
commitef63b043ac8645d2540d7b50dd3e09c53db3d504
tree1462f53b85d97eb7b0e5f8cb06cf6dda40a041ff
parent703456ba76e9449b5ade6597c04a90ee3421cd94
thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold

When system tries to enter S0ix suspend state, just after active load
scenarios, it fails due to PCH current temperature is higher than set
threshold.
This patch introduces delay loop mechanism that allows PCH temperature
to go down below threshold during suspend so it won't fail to enter S0ix.
Add delay loop timeout and count as module parameters for user to tune it,
if required based on system design. This change notifies the different
warning messages like when PCH temperature above the threshold and
executing delay loop. Also, notify the messages when it success or
failure for S0ix entry.
Previously out of 1000 runs around 3 to 5 times it might fail to enter
S0ix just after heavy workload. With this change, S0ix failures reduced
as PCH cools down below threshold.

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201106170633.20838-1-sumeet.r.pawnikar@intel.com
drivers/thermal/intel/intel_pch_thermal.c