aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-12-03 03:38:03 -0500
committerTakashi Iwai <tiwai@suse.de>2014-12-03 03:38:58 -0500
commit2e3d4de1bd80b2f205aab0ed0a25daef464ab91c (patch)
tree7caa6a353f9ff9f5e196ed01bbbfce1c8c5ec8ae /sound/pci
parent492a7ea0a6d3cc9c16ad5f8af832ed4278225b2e (diff)
parent009d0431c3914de64666bec0d350e54fdd59df6a (diff)
Merge tag 'v3.18-rc7' into for-next
... for allowing more cleanups of hda_intel.c driver-caps where both upstream and for-next contain the changes.
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c24
-rw-r--r--sound/pci/hda/hda_priv.h1
2 files changed, 20 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 728663d6746f..fc7aff0eb562 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -302,7 +302,8 @@ enum {
302 302
303/* quirks for ATI/AMD HDMI */ 303/* quirks for ATI/AMD HDMI */
304#define AZX_DCAPS_PRESET_ATI_HDMI \ 304#define AZX_DCAPS_PRESET_ATI_HDMI \
305 (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB) 305 (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB|\
306 AZX_DCAPS_NO_MSI64)
306 307
307/* quirks for ATI HDMI with snoop off */ 308/* quirks for ATI HDMI with snoop off */
308#define AZX_DCAPS_PRESET_ATI_HDMI_NS \ 309#define AZX_DCAPS_PRESET_ATI_HDMI_NS \
@@ -1493,6 +1494,7 @@ static int azx_first_init(struct azx *chip)
1493 struct snd_card *card = chip->card; 1494 struct snd_card *card = chip->card;
1494 int err; 1495 int err;
1495 unsigned short gcap; 1496 unsigned short gcap;
1497 unsigned int dma_bits = 64;
1496 1498
1497#if BITS_PER_LONG != 64 1499#if BITS_PER_LONG != 64
1498 /* Fix up base address on ULI M5461 */ 1500 /* Fix up base address on ULI M5461 */
@@ -1516,9 +1518,14 @@ static int azx_first_init(struct azx *chip)
1516 return -ENXIO; 1518 return -ENXIO;
1517 } 1519 }
1518 1520
1519 if (chip->msi) 1521 if (chip->msi) {
1522 if (chip->driver_caps & AZX_DCAPS_NO_MSI64) {
1523 dev_dbg(card->dev, "Disabling 64bit MSI\n");
1524 pci->no_64bit_msi = true;
1525 }
1520 if (pci_enable_msi(pci) < 0) 1526 if (pci_enable_msi(pci) < 0)
1521 chip->msi = 0; 1527 chip->msi = 0;
1528 }
1522 1529
1523 if (azx_acquire_irq(chip, 0) < 0) 1530 if (azx_acquire_irq(chip, 0) < 0)
1524 return -EBUSY; 1531 return -EBUSY;
@@ -1529,9 +1536,14 @@ static int azx_first_init(struct azx *chip)
1529 gcap = azx_readw(chip, GCAP); 1536 gcap = azx_readw(chip, GCAP);
1530 dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap); 1537 dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap);
1531 1538
1539 /* AMD devices support 40 or 48bit DMA, take the safe one */
1540 if (chip->pci->vendor == PCI_VENDOR_ID_AMD)
1541 dma_bits = 40;
1542
1532 /* disable SB600 64bit support for safety */ 1543 /* disable SB600 64bit support for safety */
1533 if (chip->pci->vendor == PCI_VENDOR_ID_ATI) { 1544 if (chip->pci->vendor == PCI_VENDOR_ID_ATI) {
1534 struct pci_dev *p_smbus; 1545 struct pci_dev *p_smbus;
1546 dma_bits = 40;
1535 p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, 1547 p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
1536 PCI_DEVICE_ID_ATI_SBX00_SMBUS, 1548 PCI_DEVICE_ID_ATI_SBX00_SMBUS,
1537 NULL); 1549 NULL);
@@ -1561,9 +1573,11 @@ static int azx_first_init(struct azx *chip)
1561 } 1573 }
1562 1574
1563 /* allow 64bit DMA address if supported by H/W */ 1575 /* allow 64bit DMA address if supported by H/W */
1564 if ((gcap & AZX_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) 1576 if (!(gcap & AZX_GCAP_64OK))
1565 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64)); 1577 dma_bits = 32;
1566 else { 1578 if (!pci_set_dma_mask(pci, DMA_BIT_MASK(dma_bits))) {
1579 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(dma_bits));
1580 } else {
1567 pci_set_dma_mask(pci, DMA_BIT_MASK(32)); 1581 pci_set_dma_mask(pci, DMA_BIT_MASK(32));
1568 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)); 1582 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
1569 } 1583 }
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h
index 602536c2147d..a09703a2b2c1 100644
--- a/sound/pci/hda/hda_priv.h
+++ b/sound/pci/hda/hda_priv.h
@@ -170,6 +170,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
170#define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ 170#define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */
171#define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ 171#define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */
172#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ 172#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */
173#define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */
173 174
174enum { 175enum {
175 AZX_SNOOP_TYPE_NONE , 176 AZX_SNOOP_TYPE_NONE ,