aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-10-17 12:23:59 -0400
committerTakashi Iwai <tiwai@suse.de>2016-10-18 05:20:17 -0400
commit3ab7511eafdd5c4f40d2832f09554478dfbea170 (patch)
tree3a6db9520f769f63f43a4dcf1058114e5d94e5dd /sound/pci
parent1001354ca34179f3db924eb66672442a173147dc (diff)
ALSA: hda - allow 40 bit DMA mask for NVidia devices
Commit 49d9e77e72cf ("ALSA: hda - Fix system panic when DMA > 40 bits for Nvidia audio controllers") simply disabled any DMA exceeding 32 bits for NVidia devices, even though they are capable of performing DMA up to 40 bits. On some architectures (such as arm64), system memory is not guaranteed to be 32-bit addressable by PCI devices, and so this change prevents NVidia devices from working on platforms such as AMD Seattle. Since the original commit already mentioned that up to 40 bits of DMA is supported, and given that the code has been updated in the meantime to support a 40 bit DMA mask on other devices, revert commit 49d9e77e72cf and explicitly set the DMA mask to 40 bits for NVidia devices. Fixes: 49d9e77e72cf ('ALSA: hda - Fix system panic when DMA > 40 bits...') Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index c3469f756ec2..c64d986009a9 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -341,8 +341,7 @@ enum {
341 341
342/* quirks for Nvidia */ 342/* quirks for Nvidia */
343#define AZX_DCAPS_PRESET_NVIDIA \ 343#define AZX_DCAPS_PRESET_NVIDIA \
344 (AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \ 344 (AZX_DCAPS_NO_MSI | AZX_DCAPS_CORBRP_SELF_CLEAR |\
345 AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
346 AZX_DCAPS_SNOOP_TYPE(NVIDIA)) 345 AZX_DCAPS_SNOOP_TYPE(NVIDIA))
347 346
348#define AZX_DCAPS_PRESET_CTHDA \ 347#define AZX_DCAPS_PRESET_CTHDA \
@@ -1716,6 +1715,10 @@ static int azx_first_init(struct azx *chip)
1716 } 1715 }
1717 } 1716 }
1718 1717
1718 /* NVidia hardware normally only supports up to 40 bits of DMA */
1719 if (chip->pci->vendor == PCI_VENDOR_ID_NVIDIA)
1720 dma_bits = 40;
1721
1719 /* disable 64bit DMA address on some devices */ 1722 /* disable 64bit DMA address on some devices */
1720 if (chip->driver_caps & AZX_DCAPS_NO_64BIT) { 1723 if (chip->driver_caps & AZX_DCAPS_NO_64BIT) {
1721 dev_dbg(card->dev, "Disabling 64bit DMA\n"); 1724 dev_dbg(card->dev, "Disabling 64bit DMA\n");