All of lore.kernel.org
 help / color / mirror / Atom feed
* DM3730 Suspend-Resume with 5.11-rc6
@ 2021-02-06 21:57 Adam Ford
  2021-02-06 22:20 ` Adam Ford
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Ford @ 2021-02-06 21:57 UTC (permalink / raw)
  To: Linux-OMAP

I am having issues with suspend on a DM3730 running 5.11-rc6, and it
seems like core_pwrdm may be the issue.

# echo mem > /sys/power/state
[   82.024963] PM: suspend entry (deep)
[   82.053283] Filesystems sync: 0.024 seconds
[   82.059600] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   82.068511] OOM killer disabled.
[   82.071777] Freezing remaining freezable tasks ... (elapsed 0.001
seconds) done.
[   82.647033] Disabling non-boot CPUs ...
[   82.651000] Powerdomain (core_pwrdm) didn't enter target state 0
[   82.651000] Could not enter target state in pm_suspend
[   82.896881] omap-iommu 480bd400.mmu: 480bd400.mmu: version 1.1
 [   83.049072] musb-hdrc musb-hdrc.2.auto: musb_set_peripheral:
already in peripheral mode: 80
[   83.519439] OOM killer enabled.
[   83.522674] Restarting tasks ... done.
[   83.589050] PM: suspend exit
sh: write error: Operation not permitted
#

I am not that versed with the power management stuff and the
references on elinux.org are outdated, and I was hoping someone might
have some suggestions.

Does anyone else have any issues?

adam

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

* Re: DM3730 Suspend-Resume with 5.11-rc6
  2021-02-06 21:57 DM3730 Suspend-Resume with 5.11-rc6 Adam Ford
@ 2021-02-06 22:20 ` Adam Ford
  2021-02-08  9:15   ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Ford @ 2021-02-06 22:20 UTC (permalink / raw)
  To: Linux-OMAP

On Sat, Feb 6, 2021 at 3:57 PM Adam Ford <aford173@gmail.com> wrote:
>
> I am having issues with suspend on a DM3730 running 5.11-rc6, and it
> seems like core_pwrdm may be the issue.
>
> # echo mem > /sys/power/state
> [   82.024963] PM: suspend entry (deep)
> [   82.053283] Filesystems sync: 0.024 seconds
> [   82.059600] Freezing user space processes ... (elapsed 0.001 seconds) done.
> [   82.068511] OOM killer disabled.
> [   82.071777] Freezing remaining freezable tasks ... (elapsed 0.001
> seconds) done.
> [   82.647033] Disabling non-boot CPUs ...
> [   82.651000] Powerdomain (core_pwrdm) didn't enter target state 0
> [   82.651000] Could not enter target state in pm_suspend
> [   82.896881] omap-iommu 480bd400.mmu: 480bd400.mmu: version 1.1
>  [   83.049072] musb-hdrc musb-hdrc.2.auto: musb_set_peripheral:
> already in peripheral mode: 80
> [   83.519439] OOM killer enabled.
> [   83.522674] Restarting tasks ... done.
> [   83.589050] PM: suspend exit
> sh: write error: Operation not permitted
> #
>
> I am not that versed with the power management stuff and the
> references on elinux.org are outdated, and I was hoping someone might
> have some suggestions.
>
> Does anyone else have any issues?

I forgot to include some debug stuff

#  cat /sys/kernel/debug/pm_debug/count
usbhost_pwrdm (ON),OFF:293,RET:1,INA:0,ON:295,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
sgx_pwrdm (OFF),OFF:1,RET:0,INA:1,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
per_pwrdm (ON),OFF:2,RET:1,INA:0,ON:4,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
dss_pwrdm (ON),OFF:293,RET:1,INA:0,ON:295,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
cam_pwrdm (ON),OFF:5,RET:1,INA:0,ON:7,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
neon_pwrdm (ON),OFF:13,RET:173,INA:109,ON:296,RET-LOGIC-OFF:0
mpu_pwrdm (ON),OFF:12,RET:173,INA:109,ON:295,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
iva2_pwrdm (OFF),OFF:3,RET:2,INA:0,ON:5,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
usbhost_clkdm->usbhost_pwrdm (1)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (18)
cam_clkdm->cam_pwrdm (1)
dss_clkdm->dss_pwrdm (2)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (22)
core_l3_clkdm->core_pwrdm (1)
neon_clkdm->neon_pwrdm (0)



>
> adam

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

* Re: DM3730 Suspend-Resume with 5.11-rc6
  2021-02-06 22:20 ` Adam Ford
@ 2021-02-08  9:15   ` Tony Lindgren
  2021-02-08 10:27     ` Andreas Kemnade
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2021-02-08  9:15 UTC (permalink / raw)
  To: Adam Ford; +Cc: Linux-OMAP

* Adam Ford <aford173@gmail.com> [210206 22:22]:
> On Sat, Feb 6, 2021 at 3:57 PM Adam Ford <aford173@gmail.com> wrote:
> >
> > I am having issues with suspend on a DM3730 running 5.11-rc6, and it
> > seems like core_pwrdm may be the issue.

That probably just means you did not configure off mode for idle.

Suspend and resume still works for me based on a quick try with -rc7.
I use the following test script to enable idle FYI, then suspend,
and wake-up the system to a key press on serial console.

Also modprobe rtc-twl and rtcwake -m mem -s 5 worked.

Regards,

Tony

8< -------------
#!/bin/bash

# Detach kernel serial console
consoles=$(find /sys/bus/platform/devices/4*.serial/ -name console)
for console in ${consoles}; do
	echo -n N > ${console}
done

# Configure PM runtime autosuspend
uarts=$(find /sys/bus/platform/devices/4*.serial/power/ -type d)
for uart in $uarts; do
	echo -n 3000 > $uart/autosuspend_delay_ms
	echo -n enabled > $uart/wakeup
	echo -n auto > $uart/control
done

# Configure wake-up from suspend
uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null)
for uart in $uarts; do
	echo -n enabled > $uart/wakeup
done

echo -n 1 > /sys/kernel/debug/pm_debug/enable_off_mode

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

* Re: DM3730 Suspend-Resume with 5.11-rc6
  2021-02-08  9:15   ` Tony Lindgren
@ 2021-02-08 10:27     ` Andreas Kemnade
  2021-02-08 17:54       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Kemnade @ 2021-02-08 10:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Adam Ford, Linux-OMAP

On Mon, 8 Feb 2021 11:15:48 +0200
Tony Lindgren <tony@atomide.com> wrote:

> * Adam Ford <aford173@gmail.com> [210206 22:22]:
> > On Sat, Feb 6, 2021 at 3:57 PM Adam Ford <aford173@gmail.com> wrote:  
> > >
> > > I am having issues with suspend on a DM3730 running 5.11-rc6, and it
> > > seems like core_pwrdm may be the issue.  
> 
> That probably just means you did not configure off mode for idle.
> 

hmm, do you still need to configure anything for off mode? I rather
think it might be a misbehaving peripheral, not a general off mode
problem. So maybe try it with less modules loaded and add them step by
step to find out the misbehaving one.

> Suspend and resume still works for me based on a quick try with -rc7.
> I use the following test script to enable idle FYI, then suspend,
> and wake-up the system to a key press on serial console.
> 
> Also modprobe rtc-twl and rtcwake -m mem -s 5 worked.
> 
> Regards,
> 
> Tony
> 
> 8< -------------
> #!/bin/bash
> 
> # Detach kernel serial console
> consoles=$(find /sys/bus/platform/devices/4*.serial/ -name console)
> for console in ${consoles}; do
> 	echo -n N > ${console}
> done
> 
> # Configure PM runtime autosuspend
> uarts=$(find /sys/bus/platform/devices/4*.serial/power/ -type d)
> for uart in $uarts; do
> 	echo -n 3000 > $uart/autosuspend_delay_ms
> 	echo -n enabled > $uart/wakeup
> 	echo -n auto > $uart/control
> done
> 
> # Configure wake-up from suspend
> uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null)
> for uart in $uarts; do
> 	echo -n enabled > $uart/wakeup
> done
> 
> echo -n 1 > /sys/kernel/debug/pm_debug/enable_off_mode
> 
Is this line still needed? I thought I had patched it away.

Regards,
Andreas

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

* Re: DM3730 Suspend-Resume with 5.11-rc6
  2021-02-08 10:27     ` Andreas Kemnade
@ 2021-02-08 17:54       ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2021-02-08 17:54 UTC (permalink / raw)
  To: Andreas Kemnade; +Cc: Adam Ford, Linux-OMAP

* Andreas Kemnade <andreas@kemnade.info> [210208 10:32]:
> On Mon, 8 Feb 2021 11:15:48 +0200
> Tony Lindgren <tony@atomide.com> wrote:
> 
> > * Adam Ford <aford173@gmail.com> [210206 22:22]:
> > > On Sat, Feb 6, 2021 at 3:57 PM Adam Ford <aford173@gmail.com> wrote:  
> > > >
> > > > I am having issues with suspend on a DM3730 running 5.11-rc6, and it
> > > > seems like core_pwrdm may be the issue.  
> > 
> > That probably just means you did not configure off mode for idle.
> > 
> 
> hmm, do you still need to configure anything for off mode? I rather
> think it might be a misbehaving peripheral, not a general off mode
> problem. So maybe try it with less modules loaded and add them step by
> step to find out the misbehaving one.

Right, that should no longer be needed. So then it's probably the
lack of configuring uart timeouts that will keep the SoC power
domains busy.

> > echo -n 1 > /sys/kernel/debug/pm_debug/enable_off_mode
> > 
> Is this line still needed? I thought I had patched it away.

Yes you're right it should no longer be needed.

Regards,

Tony

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

end of thread, other threads:[~2021-02-08 17:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-06 21:57 DM3730 Suspend-Resume with 5.11-rc6 Adam Ford
2021-02-06 22:20 ` Adam Ford
2021-02-08  9:15   ` Tony Lindgren
2021-02-08 10:27     ` Andreas Kemnade
2021-02-08 17:54       ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.