cAVS pm-runtime for DSP core 0

cAVS provides two levels of power savings for DSP cores:

  • clock gating,

  • power gating in idle, important part of D0i3 state.

The clock gating is enabled by default. When a DSP core enters idle (calls waiti), the clock signal is gated (note that CCOUNT is not incremented in this state, so the only reliable always running clock is the Wall Clock).

The power gating mechanism is enabled if the CAVS_LPS config option is set. The waiti entry/exit transitions are driven by the Low Power Sequencer (LPS). The platform is able to shut the DSP core down on waiti and power it up on interrupt.

The LPS mechanism is used only if pm_runtime_is_active() returns false meaning that DPS core 0 does not have to be locked in D0 state.

Implementation note: cAVS simply uses pm_runtime_get() /pm_runtime_put() operations to program the power gating control registers in D0i3 to indicate that DSP core should be powered down/up while entering/exiting waiti.

scale max 800 width

participant platform
participant lps as "cavs/lps_wait"
participant lps_pg as "cavs/lps\npg thread"
participant pm_rt as "pm-runtime"

participant lpsram_boot as "Lpsram\nBoot"
participant dsp_rom as "Dsp\nRom"

-> platform : platform_wait_for_interrupt()
   activate platform
   platform -> lps : lps_wait_for_interrupt()
      activate lps
      lps -> lps : platform_pg\nint_handler(D0i3/D0) [SW INT]
         activate lps
         lps -> pm_rt : <b>pm_runtime_put(DSP, 0)</b>
            note right: DSP core PG\nenabled
         lps -> lps_pg : platform_pg_task
         deactivate lps
            activate lps_pg
               lps_pg -> lps_pg : configure lpsram boot
               lps_pg -> lps_pg : waiti
                  note right: DSP core is PG-ed
               deactivate lps_pg

dsp_rom <- : INT
lpsram_boot <- dsp_rom
lps <- lpsram_boot : platform_pg\nint_handler(D0i3/D0) [SW INT]
   activate lps
   lps -> pm_rt : <b>pm_runtime_get(DSP, 0)
      note right: DSP core PG\ndisabled
   lps <-- lps
   deactivate lps
platform <-- lps
<-- platform

Figure 15 DSP Core 0 idle in D0i3 on cAVS with LPS