s2idle blocked on dev->power.completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Saravana,

I am investigating a hang during resume from s2idle on the Gray
Hawk Single development board[1].  It was reported first in [2].
The issue was detected when support for DisplayPort was added, due to
DTS and driver updates following different paths to upstream.

When using a DTS with DisplayPort support, but booting a kernel that
lacks support for the DSI block, the display and DSI-DP bridge drivers
fail to probe, as expected:

    # cat /sys/kernel/debug/devices_deferred
    feb00000.display        rcar-du: failed to initialize encoders
    ti_sn65dsi86.bridge.0   ti_sn65dsi86.bridge: failed to attach dsi host

However, when using s2idle, the system fails to wake-up, which is
not expected.

The issue can be reproduced by reverting commit c303814c38cde135
("drm/rcar-du: dsi: Add r8a779h0 support") on top of v6.14-rc1.

Instrumenting all dev->power.completion accesses in
drivers/base/power/main.c reveals that resume is blocked in dpm_wait()
in the call to wait_for_completion() for regulator-1p2v, which is
indeed a dependency for the SN65DSI86 DSI-DP bridge.  Comparing
this to plain v6.14-rc1 (where resume works fine) shows that the regulator
is woken by complete_all() there.  As the logs are rather large,
I made them available at [3] and [4] (I added "----" sync markers for
"diff -y"). The important difference bad vs. good is:

    -ti_sn65dsi86 1-002c: PM: dpm_wait:241: wait_for_completion
    -i2c i2c-0: PM: device_resume_noirq:700: complete_all
    -i2c i2c-1: PM: device_resume_noirq:700: complete_all
    -i2c i2c-1: PM: dpm_wait:241: completed
    -i2c i2c-0: PM: dpm_wait:241: completed
    +rcar-mipi-dsi fed80000.dsi-encoder: PM: device_resume_noirq:700:
complete_all
    +platform fff00044.chipid: PM: device_resume_noirq:700: complete_all
    +platform timer: PM: device_resume_noirq:700: complete_all
    +gpio-keys keys: PM: device_resume_noirq:700: complete_all
    +leds-gpio leds: PM: device_resume_noirq:700: complete_all
    +display-connector mini-dp-con: PM: device_resume_noirq:700: complete_all
    +reg-fixed-voltage regulator-1p2v: PM: device_resume_noirq:700: complete_all
    +reg-fixed-voltage regulator-1p8v: PM: device_resume_noirq:700: complete_all
    +reg-fixed-voltage regulator-3p3v: PM: device_resume_noirq:700: complete_all
    +simple-mux sound-mux: PM: device_resume_noirq:700: complete_all
    +workqueue writeback: PM: device_resume_noirq:700: complete_all
    +graphics fbcon: PM: device_resume_noirq:700: complete_all
    +regulator regulator.1: PM: device_resume_noirq:700: complete_all
    +regulator regulator.2: PM: device_resume_noirq:700: complete_all
    +regulator regulator.3: PM: device_resume_noirq:700: complete_all
    +net lo: PM: device_resume_noirq:700: complete_all
    +misc vga_arbiter: PM: device_resume_noirq:700: complete_all
    +mem mem: PM: device_resume_noirq:700: complete_all
    +mem null: PM: device_resume_noirq:700: complete_all
    +mem port: PM: device_resume_noirq:700: complete_all
    +mem zero: PM: device_resume_noirq:700: complete_all
    +mem full: PM: device_resume_noirq:700: complete_all
    +mem random: PM: device_resume_noirq:700: complete_all
    +mem urandom: PM: device_resume_noirq:700: complete_all
    +mem kmsg: PM: device_resume_noirq:700: complete_all
    +tty tty: PM: device_resume_noirq:700: complete_all
    +tty console: PM: device_resume_noirq:700: complete_all
    +tty tty0: PM: device_resume_noirq:700: complete_all
    +vc vcs: PM: device_resume_noirq:700: complete_all
    +vc vcsu: PM: device_resume_noirq:700: complete_all
    +vc vcsa: PM: device_resume_noirq:700: complete_all
    +vc vcs1: PM: device_resume_noirq:700: complete_all
    +vc vcsu1: PM: device_resume_noirq:700: complete_all
    +vc vcsa1: PM: device_resume_noirq:700: complete_all
    +tty tty1: PM: device_resume_noirq:700: complete_all
    +tty tty2: PM: device_resume_noirq:700: complete_all
    +tty tty3: PM: device_resume_noirq:700: complete_all
    +tty tty4: PM: device_resume_noirq:700: complete_all
    +tty tty5: PM: device_resume_noirq:700: complete_all
    +tty tty6: PM: device_resume_noirq:700: complete_all
    +tty tty7: PM: device_resume_noirq:700: complete_all
    +tty tty8: PM: device_resume_noirq:700: complete_all
    +tty tty9: PM: device_resume_noirq:700: complete_all
    +tty tty10: PM: device_resume_noirq:700: complete_all
    +tty tty11: PM: device_resume_noirq:700: complete_all
    +tty tty12: PM: device_resume_noirq:700: complete_all
    +tty tty13: PM: device_resume_noirq:700: complete_all
    +tty tty14: PM: device_resume_noirq:700: complete_all
    +tty tty15: PM: device_resume_noirq:700: complete_all
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
     i2c i2c-0: PM: dpm_wait:241: completed
     regulator regulator.0: PM: dpm_wait:241: wait_for_completion
     regulator regulator.0: PM: dpm_wait:241: completed
    -at24 0-0051: PM: device_resume_noirq:700: complete_all
    +pca953x 0-0021: PM: device_resume_noirq:700: complete_all
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
     i2c i2c-0: PM: dpm_wait:241: completed
     regulator regulator.0: PM: dpm_wait:241: wait_for_completion
     regulator regulator.0: PM: dpm_wait:241: completed
    -at24 0-0050: PM: device_resume_noirq:700: complete_all
    +pca953x 0-0022: PM: device_resume_noirq:700: complete_all
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
     i2c i2c-0: PM: dpm_wait:241: completed
     regulator regulator.0: PM: dpm_wait:241: wait_for_completion
     regulator regulator.0: PM: dpm_wait:241: completed
    -at24 0-0052: PM: device_resume_noirq:700: complete_all
    -i2c i2c-0: PM: dpm_wait:241: completed
    +at24 0-0051: PM: device_resume_noirq:700: complete_all
    +tty tty16: PM: device_resume_noirq:700: complete_all
     i2c i2c-0: PM: dpm_wait:241: completed
    -regulator regulator.0: PM: dpm_wait:241: wait_for_completion
    -regulator regulator.0: PM: dpm_wait:241: completed
    +tty tty17: PM: device_resume_noirq:700: complete_all
     gpio_rcar e6050180.gpio: PM: dpm_wait:241: wait_for_completion
    -at24 0-0053: PM: device_resume_noirq:700: complete_all
    +tty tty18: PM: device_resume_noirq:700: complete_all
     gpio_rcar e6050180.gpio: PM: dpm_wait:241: completed
    +tty tty19: PM: device_resume_noirq:700: complete_all
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
    +i2c-rcar e6508000.i2c: PM: dpm_wait:241: wait_for_completion
     i2c i2c-0: PM: dpm_wait:241: completed
    +i2c-rcar e6508000.i2c: PM: dpm_wait:241: completed
    +i2c i2c-1: PM: device_resume_noirq:700: complete_all
     regulator regulator.0: PM: dpm_wait:241: wait_for_completion
    -regulator regulator.0: PM: dpm_wait:241: wait_for_completion
    +i2c i2c-0: PM: dpm_wait:241: wait_for_completion
     regulator regulator.0: PM: dpm_wait:241: completed
    +i2c i2c-0: PM: dpm_wait:241: completed
    +regulator regulator.0: PM: dpm_wait:241: wait_for_completion
     regulator regulator.0: PM: dpm_wait:241: completed
    -pca953x 0-0020: PM: device_resume_noirq:700: complete_all
    -pca953x 0-0021: PM: device_resume_noirq:700: complete_all
    +at24 0-0052: PM: device_resume_noirq:700: complete_all
    +at24 0-0053: PM: device_resume_noirq:700: complete_all
    +mmc_host mmc0: PM: dpm_wait:241: wait_for_completion
    +tty tty20: PM: device_resume_noirq:700: complete_all
    +i2c i2c-0: PM: dpm_wait:241: completed
    +tty tty21: PM: device_resume_noirq:700: complete_all
    +regulator regulator.0: PM: dpm_wait:241: wait_for_completion
    +tty tty22: PM: device_resume_noirq:700: complete_all
    +i2c i2c-1: PM: dpm_wait:241: completed
    +tty tty23: PM: device_resume_noirq:700: complete_all
     sh-pfc e6050000.pinctrl: PM: dpm_wait:241: wait_for_completion
    +tty tty24: PM: device_resume_noirq:700: complete_all
    +regulator regulator.0: PM: dpm_wait:241: completed
    +tty tty25: PM: device_resume_noirq:700: complete_all
    +at24 0-0050: PM: device_resume_noirq:700: complete_all
    +tty tty26: PM: device_resume_noirq:700: complete_all
     regulator regulator.0: PM: dpm_wait:241: wait_for_completion
    -sh-pfc e6050000.pinctrl: PM: dpm_wait:241: completed
    +tty tty27: PM: device_resume_noirq:700: complete_all
     regulator regulator.0: PM: dpm_wait:241: completed
    +tty tty28: PM: device_resume_noirq:700: complete_all
    +sh-pfc e6050000.pinctrl: PM: dpm_wait:241: completed
    +tty tty29: PM: device_resume_noirq:700: complete_all
     reg-fixed-voltage regulator-1p2v: PM: dpm_wait:241: wait_for_completion
    -pca953x 0-0022: PM: device_resume_noirq:700: complete_all
    +tty tty30: PM: device_resume_noirq:700: complete_all
    +pca953x 0-0020: PM: device_resume_noirq:700: complete_all

Looking at /sys/devices/virtual/devlink, the non-working case has the
following extra entries:

    /sys/devices/virtual/devlink/i2c:1-002c--platform:fed80000.dsi-encoder:
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM auto_remove_on
    lrwxrwxrwx 1 root root    0 Feb  7 HH:MM consumer ->
../../../platform/soc/fed80000.dsi-encoder
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM runtime_pm
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM status
    lrwxrwxrwx 1 root root    0 Dec  1 HH:MM subsystem ->
../../../../class/devlink
    lrwxrwxrwx 1 root root    0 Feb  7 HH:MM supplier ->
../../../platform/soc/e6508000.i2c/i2c-1/1-002c
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM sync_state_only
    -rw-r--r-- 1 root root 4096 Dec  1 HH:MM uevent

    /sys/devices/virtual/devlink/platform:feb00000.display--platform:fed80000.dsi-encoder:
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM auto_remove_on
    lrwxrwxrwx 1 root root    0 Feb  7 HH:MM consumer ->
../../../platform/soc/fed80000.dsi-encoder
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM runtime_pm
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM status
    lrwxrwxrwx 1 root root    0 Dec  1 HH:MM subsystem ->
../../../../class/devlink
    lrwxrwxrwx 1 root root    0 Feb  7 HH:MM supplier ->
../../../platform/soc/feb00000.display
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM sync_state_only
    -rw-r--r-- 1 root root 4096 Dec  1 HH:MM uevent

    /sys/devices/virtual/devlink/platform:fed80000.dsi-encoder--platform:feb00000.display:
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM auto_remove_on
    lrwxrwxrwx 1 root root    0 Feb  7 HH:MM consumer ->
../../../platform/soc/feb00000.display
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM runtime_pm
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM status
    lrwxrwxrwx 1 root root    0 Dec  1 HH:MM subsystem ->
../../../../class/devlink
    lrwxrwxrwx 1 root root    0 Feb  7 HH:MM supplier ->
../../../platform/soc/fed80000.dsi-encoder
    -r--r--r-- 1 root root 4096 Feb  7 HH:MM sync_state_only
    -rw-r--r-- 1 root root 4096 Dec  1 HH:MM uevent

Do you have a clue, or suggestions for further investigation?
Thanks!

[1] arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts
[2] https://lore.kernel.org/CAMuHMdXkXx6+0nJn+uLCAWOXvEYWLJXzLu9J7ksinn_z3bEfHQ@xxxxxxxxxxxxxx
[3] https://drive.google.com/file/d/1yH_PjihKIauK44NZhVHtZeka6PaIPY78/view?usp=sharing
[4] https://drive.google.com/file/d/1zjGSQhEqsSLRw5cxP_xsBDcy3t3dkpcj/view?usp=sharing

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux