RE: [PATCH 3/4] ASoC: xlnx: formatter: set a 64-bit DMA mask
From: Dhanunjanrao, Katta
Date: Fri Nov 27 2026 - 01:26:46 EST
AMD General
Hi Mark,
Thank you for the review.
I will address the review comments and send an updated version.
Thanks,
Dhanunjay
-----Original Message-----
From: Mark Brown <broonie@xxxxxxxxxx>
Sent: Thursday, November 26, 2026 11:22 PM
To: Dhanunjanrao, Katta <katta.dhanunjanrao@xxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxx>; Liam Girdwood <lgirdwood@xxxxxxxxx>; Vincenzo Frascino <vincenzo.frascino@xxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>; Jaroslav Kysela <perex@xxxxxxxx>; Takashi Iwai <tiwai@xxxxxxxx>; Simek, Michal <michal.simek@xxxxxxx>; linux-sound@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Gaddipati, Naveen <naveen.gaddipati@xxxxxxx>
Subject: Re: [PATCH 3/4] ASoC: xlnx: formatter: set a 64-bit DMA mask
> hw_params splits the ring buffer address over the LSB and MSB buffer
> address registers, but the device is left on the default 32-bit mask.
> The coherent buffer therefore always comes from below 4G and the MSB
> register is only ever written as zero.
>
> Set a 64-bit mask so the buffer can sit in high memory as well.
>
> Signed-off-by: Dhanunjanrao Katta <katta.dhanunjanrao@xxxxxxx>
> ---
> sound/soc/xilinx/xlnx_formatter_pcm.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c
> b/sound/soc/xilinx/xlnx_formatter_pcm.c
> index fa7419439ec7..57901c9466a0 100644
> --- a/sound/soc/xilinx/xlnx_formatter_pcm.c
> +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
> @@ -8,6 +8,7 @@
>
> #include <linux/bitfield.h>
> #include <linux/clk.h>
> +#include <linux/dma-mapping.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/sizes.h>
> @@ -598,6 +599,11 @@ static int xlnx_formatter_pcm_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct clk *axi_clk, *aud_mclk, *axis_clk;
>
> + ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
Is this always safe, can we have instances restricted to 32 bits?
Yes, some instances/platforms can be limited to 32-bit DMA addressing. I’ll check the addressing capability of the Audio Formatter and make sure we don’t unconditionally assume 64-bit DMA support.
--
Mark Brown <broonie@xxxxxxxxxx>