lkml.org 
[lkml]   [2011]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@intra2net.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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-12-07 22:33    [W:0.122 / U:5.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site