Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Intel: catpt: Fix the device initialization

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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260320101217.1243688-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Cezary Rojewski and committed by
Mark Brown
5a184f1c 2594196f

+9 -4
+9 -1
sound/soc/intel/catpt/device.c
··· 281 281 if (IS_ERR(cdev->pci_ba)) 282 282 return PTR_ERR(cdev->pci_ba); 283 283 284 - /* alloc buffer for storing DRAM context during dx transitions */ 284 + /* 285 + * As per design HOST is responsible for preserving firmware's runtime 286 + * context during D0 -> D3 -> D0 transitions. Addresses used for DMA 287 + * to/from HOST memory shall be outside the reserved range of 0xFFFxxxxx. 288 + */ 289 + ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31)); 290 + if (ret) 291 + return ret; 292 + 285 293 cdev->dxbuf_vaddr = dmam_alloc_coherent(dev, catpt_dram_size(cdev), 286 294 &cdev->dxbuf_paddr, GFP_KERNEL); 287 295 if (!cdev->dxbuf_vaddr)
-3
sound/soc/intel/catpt/dsp.c
··· 125 125 dmac->dev = cdev->dev; 126 126 dmac->irq = cdev->irq; 127 127 128 - ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31)); 129 - if (ret) 130 - return ret; 131 128 /* 132 129 * Caller is responsible for putting device in D0 to allow 133 130 * for I/O and memory access before probing DW.