]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: SOF: Intel: Add context data to any IPC timeout.
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Fri, 27 Sep 2019 20:05:37 +0000 (15:05 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 1 Oct 2019 17:35:36 +0000 (18:35 +0100)
Helps with FW debug as it provides DSP IPC processing context.

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-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/bdw.c
sound/soc/sof/intel/byt.c

index e282179263e8346f18a24d36389c2a71c8db9f47..170c74dc13b1995a768479c2ccb3e4748ed95d9e 100644 (file)
@@ -241,7 +241,7 @@ static void bdw_dump(struct snd_sof_dev *sdev, u32 flags)
        struct sof_ipc_dsp_oops_xtensa xoops;
        struct sof_ipc_panic_info panic_info;
        u32 stack[BDW_STACK_DUMP_SIZE];
-       u32 status, panic;
+       u32 status, panic, imrx, imrd;
 
        /* now try generic SOF status messages */
        status = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IPCD);
@@ -250,6 +250,26 @@ static void bdw_dump(struct snd_sof_dev *sdev, u32 flags)
                          BDW_STACK_DUMP_SIZE);
        snd_sof_get_status(sdev, status, panic, &xoops, &panic_info, stack,
                           BDW_STACK_DUMP_SIZE);
+
+       /* provide some context for firmware debug */
+       imrx = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IMRX);
+       imrd = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IMRD);
+       dev_err(sdev->dev,
+               "error: ipc host -> DSP: pending %s complete %s raw 0x%8.8x\n",
+               panic & SHIM_IPCX_BUSY ? "yes" : "no",
+               panic & SHIM_IPCX_DONE ? "yes" : "no", panic);
+       dev_err(sdev->dev,
+               "error: mask host: pending %s complete %s raw 0x%8.8x\n",
+               imrx & SHIM_IMRX_BUSY ? "yes" : "no",
+               imrx & SHIM_IMRX_DONE ? "yes" : "no", imrx);
+       dev_err(sdev->dev,
+               "error: ipc DSP -> host: pending %s complete %s raw 0x%8.8x\n",
+               status & SHIM_IPCD_BUSY ? "yes" : "no",
+               status & SHIM_IPCD_DONE ? "yes" : "no", status);
+       dev_err(sdev->dev,
+               "error: mask DSP: pending %s complete %s raw 0x%8.8x\n",
+               imrd & SHIM_IMRD_BUSY ? "yes" : "no",
+               imrd & SHIM_IMRD_DONE ? "yes" : "no", imrd);
 }
 
 /*
index 5e7a6aaa627a82490448b9a0ce549eb47b08264e..ecbc9c79bcad35cc3637cbd6b0f536c02a24384f 100644 (file)
@@ -139,7 +139,7 @@ static void byt_dump(struct snd_sof_dev *sdev, u32 flags)
        struct sof_ipc_dsp_oops_xtensa xoops;
        struct sof_ipc_panic_info panic_info;
        u32 stack[BYT_STACK_DUMP_SIZE];
-       u32 status, panic;
+       u32 status, panic, imrd, imrx;
 
        /* now try generic SOF status messages */
        status = snd_sof_dsp_read(sdev, BYT_DSP_BAR, SHIM_IPCD);
@@ -148,6 +148,27 @@ static void byt_dump(struct snd_sof_dev *sdev, u32 flags)
                          BYT_STACK_DUMP_SIZE);
        snd_sof_get_status(sdev, status, panic, &xoops, &panic_info, stack,
                           BYT_STACK_DUMP_SIZE);
+
+       /* provide some context for firmware debug */
+       imrx = snd_sof_dsp_read(sdev, BYT_DSP_BAR, SHIM_IMRX);
+       imrd = snd_sof_dsp_read(sdev, BYT_DSP_BAR, SHIM_IMRD);
+       dev_err(sdev->dev,
+               "error: ipc host -> DSP: pending %s complete %s raw 0x%8.8x\n",
+               panic & SHIM_IPCX_BUSY ? "yes" : "no",
+               panic & SHIM_IPCX_DONE ? "yes" : "no", panic);
+       dev_err(sdev->dev,
+               "error: mask host: pending %s complete %s raw 0x%8.8x\n",
+               imrx & SHIM_IMRX_BUSY ? "yes" : "no",
+               imrx & SHIM_IMRX_DONE ? "yes" : "no", imrx);
+       dev_err(sdev->dev,
+               "error: ipc DSP -> host: pending %s complete %s raw 0x%8.8x\n",
+               status & SHIM_IPCD_BUSY ? "yes" : "no",
+               status & SHIM_IPCD_DONE ? "yes" : "no", status);
+       dev_err(sdev->dev,
+               "error: mask DSP: pending %s complete %s raw 0x%8.8x\n",
+               imrd & SHIM_IMRD_BUSY ? "yes" : "no",
+               imrd & SHIM_IMRD_DONE ? "yes" : "no", imrd);
+
 }
 
 /*