ASoC: SOF: Intel: Add fw_regs area to debugfs map for IPC4
Subsystems (3)
Peter Ujfalusi
maintainercover ASoC: SOF: Intel: Add fw_regs area to debugfs map for IPC4
Hi,
The beginning of the first SRAM window contains various fw registers and additional information which can be very beneficial to read to gather information on the current states to debug issues.
Regards,
Peter
---
Peter Ujfalusi (3):
ASoC: SOF: Intel: tgl: Add fw_regs area to debugfs map for IPC4
ASoC: SOF: Intel: mtl: Add fw_regs area to debugfs map
ASoC: SOF: Intel: lnl: Add fw_regs area to debugfs map
sound/soc/sof/intel/lnl.c | 1 + sound/soc/sof/intel/mtl.c | 1 + sound/soc/sof/intel/tgl.c | 15 +++++++++++---- 3 files changed, 13 insertions(+), 4 deletions(-)
Signature · 1 line
2.44.0
Peter Ujfalusi
maintainerPATCH 1/3 ASoC: SOF: Intel: tgl: Add fw_regs area to debugfs map for IPC4
Expose the firmware registers via debugfs. it can be of great help while debugging complex issues.
The area is only available with IPC4.
--- sound/soc/sof/intel/tgl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
sound/soc/sof/intel/tgl.c +11 -4
@@ -22,6 +22,13 @@ static const struct snd_sof_debugfs_map tgl_dsp_debugfs[] = { {"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS}, }; +static const struct snd_sof_debugfs_map tgl_ipc4_dsp_debugfs[] = { + {"hda" ,HDA_DSP_HDA_BAR ,0 ,0x4000 ,SOF_DEBUGFS_ACCESS_ALWAYS }, + {"pp" ,HDA_DSP_PP_BAR ,0 ,0x1000 ,SOF_DEBUGFS_ACCESS_ALWAYS }, + {"dsp" ,HDA_DSP_BAR ,0 ,0x10000 ,SOF_DEBUGFS_ACCESS_ALWAYS }, + {"fw_regs" ,HDA_DSP_BAR ,SRAM_WINDOW_OFFSET (0 ),0x1000 ,SOF_DEBUGFS_ACCESS_D0_ONLY }, +}; +static int tgl_dsp_core_get (struct snd_sof_dev *sdev,int core) {const struct sof_ipc_pm_ops *pm_ops = sdev->ipc->ops->pm;
@@ -75,6 +82,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)/* debug */ sof_tgl_ops.ipc_dump = cnl_ipc_dump; + sof_tgl_ops.debug_map = tgl_dsp_debugfs; + sof_tgl_ops.debug_map_count =ARRAY_SIZE (tgl_dsp_debugfs); sof_tgl_ops.set_power_state = hda_dsp_set_power_state_ipc3; }
@@ -105,6 +114,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)/* debug */ sof_tgl_ops.ipc_dump = cnl_ipc4_dump; sof_tgl_ops.dbg_dump = hda_ipc4_dsp_dump; + sof_tgl_ops.debug_map = tgl_ipc4_dsp_debugfs; + sof_tgl_ops.debug_map_count =ARRAY_SIZE (tgl_ipc4_dsp_debugfs); sof_tgl_ops.set_power_state = hda_dsp_set_power_state_ipc4; }
@@ -112,10 +123,6 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)/* set DAI driver ops */ hda_set_dai_drv_ops (sdev, &sof_tgl_ops); -/* debug */ - sof_tgl_ops.debug_map = tgl_dsp_debugfs; - sof_tgl_ops.debug_map_count =ARRAY_SIZE (tgl_dsp_debugfs); -/* pre/post fw run */ sof_tgl_ops.post_fw_run = hda_dsp_post_fw_run;
Signature · 1 line
2.44.0
Peter Ujfalusi
maintainerPATCH 2/3 ASoC: SOF: Intel: mtl: Add fw_regs area to debugfs map
In reply to Peter UjfalusiExpose the firmware registers via debugfs. it can be of great help while debugging complex issues.
--- sound/soc/sof/intel/mtl.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/sof/intel/mtl.c +1 -0
@@ -25,6 +25,7 @@ static const struct snd_sof_debugfs_map mtl_dsp_debugfs[] = { {"hda", HDA_DSP_HDA_BAR, 0, 0x4000, SOF_DEBUGFS_ACCESS_ALWAYS}, {"pp", HDA_DSP_PP_BAR, 0, 0x1000, SOF_DEBUGFS_ACCESS_ALWAYS}, {"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS}, + {"fw_regs", HDA_DSP_BAR, MTL_SRAM_WINDOW_OFFSET(0), 0x1000, SOF_DEBUGFS_ACCESS_D0_ONLY}, };static void mtl_ipc_host_done (struct snd_sof_dev *sdev)
Signature · 1 line
2.44.0
Peter Ujfalusi
maintainerPATCH 3/3 ASoC: SOF: Intel: lnl: Add fw_regs area to debugfs map
In reply to Peter UjfalusiExpose the firmware registers via debugfs. it can be of great help while debugging complex issues.
--- sound/soc/sof/intel/lnl.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/sof/intel/lnl.c +1 -0
@@ -28,6 +28,7 @@ static const struct snd_sof_debugfs_map lnl_dsp_debugfs[] = { {"hda", HDA_DSP_HDA_BAR, 0, 0x4000, SOF_DEBUGFS_ACCESS_ALWAYS}, {"pp", HDA_DSP_PP_BAR, 0, 0x1000, SOF_DEBUGFS_ACCESS_ALWAYS}, {"dsp", HDA_DSP_BAR, 0, 0x10000, SOF_DEBUGFS_ACCESS_ALWAYS}, + {"fw_regs", HDA_DSP_BAR, MTL_SRAM_WINDOW_OFFSET(0), 0x1000, SOF_DEBUGFS_ACCESS_D0_ONLY}, };/* this helps allows the DSP to setup DMIC/SSP */
Signature · 1 line
2.44.0
Mark Brown
maintainerQuoted 8 lines · Peter Ujfalusi
The beginning of the first SRAM window contains various fw registers and additional information which can be very beneficial to read to gather information on the current states to debug issues.
Regards,
Peter[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: SOF: Intel: tgl: Add fw_regs area to debugfs map for IPC4
commit: 25ab9c40e77ed4d73995fb6eef514e2e9c421dab
[2/3] ASoC: SOF: Intel: mtl: Add fw_regs area to debugfs map
commit: d33a369ddad522eff40c6b9687db1488e19729d6
[3/3] ASoC: SOF: Intel: lnl: Add fw_regs area to debugfs map
commit: 61faefa220262de60d652dd6b91fdcb7ecae2258All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark