Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db79afa1 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

sound/radeon: Move 64-bit MSI quirk from arch to driver



A number of radeon cards have a HW limitation causing them to be
unable to generate the full 64-bit of address bits for MSIs. This
breaks MSIs on some platforms such as POWER machines.

We used to have a powerpc specific quirk to address that on a
single card, but this doesn't scale very well, this is better
put under control of the drivers who know precisely what a given
HW revision can do.

We now have a generic quirk in the PCI code. We should set it
appropriately for all radeon's from the audio driver.

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
CC: <stable@vger.kernel.org>
parent 91ed6fd2
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -298,7 +298,8 @@ enum {


/* quirks for ATI/AMD HDMI */
/* quirks for ATI/AMD HDMI */
#define AZX_DCAPS_PRESET_ATI_HDMI \
#define AZX_DCAPS_PRESET_ATI_HDMI \
	(AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB)
	(AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB|\
	 AZX_DCAPS_NO_MSI64)


/* quirks for Nvidia */
/* quirks for Nvidia */
#define AZX_DCAPS_PRESET_NVIDIA \
#define AZX_DCAPS_PRESET_NVIDIA \
@@ -1510,9 +1511,14 @@ static int azx_first_init(struct azx *chip)
		return -ENXIO;
		return -ENXIO;
	}
	}


	if (chip->msi)
	if (chip->msi) {
		if (chip->driver_caps & AZX_DCAPS_NO_MSI64) {
			dev_dbg(card->dev, "Disabling 64bit MSI\n");
			pci->no_64bit_msi = true;
		}
		if (pci_enable_msi(pci) < 0)
		if (pci_enable_msi(pci) < 0)
			chip->msi = 0;
			chip->msi = 0;
	}


	if (azx_acquire_irq(chip, 0) < 0)
	if (azx_acquire_irq(chip, 0) < 0)
		return -EBUSY;
		return -EBUSY;
+1 −0
Original line number Original line Diff line number Diff line
@@ -171,6 +171,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define AZX_DCAPS_PM_RUNTIME	(1 << 26)	/* runtime PM support */
#define AZX_DCAPS_PM_RUNTIME	(1 << 26)	/* runtime PM support */
#define AZX_DCAPS_I915_POWERWELL (1 << 27)	/* HSW i915 powerwell support */
#define AZX_DCAPS_I915_POWERWELL (1 << 27)	/* HSW i915 powerwell support */
#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28)	/* CORBRP clears itself after reset */
#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28)	/* CORBRP clears itself after reset */
#define AZX_DCAPS_NO_MSI64      (1 << 29)	/* Stick to 32-bit MSIs */


/* HD Audio class code */
/* HD Audio class code */
#define PCI_CLASS_MULTIMEDIA_HD_AUDIO	0x0403
#define PCI_CLASS_MULTIMEDIA_HD_AUDIO	0x0403