Re: [PATCH 0/5] rcar-vin: Support suspend and resume

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

 



Hi Geert,

On 2020-10-16 09:06:20 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
> 
> On Fri, Oct 16, 2020 at 4:01 AM Niklas Söderlund
> <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote:
> > This series add suspend and resume support directly to R-Car VIN and
> > indirectly to R-Car CSI-2 and other subdevices in the VIN capture
> > pipeline. The capture pipeline is stopped when suspending and started
> > when resuming, all while retaining the buffers provided from user-space.
> > This makes the start and stop of the pipeline transparent from an
> > application point of view.
> >
> > As the pipeline is switched off subdevices that poweroff themself when
> > not in use (such as R-Car CSI-2) are also switched off and are
> > indirectly serviced by the suspend support in VIN.
> 
> Thanks for your series!
> 
> > This work is based on-top of the media-tree and is tested on both R-Car
> > Gen2 and Gen3 without any regressions.
> 
> FTR: did you test on Gen3 with both s2idle and s2ram, the latter powering
> off the SoC?

I have only been able to test it with s2idle. My issue is that s2ram 
fails to reconnect the Ethernet (ravb) and I use nfsroot. If I instead 
use a initramfs I can resume from s2ram but I don't have the setup to 
test capture in that environment.

My procedure for s2idle that works with nfsroot is,

    # path=$(find /sys -path '/sys/devices/platform/*/ttySC0/power/wakeup')
    # echo enabled > $path
    # echo N > /sys/module/printk/parameters/console_suspend
    # echo s2idle > /sys/power/mem_slee
    # echo mem > /sys/power/state
    ** Wait a while and then wakeup using the console **
    #

My procedure for s2ram that does _not_ work with nfsroot (but do with 
initramfs). Both tests are done on a M3-N.

    # echo N > /sys/module/printk/parameters/console_suspend
    # echo on > /sys/bus/i2c/drivers/bd9571mwv/*/bd9571mwv-regulator*/backup_mode
    ** flipp SW23 off **
    # echo mem > /sys/power/state
    [  347.096336] PM: suspend entry (deep)
    [  347.104251] Filesystems sync: 0.003 seconds
    [  347.123751] Freezing user space processes ... (elapsed 0.007 seconds) done.
    [  347.138760] OOM killer disabled.
    [  347.142099] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
    [  347.167466] ravb e6800000.ethernet eth0: Link is Down
    [  347.440549] Disabling non-boot CPUs ...
    [  347.448805] CPU1: shutdown
    [  347.451731] psci: CPU1 killed (polled 0 ms)
    ** Waits 30+ seconds then switch SW23 on **
    INFO:    ARM GICv2 driver initialized
    NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.2.0.6
    NOTICE:  BL2: PRR is R-Car M3N Ver.1.0
    NOTICE:  BL2: Board is Salvator-XS Rev.1.0
    NOTICE:  BL2: Boot device is HyperFlash(160MHz)
    NOTICE:  BL2: LCM state is CM
    NOTICE:  AVS setting succeeded. DVFS_SetVID=0x53
    NOTICE:  BL2: DDR3200(rev.0.40)
    NOTICE:  BL2: [WARM_BOOT]
    NOTICE:  BL2: DRAM Split is OFF
    NOTICE:  BL2: QoS is default setting(rev.0.09)
    NOTICE:  BL2: DRAM refresh interval 1.95 usec
    NOTICE:  BL2: Periodic Write DQ Training
    NOTICE:  BL2: CH0: 400000000 - 47fffffff, 2 GiB
    NOTICE:  BL2: FDT at 0xe6322508
    NOTICE:  BL2: v2.3(release):v2.3-188-g9935047b2086faa3
    NOTICE:  BL2: Built : 23:31:02, Jun 18 2020
    NOTICE:  BL2: Normal boot
    INFO:    BL2: Doing platform setup
    [  347.461237] Enabling non-boot CPUs ...
    [  347.465551] Detected PIPT I-cache on CPU1
    [  347.465611] CPU1: Booted secondary processor 0x0000000001 [0x411fd073]
    [  347.468691] CPU1 is up
    [  347.607806] usb usb2: root hub lost power or was reset
    [  347.613594] usb usb1: root hub lost power or was reset
    [  347.767713] usb usb4: root hub lost power or was reset
    [  347.773424] usb usb3: root hub lost power or was reset
    [  347.775223] libphy: ravb_mii: probed
    [  347.782808] mdio_bus e6800000.ethernet-ffffffff: MDIO device at address 0 is missing.
    [  347.794508] ravb e6800000.ethernet eth0: failed to connect PHY
    [  347.802223] PM: dpm_run_callback(): ravb_resume+0x0/0x190 returns -2
    [  347.808739] PM: Device e6800000.ethernet failed to resume: error -2
    [  347.929701] ata1: link resume succeeded after 1 retries
    [  347.989934] OOM killer enabled.
    [  347.993184] Restarting tasks ... done.
    [  348.004321] PM: suspend exit
    [  348.039400] ata1: SATA link down (SStatus 0 SControl 300)
    [  529.376515] nfs: server 10.0.1.1 not responding, still trying
    [  529.376702] nfs: server 10.0.1.1 not responding, still trying
    [  529.385628] nfs: server 10.0.1.1 not responding, still trying
    ** Board never reaches user-space **

Is there a known fix for this?

> 
> 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

-- 
Regards,
Niklas Söderlund



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux