aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/debug.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5Mark Brown1-2/+4
2019-10-28ASoC: SOF: Fix memory leak in sof_dfsentry_writeNavid Emamdoost1-2/+4
In the implementation of sof_dfsentry_write() memory allocated for string is leaked in case of an error. Go to error handling path if the d_name.name is not valid. Fixes: 091c12e1f50c ("ASoC: SOF: debug: add new debugfs entries for IPC flood test") Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20191027194856.4056-1-navid.emamdoost@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-01ASoC: SOF: ipc: retain DSP context after FW exception.Liam Girdwood1-0/+16
Add config option to prevent DSP entering D3 after any FW exception. This can then be used to dump FW context for debug. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190927200538.660-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-08ASoC: sof: Fix warning when IPC flood test is not enabledMark Brown1-1/+2
dentry is only used when the flood test is done so move the declaration of the variable inside the ifdef for the flood test. Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-01ASoC: SOF: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-31/+18
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, if a debugfs call fails, userspace is notified with an error in the log, so no need to log the error again. Because we no longer need to check the return value, there's no need to save the dentry returned by debugfs. Just use the dentry in the file pointer if we really need to figure out the "name" of the file being opened. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20190731131716.9764-3-gregkh@linuxfoundation.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-05ASoC: SOF: debug: fix possible memory leak in sof_dfsentry_write()Wei Yongjun1-2/+2
'string' is malloced in sof_dfsentry_write() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: 091c12e1f50c ("ASoC: SOF: debug: add new debugfs entries for IPC flood test") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20190705081637.157169-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-03ASoC: SOF: debug: add new debugfs entries for IPC flood testRanjani Sridharan1-0/+243
Add a couple of new debugfs entries "ipc_flood_count" and "ipc_flood_duration_ms" that can be used to execute the IPC flood test. "ipc_flood_count" floods the DSP with the number of test IPCs specified and ipc_flood_duration_ms floods the DSP with test IPC's for the duration(in ms) specified. The test stats such as average, min and max IPC response times are logged in the dmesg and saved in the debugfs entry cache buffer. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-03ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_itemRanjani Sridharan1-2/+2
Add mode parameter for snd_sof_debugfs_buf_item() to specify the mode while creating debugfs entries. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-28ASoC: SOF: Add driver debug support.Liam Girdwood1-0/+232
Add debugFS files that can be used to expose DSP memories and and peripherals to userspace to assist with firmware debugging. Since we cannot rely on debugFS, errors are logged but don't stop execution. When a resource cannot be read in D3, it is optionally cached on suspend. Copying memories from IO will increase the suspend latency, this should only used in engineering builds w/ debug options. This part will have to be enhanced when support for D0ix states is provided, currently only D0 and D3 are supported. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>