diff -uNr linux-source-2.6.32/drivers/gpu/drm/i915/i915_dma.c linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_dma.c --- linux-source-2.6.32/drivers/gpu/drm/i915/i915_dma.c 2011-10-02 01:46:54.000000000 +0200 +++ linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_dma.c 2011-10-09 21:55:14.000000000 +0200 @@ -1267,9 +1267,15 @@ if (ret) DRM_INFO("failed to find VBIOS tables\n"); - /* if we have > 1 VGA cards, then disable the radeon VGA resources */ - ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode); - if (ret) + /* If we have > 1 VGA cards, then we need to arbitrate access + * to the common VGA resources. + * + * If we are a secondary display controller (!PCI_DISPLAY_CLASS_VGA), + * then we do not take part in VGA arbitration and the + * vga_client_register() fails with -ENODEV. + */ + ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode); + if (ret && ret != -ENODEV) goto destroy_ringbuffer; /* IIR "flip pending" bit means done if this bit is set */ diff -uNr linux-source-2.6.32/drivers/gpu/drm/i915/i915_drv.c linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_drv.c --- linux-source-2.6.32/drivers/gpu/drm/i915/i915_drv.c 2011-10-02 01:46:49.000000000 +0200 +++ linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_drv.c 2011-10-09 21:59:58.000000000 +0200 @@ -52,7 +52,7 @@ #define INTEL_VGA_DEVICE(id, info) { \ .class = PCI_CLASS_DISPLAY_VGA << 8, \ - .class_mask = 0xffff00, \ + .class_mask = 0xff0000, \ .vendor = 0x8086, \ .device = id, \ .subvendor = PCI_ANY_ID, \ @@ -393,6 +393,14 @@ static int __devinit i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { + /* Only bind to function 0 of the device. Early generations + * used function 1 as a placeholder for multi-head. This causes + * us confusion instead, especially on the systems where both + * functions have the same PCI-ID! + */ + if (PCI_FUNC(pdev->devfn)) + return -ENODEV; + return drm_get_dev(pdev, ent, &driver); } diff -uNr linux-source-2.6.32/drivers/gpu/vga/vgaarb.c linux-source-2.6.32-i915/drivers/gpu/vga/vgaarb.c --- linux-source-2.6.32/drivers/gpu/vga/vgaarb.c 2011-10-02 01:46:46.000000000 +0200 +++ linux-source-2.6.32-i915/drivers/gpu/vga/vgaarb.c 2011-10-09 21:56:59.000000000 +0200 @@ -614,7 +614,7 @@ void (*irq_set_state)(void *cookie, bool state), unsigned int (*set_vga_decode)(void *cookie, bool decode)) { - int ret = -1; + int ret = -ENODEV; struct vga_device *vgadev; unsigned long flags;