Skip to content

Commit

Permalink
Revert "ALSA: hda: Conditionally use snooping for AMD HDMI"
Browse files Browse the repository at this point in the history
commit 3f7f36a upstream.

This reverts commit 478689b.

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: Salvatore Bonaccorso <[email protected]>
Closes: https://lore.kernel.org/[email protected]
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
tiwai authored and gregkh committed Oct 10, 2024
1 parent 2c74d33 commit b8c0aee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#else
#define AZX_DCAPS_I915_COMPONENT 0 /* NOP */
#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_POSFIX_LPIB (1 << 16) /* Use LPIB as default */
#define AZX_DCAPS_AMD_WORKAROUND (1 << 17) /* AMD-specific workaround */
Expand Down
10 changes: 1 addition & 9 deletions sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

#ifdef CONFIG_X86
/* for snoop control */
#include <linux/dma-map-ops.h>
#include <asm/set_memory.h>
#include <asm/cpufeature.h>
#endif
Expand Down Expand Up @@ -302,7 +301,7 @@ enum {

/* quirks for ATI HDMI with snoop off */
#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 */
#define AZX_DCAPS_PRESET_AMD_SB \
Expand Down Expand Up @@ -1716,13 +1715,6 @@ static void azx_check_snoop_available(struct azx *chip)
if (chip->driver_caps & AZX_DCAPS_SNOOP_OFF)
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;
if (!snoop) {
dev_info(chip->card->dev, "Force to non-snoop mode\n");
Expand Down

0 comments on commit b8c0aee

Please sign in to comment.