Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: catpt: Fix the device initialization
@ 2026-03-20 10:12 Cezary Rojewski
  2026-03-20 19:31 ` Andy Shevchenko
  2026-03-23 17:33 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Cezary Rojewski @ 2026-03-20 10:12 UTC (permalink / raw)
  To: broonie
  Cc: tiwai, perex, amade, andriy.shevchenko, linux-sound,
	Cezary Rojewski

The DMA mask shall be coerced before any buffer allocations for the
device are done.  At the same time explain why DMA mask of 31 bits is
used in the first place.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/catpt/device.c | 10 +++++++++-
 sound/soc/intel/catpt/dsp.c    |  3 ---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c
index b5f4361d4465..ca4fd18b6a6e 100644
--- a/sound/soc/intel/catpt/device.c
+++ b/sound/soc/intel/catpt/device.c
@@ -281,7 +281,15 @@ static int catpt_acpi_probe(struct platform_device *pdev)
 	if (IS_ERR(cdev->pci_ba))
 		return PTR_ERR(cdev->pci_ba);
 
-	/* alloc buffer for storing DRAM context during dx transitions */
+	/*
+	 * As per design HOST is responsible for preserving firmware's runtime
+	 * context during D0 -> D3 -> D0 transitions.  Addresses used for DMA
+	 * to/from HOST memory shall be outside the reserved range of 0xFFFxxxxx.
+	 */
+	ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31));
+	if (ret)
+		return ret;
+
 	cdev->dxbuf_vaddr = dmam_alloc_coherent(dev, catpt_dram_size(cdev),
 						&cdev->dxbuf_paddr, GFP_KERNEL);
 	if (!cdev->dxbuf_vaddr)
diff --git a/sound/soc/intel/catpt/dsp.c b/sound/soc/intel/catpt/dsp.c
index 008a20a2acbd..677f348909c8 100644
--- a/sound/soc/intel/catpt/dsp.c
+++ b/sound/soc/intel/catpt/dsp.c
@@ -125,9 +125,6 @@ int catpt_dmac_probe(struct catpt_dev *cdev)
 	dmac->dev = cdev->dev;
 	dmac->irq = cdev->irq;
 
-	ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31));
-	if (ret)
-		return ret;
 	/*
 	 * Caller is responsible for putting device in D0 to allow
 	 * for I/O and memory access before probing DW.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Intel: catpt: Fix the device initialization
  2026-03-20 10:12 [PATCH] ASoC: Intel: catpt: Fix the device initialization Cezary Rojewski
@ 2026-03-20 19:31 ` Andy Shevchenko
  2026-03-23 17:33 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-03-20 19:31 UTC (permalink / raw)
  To: Cezary Rojewski; +Cc: broonie, tiwai, perex, amade, linux-sound

On Fri, Mar 20, 2026 at 11:12:17AM +0100, Cezary Rojewski wrote:
> The DMA mask shall be coerced before any buffer allocations for the
> device are done.  At the same time explain why DMA mask of 31 bits is
> used in the first place.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Intel: catpt: Fix the device initialization
  2026-03-20 10:12 [PATCH] ASoC: Intel: catpt: Fix the device initialization Cezary Rojewski
  2026-03-20 19:31 ` Andy Shevchenko
@ 2026-03-23 17:33 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-03-23 17:33 UTC (permalink / raw)
  To: Cezary Rojewski; +Cc: tiwai, perex, amade, andriy.shevchenko, linux-sound

On Fri, 20 Mar 2026 11:12:17 +0100, Cezary Rojewski wrote:
> ASoC: Intel: catpt: Fix the device initialization

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.0

Thanks!

[1/1] ASoC: Intel: catpt: Fix the device initialization
      https://git.kernel.org/broonie/sound/c/5a184f1cb43a

All 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-24  0:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 10:12 [PATCH] ASoC: Intel: catpt: Fix the device initialization Cezary Rojewski
2026-03-20 19:31 ` Andy Shevchenko
2026-03-23 17:33 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox