]> www.infradead.org Git - users/hch/configfs.git/commit
ALSA: hda: Conditionally use snooping for AMD HDMI
authorTakashi Iwai <tiwai@suse.de>
Wed, 31 Jul 2024 17:05:15 +0000 (19:05 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 31 Jul 2024 17:05:58 +0000 (19:05 +0200)
commit478689b5990deb626a0b3f1ebf165979914d6be4
tree9ba3420303f84930751e86756950b1a5d693727f
parentb7b7e1ab7619deb3b299b5e5c619c3e6f183a12d
ALSA: hda: Conditionally use snooping for AMD HDMI

The recent regression report revealed that the use of WC pages for AMD
HDMI device together with AMD IOMMU leads to unexpected truncation or
noises.  The issue seems triggered by the change in the kernel core
memory allocation that enables IOMMU driver to use always S/G
buffers.  Meanwhile, the use of WC pages has been a workaround for the
similar issue with standard pages in the past.  So, now we need to
apply the workaround conditionally, namely, only when IOMMU isn't in
place.

This patch modifies the workaround code to check the DMA ops at first
and apply the snoop-off only when needed.

Fixes: f5ff79fddf0e ("dma-mapping: remove CONFIG_DMA_REMAP")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219087
Link: https://patch.msgid.link/20240731170521.31714-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_controller.h
sound/pci/hda/hda_intel.c