zephyr: secondary cores power down
Adding implementation of cpu cores disabling function with usage of a zephyr power manager. Refactorization of a existing code and moving it to the target location (out of the zephyr wrapper).
@lgirdwood I would need somebody's help to troubleshoot this failing build.
Which failing build? Always add a URL when referring to a failure because they're very difficult/impossible to find after a force-push.
I submitted fix for the failure in https://github.com/thesofproject/sof/actions/runs/3200413833/jobs/5227280622 in #6370 , please help review.
@tmleman Did a custom local test with IPC4 and got this error on cAVS2.5/tgl:
[10768.114532] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx : 0x47000000|0x0: MOD_SET_DX [data size: 8] [10768.114717] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx reply: 0x67000004|0x0: MOD_SET_DX [10768.114723] sof-audio-pci-intel-tgl 0000:00:1f.3: FW reported error: 4 - The system or resource is busy [10768.114751] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc error for msg 0x47000000|0x0 [10768.114755] sof-audio-pci-intel-tgl 0000:00:1f.3: ctx_save IPC error during suspend: -16
This happens every time system is put to runtime-suspend (MOD_SET_DX sent).
Can one of the admins verify this patch?
This happens every time system is put to runtime-suspend (MOD_SET_DX sent).
@kv2019i The reason for that is probably that tgl don't use zephyr power management api. I'm not sure if it makes sense to keep this mock in the form of an internal variable (w_core_enable_mask). This is an implementation for MTL and the version for TGL should match.
@tmleman wrote:
@kv2019i The reason for that is probably that tgl don't use zephyr power management api. I'm not sure if it makes sense to keep this mock in the form of an internal variable (w_core_enable_mask). This is an implementation for MTL and the version for TGL should match.
Can we keep the mock for TGL, so we could merge this and then remove the mock when TGL is fully enabled on Zephyr side?
@tmleman wrote:
@kv2019i The reason for that is probably that tgl don't use zephyr power management api. I'm not sure if it makes sense to keep this mock in the form of an internal variable (w_core_enable_mask). This is an implementation for MTL and the version for TGL should match.
Can we keep the mock for TGL, so we could merge this and then remove the mock when TGL is fully enabled on Zephyr side?
@kv2019i Whats the ETA for TGL to get the PM update. Which code parts do you need to keep atm for TGL (not following whats meant by mock).
@lgirdwood wrote:
@kv2019i Whats the ETA for TGL to get the PM update. Which code parts do you need to keep atm for TGL (not following whats meant by mock).
Nobody is working on this atm. The native drivers change and various P1 bugs that are open, are currently taking precedence. If we can't keep the mock, we need to reshuffle tasks. The mock is basicly a bitmask that follows state of power-up/down per core. In TGL implementation, cores are only powered up, never powered down. But to keep upper layers happy, we need to return mock state (e.g. if host powers down core1, we need to report core1 is powered down -> mock).
@tmleman pls keep the mock for TGL atm, we can have a Kconfig switch here if needed in short term.
https://sof-ci.01.org/sofpr/PR6041/build2068/devicetest/ is now all green!
Good to go @lgirdwood ? You still had comments...