public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] thermal/drivers/mediatek/lvts: Fixes for suspend and IRQ storm, and cleanups
@ 2024-11-25 21:20 Nícolas F. R. A. Prado
  2024-11-25 21:20 ` [PATCH 1/5] thermal/drivers/mediatek/lvts: Disable monitor mode during suspend Nícolas F. R. A. Prado
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-11-25 21:20 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	Matthias Brugger, AngeloGioacchino Del Regno, Alexandre Mergnat,
	Balsam CHIHI
  Cc: kernel, linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek,
	Hsin-Te Yuan, Chen-Yu Tsai, Bernhard Rosenkränzer,
	Rafael J. Wysocki, Nícolas F. R. A. Prado, stable

Patches 1 and 2 of this series fix the issue reported by Hsin-Te Yuan
[1] where MT8192-based Chromebooks are not able to suspend/resume 10
times in a row. Either one of those patches on its own is enough to fix
the issue, but I believe both are desirable, so I've included them both
here.

Patches 3-5 fix unrelated issues that I've noticed while debugging.
Patch 3 fixes IRQ storms when the temperature sensors drop to 20
Celsius. Patches 4 and 5 are cleanups to prevent future issues.

To test this series, I've run 'rtcwake -m mem -d 60' 10 times in a row
on a MT8192-Asurada-Spherion-rev3 Chromebook and checked that the wakeup
happened 60 seconds later (+-5 seconds). I've repeated that test on 10
separate runs. Not once did the chromebook wake up early with the series
applied.

I've also checked that during those runs, the LVTS interrupt didn't
trigger even once, while before the series it would trigger a few times
per run, generally during boot or resume.

Finally, as a sanity check I've verified that the interrupts still work
by lowering the thermal trip point to 45 Celsius and running 'stress -c
8'. Indeed they still do, and the temperature showed by the
thermal_temperature ftrace event matched the expected value.

[1] https://lore.kernel.org/all/20241108-lvts-v1-1-eee339c6ca20@chromium.org/

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Nícolas F. R. A. Prado (5):
      thermal/drivers/mediatek/lvts: Disable monitor mode during suspend
      thermal/drivers/mediatek/lvts: Disable Stage 3 thermal threshold
      thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold
      thermal/drivers/mediatek/lvts: Start sensor interrupts disabled
      thermal/drivers/mediatek/lvts: Only update IRQ enable for valid sensors

 drivers/thermal/mediatek/lvts_thermal.c | 103 ++++++++++++++++++++++----------
 1 file changed, 72 insertions(+), 31 deletions(-)
---
base-commit: b852e1e7a0389ed6168ef1d38eb0bad71a6b11e8
change-id: 20241121-mt8192-lvts-filtered-suspend-fix-a5032ca8eceb

Best regards,
-- 
Nícolas F. R. A. Prado <nfraprado@collabora.com>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-11-27  7:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25 21:20 [PATCH 0/5] thermal/drivers/mediatek/lvts: Fixes for suspend and IRQ storm, and cleanups Nícolas F. R. A. Prado
2024-11-25 21:20 ` [PATCH 1/5] thermal/drivers/mediatek/lvts: Disable monitor mode during suspend Nícolas F. R. A. Prado
2024-11-26  8:00   ` Hsin-Te Yuan
2024-11-26 13:37     ` Nícolas F. R. A. Prado
2024-11-27  7:27       ` Hsin-Te Yuan
2024-11-26  9:43   ` AngeloGioacchino Del Regno
2024-11-26 13:19     ` Nícolas F. R. A. Prado
2024-11-26 14:38       ` AngeloGioacchino Del Regno
2024-11-25 21:20 ` [PATCH 2/5] thermal/drivers/mediatek/lvts: Disable Stage 3 thermal threshold Nícolas F. R. A. Prado
2024-11-26  9:43   ` AngeloGioacchino Del Regno
2024-11-25 21:20 ` [PATCH 3/5] thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold Nícolas F. R. A. Prado
2024-11-26  9:43   ` AngeloGioacchino Del Regno
2024-11-25 21:20 ` [PATCH 4/5] thermal/drivers/mediatek/lvts: Start sensor interrupts disabled Nícolas F. R. A. Prado
2024-11-26  9:43   ` AngeloGioacchino Del Regno
2024-11-25 21:20 ` [PATCH 5/5] thermal/drivers/mediatek/lvts: Only update IRQ enable for valid sensors Nícolas F. R. A. Prado
2024-11-26  9:43   ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox