From: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
"Mukunda, Vijendar" <Vijendar.Mukunda@amd.com>
Cc: sound-open-firmware@alsa-project.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH] ASoC: SOF: amd: Skip IRAM/DRAM size modification for Steam Deck OLED
Date: Fri, 9 Feb 2024 18:19:55 +0530 [thread overview]
Message-ID: <f4b87510-4f55-4364-960f-5870c4d86874@amd.com> (raw)
In-Reply-To: <20240209122810.2258042-1-cristian.ciocaltea@collabora.com>
On 2/9/24 17:58, Cristian Ciocaltea wrote:
> The recent introduction of the ACP/PSP communication for IRAM/DRAM fence
> register modification breaks the audio support on Valve's Steam Deck
> OLED device.
>
> It causes IPC timeout errors when trying to load DSP topology during
> probing:
>
> 1707255557.688176 kernel: snd_sof_amd_vangogh 0000:04:00.5: ipc tx timed out for 0x30100000 (msg/reply size: 48/0)
> 1707255557.689035 kernel: snd_sof_amd_vangogh 0000:04:00.5: ------------[ IPC dump start ]------------
> 1707255557.689421 kernel: snd_sof_amd_vangogh 0000:04:00.5: dsp_msg = 0x0 dsp_ack = 0x91d14f6f host_msg = 0x1 host_ack = 0xead0f1a4 irq_stat >
> 1707255557.689730 kernel: snd_sof_amd_vangogh 0000:04:00.5: ------------[ IPC dump end ]------------
> 1707255557.690074 kernel: snd_sof_amd_vangogh 0000:04:00.5: ------------[ DSP dump start ]------------
> 1707255557.690376 kernel: snd_sof_amd_vangogh 0000:04:00.5: IPC timeout
> 1707255557.690744 kernel: snd_sof_amd_vangogh 0000:04:00.5: fw_state: SOF_FW_BOOT_COMPLETE (7)
> 1707255557.691037 kernel: snd_sof_amd_vangogh 0000:04:00.5: invalid header size 0xdb43fe7. FW oops is bogus
> 1707255557.694824 kernel: snd_sof_amd_vangogh 0000:04:00.5: unexpected fault 0x6942d3b3 trace 0x6942d3b3
> 1707255557.695392 kernel: snd_sof_amd_vangogh 0000:04:00.5: ------------[ DSP dump end ]------------
> 1707255557.695755 kernel: snd_sof_amd_vangogh 0000:04:00.5: Failed to setup widget PIPELINE.6.ACPHS1.IN
> 1707255557.696069 kernel: snd_sof_amd_vangogh 0000:04:00.5: error: tplg component load failed -110
> 1707255557.696374 kernel: snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP topology -22
> 1707255557.697904 kernel: snd_sof_amd_vangogh 0000:04:00.5: ASoC: error at snd_soc_component_probe on 0000:04:00.5: -22
> 1707255557.698405 kernel: sof_mach nau8821-max: ASoC: failed to instantiate card -22
> 1707255557.701061 kernel: sof_mach nau8821-max: error -EINVAL: Failed to register card(sof-nau8821-max)
> 1707255557.701624 kernel: sof_mach: probe of nau8821-max failed with error -22
>
> It's worth noting this is the only Vangogh compatible device for which
> signed firmware support has been enabled in AMD ACP SOF driver via
> acp_sof_quirk_table.
>
> Hence, use this information and skip IRAM/DRAM size modification for Vangogh
> platforms having the signed_fw_image field set.
>
> Fixes: 55d7bbe43346 ("ASoC: SOF: amd: Add acp-psp mailbox interface for iram-dram fence register modification")
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> ---
> sound/soc/sof/amd/acp.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
> index 9b3c26210db3..71689d2a5b56 100644
> --- a/sound/soc/sof/amd/acp.c
> +++ b/sound/soc/sof/amd/acp.c
> @@ -278,7 +278,14 @@ int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr,
> }
>
> /* psp_send_cmd only required for vangogh platform (rev - 5) */
> - if (desc->rev == 5) {
> + /*
> + * FIXME: This causes IPC timeout when trying to load DSP topology
> + * on the Steam Deck OLED device matching acp_sof_quirk_table above.
> + * The quirk enables signed firmware support on this particular
> + * Vangogh compatible device, hence skip IRAM/DRAM size modification
> + * when signed_fw_image is set.
> + */
> + if (desc->rev == 5 && !adata->signed_fw_image) {
Programming ACP_IRAM_DRAM_FENCE register to modify the size of IRAM and
DRAM and it's noting related to signed or unsigned fw_image.
This ACP_IRAM_DRAM_FENCE register writing need to do before starting sha
dma.
> /* Modify IRAM and DRAM size */
> ret = psp_send_cmd(adata, MBOX_ACP_IRAM_DRAM_FENCE_COMMAND | IRAM_DRAM_FENCE_2);
> if (ret)
next prev parent reply other threads:[~2024-02-09 12:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 12:28 [PATCH] ASoC: SOF: amd: Skip IRAM/DRAM size modification for Steam Deck OLED Cristian Ciocaltea
2024-02-09 12:49 ` Venkata Prasad Potturu [this message]
2024-02-09 20:04 ` Cristian Ciocaltea
-- strict thread matches above, loose matches on Subject: below --
2024-02-20 20:01 Cristian Ciocaltea
2024-02-20 20:21 ` Cristian Ciocaltea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4b87510-4f55-4364-960f-5870c4d86874@amd.com \
--to=venkataprasad.potturu@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=broonie@kernel.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel@collabora.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox