[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111207133000.69051c59@jbarnes-desktop>
Date: Wed, 7 Dec 2011 13:30:00 -0800
From: Jesse Barnes <jbarnes@...tuousgeek.org>
To: Thomas Jarosch <thomas.jarosch@...ra2net.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Charlie Suffin <charlie.suffin@...atus.com>, stable@...nel.org
Subject: Re: [PATCH] pci: Add quirk for still enabled interrupts on Intel
Sandy Bridge GPUs
On Wed, 07 Dec 2011 22:08:11 +0100
Thomas Jarosch <thomas.jarosch@...ra2net.com> wrote:
> +#define I915_DEIER_REG 0x4400c
> +static void __devinit disable_igfx_irq(struct pci_dev *dev)
> +{
> + void __iomem *regs = pci_iomap(dev, 0, 0);
> + if (regs == NULL) {
> + dev_warn(&dev->dev, "igfx quirk: Can't iomap PCI device\n");
> + return;
> + }
> +
> + /* Check if any interrupt line is still enabled */
> + if (readl(regs + I915_DEIER_REG) != 0) {
> + dev_warn(&dev->dev, "BIOS left Intel GPU interrupts enabled; "
> + "disabling\n");
> +
> + writel(0, regs + I915_DEIER_REG);
> + }
> +
> + pci_iounmap(dev, regs);
> +}
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
> +
> static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
> struct pci_fixup *end)
> {
Could really be dev_dbg, I think this will be fairly common. I think we
also need to ack any outstanding interrupts after disabling them in IER
by writing IIR back on itself. Can you test that?
--
Jesse Barnes, Intel Open Source Technology Center
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists