Commit 3f7f36a4 authored by Takashi Iwai's avatar Takashi Iwai

Revert "ALSA: hda: Conditionally use snooping for AMD HDMI"

This reverts commit 478689b5.

The fix seems leading to regressions for other systems.
Also, the way to check the presence of IOMMU via get_dma_ops() isn't
reliable and it's no longer applicable for 6.12.  After all, it's no
right fix, so let's revert it at first.

To be noted, the PCM buffer allocation has been changed to try the
continuous pages at first since 6.12, so the problem could be already
addressed without this hackish workaround.
Reported-by: default avatarSalvatore Bonaccorso <carnil@debian.org>
Closes: https://lore.kernel.org/ZvgCdYfKgwHpJXGE@eldamar.lan
Link: https://patch.msgid.link/20241002155948.4859-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent df521561
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#else #else
#define AZX_DCAPS_I915_COMPONENT 0 /* NOP */ #define AZX_DCAPS_I915_COMPONENT 0 /* NOP */
#endif #endif
#define AZX_DCAPS_AMD_ALLOC_FIX (1 << 14) /* AMD allocation workaround */ /* 14 unused */
#define AZX_DCAPS_CTX_WORKAROUND (1 << 15) /* X-Fi workaround */ #define AZX_DCAPS_CTX_WORKAROUND (1 << 15) /* X-Fi workaround */
#define AZX_DCAPS_POSFIX_LPIB (1 << 16) /* Use LPIB as default */ #define AZX_DCAPS_POSFIX_LPIB (1 << 16) /* Use LPIB as default */
#define AZX_DCAPS_AMD_WORKAROUND (1 << 17) /* AMD-specific workaround */ #define AZX_DCAPS_AMD_WORKAROUND (1 << 17) /* AMD-specific workaround */
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#ifdef CONFIG_X86 #ifdef CONFIG_X86
/* for snoop control */ /* for snoop control */
#include <linux/dma-map-ops.h>
#include <asm/set_memory.h> #include <asm/set_memory.h>
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#endif #endif
...@@ -307,7 +306,7 @@ enum { ...@@ -307,7 +306,7 @@ enum {
/* quirks for ATI HDMI with snoop off */ /* quirks for ATI HDMI with snoop off */
#define AZX_DCAPS_PRESET_ATI_HDMI_NS \ #define AZX_DCAPS_PRESET_ATI_HDMI_NS \
(AZX_DCAPS_PRESET_ATI_HDMI | AZX_DCAPS_AMD_ALLOC_FIX) (AZX_DCAPS_PRESET_ATI_HDMI | AZX_DCAPS_SNOOP_OFF)
/* quirks for AMD SB */ /* quirks for AMD SB */
#define AZX_DCAPS_PRESET_AMD_SB \ #define AZX_DCAPS_PRESET_AMD_SB \
...@@ -1707,13 +1706,6 @@ static void azx_check_snoop_available(struct azx *chip) ...@@ -1707,13 +1706,6 @@ static void azx_check_snoop_available(struct azx *chip)
if (chip->driver_caps & AZX_DCAPS_SNOOP_OFF) if (chip->driver_caps & AZX_DCAPS_SNOOP_OFF)
snoop = false; snoop = false;
#ifdef CONFIG_X86
/* check the presence of DMA ops (i.e. IOMMU), disable snoop conditionally */
if ((chip->driver_caps & AZX_DCAPS_AMD_ALLOC_FIX) &&
!get_dma_ops(chip->card->dev))
snoop = false;
#endif
chip->snoop = snoop; chip->snoop = snoop;
if (!snoop) { if (!snoop) {
dev_info(chip->card->dev, "Force to non-snoop mode\n"); dev_info(chip->card->dev, "Force to non-snoop mode\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment