ALSA: Set max DMA segment size
Subsystems (4)
cover ALSA: Set max DMA segment size
Hi,
this is a oneliner patches to address the spurious kernel WARNING from DMA debug code for the missing setup of DMA segment size for SG pages.
Takashi
===
Takashi Iwai (3):
ALSA: hda: Set max DMA segment size
ASoC: SOF: hda: Set max DMA segment size
ASoC: intel: skylake: Set max DMA segment size
sound/pci/hda/hda_intel.c | 1 + sound/soc/intel/skylake/skl.c | 1 + sound/soc/sof/intel/hda.c | 1 + 3 files changed, 3 insertions(+)
Signature · 1 line
2.31.1
PATCH 1/3 ALSA: hda: Set max DMA segment size
The recent code refactoring to use the standard DMA helper requires
the max DMA segment size setup for SG list management. Without it,
the kernel may spew warnings when a large buffer is allocated.
This patch sets up dma_set_max_seg_size() for avoiding spurious
warnings.
--- sound/pci/hda/hda_intel.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/hda_intel.c +1 -0
@@ -1941,6 +1941,7 @@ static int azx_first_init(struct azx *chip) dma_bits =32 ;if (dma_set_mask_and_coherent (&pci->dev,DMA_BIT_MASK (dma_bits)))dma_set_mask_and_coherent (&pci->dev,DMA_BIT_MASK (32 )); +dma_set_max_seg_size (&pci->dev,UINT_MAX );/* read number of streams from GCAP register instead of using * hardcoded value
Signature · 1 line
2.31.1
PATCH 2/3 ASoC: SOF: hda: Set max DMA segment size
In reply to Takashi IwaiThe recent code refactoring to use the standard DMA helper requires
the max DMA segment size setup for SG list management. Without it,
the kernel may spew warnings when a large buffer is allocated.
This patch sets up dma_set_max_seg_size() for avoiding spurious
warnings.
--- sound/soc/sof/intel/hda.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/sof/intel/hda.c +1 -0
@@ -956,6 +956,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)dev_dbg (sdev->dev,"DMA mask is 32 bit\n" );dma_set_mask_and_coherent (&pci->dev,DMA_BIT_MASK (32 )); } +dma_set_max_seg_size (&pci->dev,UINT_MAX );/* init streams */ ret =hda_dsp_stream_init (sdev);
Signature · 1 line
2.31.1
Re: [PATCH 2/3] ASoC: SOF: hda: Set max DMA segment size
Quoted 3 lines · Takashi Iwai
The recent code refactoring to use the standard DMA helper requires
the max DMA segment size setup for SG list management. Without it,
the kernel may spew warnings when a large buffer is allocated.
PATCH 3/3 ASoC: intel: skylake: Set max DMA segment size
In reply to Takashi IwaiThe recent code refactoring to use the standard DMA helper requires the max DMA segment size setup for SG list management. Without it, the kernel may spew warnings when a large buffer is allocated.
This patch sets up dma_set_max_seg_size() for avoiding spurious warnings.
--- sound/soc/intel/skylake/skl.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/intel/skylake/skl.c +1 -0
@@ -952,6 +952,7 @@ static int skl_first_init(struct hdac_bus *bus)/* allow 64bit DMA address if supported by H/W */ if (dma_set_mask_and_coherent (bus->dev,DMA_BIT_MASK (64 )))dma_set_mask_and_coherent (bus->dev,DMA_BIT_MASK (32 )); +dma_set_max_seg_size (bus->dev,UINT_MAX );/* initialize streams */ snd_hdac_ext_stream_init_all
Signature · 1 line
2.31.1
Re: [PATCH 3/3] ASoC: intel: skylake: Set max DMA segment size
Quoted 6 lines · Takashi Iwai
The recent code refactoring to use the standard DMA helper requires the max DMA segment size setup for SG list management. Without it, the kernel may spew warnings when a large buffer is allocated.
This patch sets up
dma_set_max_seg_size()for avoiding spurious warnings.
Thanks for accounting for skylake-driver when providing fixes.
Quoted 20 lines
Fixes 2c95b92ecd92 ("ALSA: memalloc: Unify x86 SG-buffer handling (take#3)")Cc <[email protected]>Signed-off-by Takashi Iwai <[email protected]>--- sound/soc/intel/skylake/skl.c | 1 + 1 file changed, 1 insertion(+)sound/soc/intel/skylake/skl.c +1
-0@@ -952,6 +952,7 @@ static int skl_first_init(struct hdac_bus *bus)/* allow 64bit DMA address if supported by H/W */ if (dma_set_mask_and_coherent (bus->dev,DMA_BIT_MASK (64 )))dma_set_mask_and_coherent (bus->dev,DMA_BIT_MASK (32 )); +dma_set_max_seg_size (bus->dev,UINT_MAX );/* initialize streams */ snd_hdac_ext_stream_init_all
Re: [PATCH 3/3] ASoC: intel: skylake: Set max DMA segment size
In reply to Takashi IwaiQuoted 3 lines · Takashi Iwai
The recent code refactoring to use the standard DMA helper requires the max DMA segment size setup for SG list management. Without it, the kernel may spew warnings when a large buffer is allocated.
Quoted 7 lines · Takashi Iwai
Hi,
this is a oneliner patches to address the spurious kernel WARNING from DMA debug code for the missing setup of DMA segment size for SG pages.
Quoted 8 lines
Takashi
===
Takashi Iwai (3):
ALSA: hda: Set max DMA segment size
ASoC: SOF: hda: Set max DMA segment size
ASoC: intel: skylake: Set max DMA segment size
Merged now to for-linus branch.
Takashi