Skip to contentSkip to conversation

Nokia N900 OFF mode regression between v5.10 and v5.11

DISCUSSION Merlijn Wajer 3 participants 6 messages Dec 10, 2021 – Dec 13, 2021

lore
Share & tools
lore
#0 lore raw

Hi Tony, Adam,

I noticed that after I fixed the OFF mode regression between v5.9 and v5.10 that there are another one between v5.10 and v5.11. Fortunately, much like the other change it can be worked around with a config change, and in fact it looks like the commit identified by git bisect is indeed just a commit to change omap2plus_defconfig.

a82820fcd079e38309403f595f005a8cc318a13c ("ARM: omap2plus_defconfig:
Enable OMAP3_THERMAL") prevents the N900 from entering OFF mode pretty much all the time (I've seen scenarios with OFF:2,RET:500), but with the config change reverted, stuff like this is more common: OFF:13,RET:2

We will probably to keep the thermal features enabled, but maybe we can figure out why it causes the SoC to not enter sleep modes?

The good news is that this seems to be one of the last regressions with regards to OFF mode (there might be smaller ones that cause slightly more wakeups, but those will be harder to find). With this (CONFIG_OMAP3_THERMAL) config option disabled as well; as fixes from my other recent emails I can get my 5.15 branch to enter OFF mode again:

Quoted 4 lines
# uname -a
Linux (none) 5.15.2-00597-g68be8fac7cbd #48 SMP PREEMPT Sat Dec 11 00:14:05 CET 2021 armv7l GNU/Linux
# grep ^core_pwrdm /sys/kernel/debug/pm_debug/count | cut -d',' -f2,
OFF:13,RET:10

Regards,
Merlijn

#1 lore raw

Hi,

Quoted 8 lines · On Sat, 11 Dec 2021 00:20:24 +0100 Merlijn Wajer <[email protected]> wrote:

Hi Tony, Adam,

I noticed that after I fixed the OFF mode regression between v5.9 and v5.10 that there are another one between v5.10 and v5.11. Fortunately, much like the other change it can be worked around with a config change, and in fact it looks like the commit identified by git bisect is indeed just a commit to change omap2plus_defconfig.

Quoted 7 lines

a82820fcd079e38309403f595f005a8cc318a13c ("ARM: omap2plus_defconfig:
Enable OMAP3_THERMAL") prevents the N900 from entering OFF mode pretty much all the time (I've seen scenarios with OFF:2,RET:500), but with the config change reverted, stuff like this is more common: OFF:13,RET:2

We will probably to keep the thermal features enabled, but maybe we can figure out why it causes the SoC to not enter sleep modes?

well, it was enabled after people agreed that is fixed... including me. It was wrongly enabled some time before, then disabled again, fixed and reenabled.
The mentioned commit was just after the fix. So what is different now?

Regards,
Andreas

#2 lore raw

Hi Andreas,

Quoted 18 lines · Andreas Kemnade

Hi,

Quoted 13 lines · On Sat, 11 Dec 2021 00:20:24 +0100 Merlijn Wajer <[email protected]> wrote:

Hi Tony, Adam,

I noticed that after I fixed the OFF mode regression between v5.9 and v5.10 that there are another one between v5.10 and v5.11. Fortunately, much like the other change it can be worked around with a config change, and in fact it looks like the commit identified by git bisect is indeed just a commit to change omap2plus_defconfig.

a82820fcd079e38309403f595f005a8cc318a13c ("ARM: omap2plus_defconfig:
Enable OMAP3_THERMAL") prevents the N900 from entering OFF mode pretty much all the time (I've seen scenarios with OFF:2,RET:500), but with the config change reverted, stuff like this is more common: OFF:13,RET:2

Quoted 7 lines
Quoted 2 lines

We will probably to keep the thermal features enabled, but maybe we can figure out why it causes the SoC to not enter sleep modes?

well, it was enabled after people agreed that is fixed... including me. It was wrongly enabled some time before, then disabled again, fixed and reenabled.
The mentioned commit was just after the fix. So what is different now?

I'll have to find the mails you are referring to, but I suspect that if the device wasn't hitting OFF mode on v5.10 because of the CONFIG_COMPACT=y option in omap2plus_defconfig, it might have masked this issue?

Regards,
Merlijn

#3 lore raw
Quoted 29 lines · Merlijn Wajer

Hi Andreas,

Quoted 18 lines · Andreas Kemnade

Hi,

Quoted 13 lines · On Sat, 11 Dec 2021 00:20:24 +0100 Merlijn Wajer <[email protected]> wrote:

Hi Tony, Adam,

I noticed that after I fixed the OFF mode regression between v5.9 and v5.10 that there are another one between v5.10 and v5.11. Fortunately, much like the other change it can be worked around with a config change, and in fact it looks like the commit identified by git bisect is indeed just a commit to change omap2plus_defconfig.

a82820fcd079e38309403f595f005a8cc318a13c ("ARM: omap2plus_defconfig:
Enable OMAP3_THERMAL") prevents the N900 from entering OFF mode pretty much all the time (I've seen scenarios with OFF:2,RET:500), but with the config change reverted, stuff like this is more common: OFF:13,RET:2

Quoted 7 lines
Quoted 2 lines

We will probably to keep the thermal features enabled, but maybe we can figure out why it causes the SoC to not enter sleep modes?

well, it was enabled after people agreed that is fixed... including me. It was wrongly enabled some time before, then disabled again, fixed and reenabled.
The mentioned commit was just after the fix. So what is different now?

Quoted 4 lines

I'll have to find the mails you are referring to, but I suspect that if the device wasn't hitting OFF mode on v5.10 because of the CONFIG_COMPACT=y option in omap2plus_defconfig, it might have masked this issue?

Correction: CONFIG_COMPAT=y is not in omap2plus_defconfig, but it does get enabled by default since v5.10, so the above still holds.

Regards,
Merlijn

#4 lore raw
In reply to Merlijn Wajer

Hi,

Quoted 29 lines · On Sat, 11 Dec 2021 11:23:33 +0100 Merlijn Wajer <[email protected]> wrote:

Hi Andreas,

Quoted 18 lines · Andreas Kemnade

Hi,

Quoted 13 lines · On Sat, 11 Dec 2021 00:20:24 +0100 Merlijn Wajer <[email protected]> wrote:

Hi Tony, Adam,

I noticed that after I fixed the OFF mode regression between v5.9 and v5.10 that there are another one between v5.10 and v5.11. Fortunately, much like the other change it can be worked around with a config change, and in fact it looks like the commit identified by git bisect is indeed just a commit to change omap2plus_defconfig.

a82820fcd079e38309403f595f005a8cc318a13c ("ARM: omap2plus_defconfig:
Enable OMAP3_THERMAL") prevents the N900 from entering OFF mode pretty much all the time (I've seen scenarios with OFF:2,RET:500), but with the config change reverted, stuff like this is more common: OFF:13,RET:2

Quoted 7 lines
Quoted 2 lines

We will probably to keep the thermal features enabled, but maybe we can figure out why it causes the SoC to not enter sleep modes?

well, it was enabled after people agreed that is fixed... including me. It was wrongly enabled some time before, then disabled again, fixed and reenabled.
The mentioned commit was just after the fix. So what is different now?

Quoted 5 lines

I'll have to find the mails you are referring to, but I suspect that if the device wasn't hitting OFF mode on v5.10 because of the CONFIG_COMPACT=y option in omap2plus_defconfig, it might have masked this issue?

The patch fixing thermal power management is:

commit 5093402e5b449b64f7bbaa09057ce40a8f3c1484

Author: Adam Ford <[email protected]>
Date:   Fri Sep 11 07:31:56 2020 -0500

thermal: ti-soc-thermal: Enable addition power management

The bandgap sensor can be idled when the processor is too, but it isn't currently being done, so the power consumption of OMAP3 boards can elevated if the bangap sensor is enabled.

This patch attempts to use some additional power management to idle the clock to the bandgap when not needed.

Maybe there is something specific to the N900 which causes these issues? Well, I'll recheck on the boards I have.

Regards,
Andreas

#5 lore raw

Hi,

Quoted 12 lines · Andreas Kemnade

The patch fixing thermal power management is:

commit 5093402e5b449b64f7bbaa09057ce40a8f3c1484

Author: Adam Ford <[email protected]>
Date:   Fri Sep 11 07:31:56 2020 -0500

thermal: ti-soc-thermal: Enable addition power management

The bandgap sensor can be idled when the processor is too, but it isn't currently being done, so the power consumption of OMAP3 boards can elevated if the bangap sensor is enabled.

Quoted 5 lines

This patch attempts to use some additional power management to idle the clock to the bandgap when not needed.

Maybe there is something specific to the N900 which causes these issues? Well, I'll recheck on the boards I have.

My guess the issue is that omap3-thermal needs to constantly poll for the registers to get the status and that blocks any deeper idle states. For PM, probably omap3-thermal needs to be tagged with status = "disabled" assuming there is some other external thermal sensor. I'm also guessing that the old Nokia kernel never used the integrated thermal sensor, might be worth checking though.

Regards,

Tony