This is a note to let you know that I've just added the patch titled
drm/i915: Recognise non-VGA display devices
to the 2.6.36-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-recognise-non-vga-display-devices.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 934f992c763ae1e5eefcce8af769c16444085df7 Mon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Thu, 20 Jan 2011 13:09:12 +0000
Subject: drm/i915: Recognise non-VGA display devices
From: Chris Wilson <[email protected]>
commit 934f992c763ae1e5eefcce8af769c16444085df7 upstream.
Starting with SandyBridge (though possible with earlier hacked BIOSes),
the BIOS may initialise the IGFX as secondary to a discrete GPU. Prior,
it would simply disable the integrated GPU. So we adjust our PCI class
mask to match any DISPLAY_CLASS device.
In such a configuration, the IGFX is not a primary VGA controller and
so should not take part in VGA arbitration, and the error return from
vga_client_register() is expected.
Signed-off-by: Chris Wilson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpu/drm/i915/i915_dma.c | 10 ++++++++--
drivers/gpu/drm/i915/i915_drv.c | 2 +-
drivers/gpu/vga/vgaarb.c | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1419,9 +1419,15 @@ static int i915_load_modeset_init(struct
if (ret)
DRM_INFO("failed to find VBIOS tables\n");
- /* if we have > 1 VGA cards, then disable the radeon VGA resources */
+ /* 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)
+ if (ret && ret != -ENODEV)
goto cleanup_ringbuffer;
ret = vga_switcheroo_register_client(dev->pdev,
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -53,7 +53,7 @@ extern int intel_agp_enabled;
#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, \
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -636,7 +636,7 @@ int vga_client_register(struct pci_dev *
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;
Patches currently in stable-queue which might be from [email protected]
are
queue-2.6.36/drm-i915-add-dependency-on-config_tmpfs.patch
queue-2.6.36/drm-restore-the-old_fb-upon-modeset-failure.patch
queue-2.6.36/drm-i915-recognise-non-vga-display-devices.patch
queue-2.6.36/drm-i915-lvds-add-aopen-i915gmm-hfs-to-the-list-of-false-positive-lvds.patch
queue-2.6.36/drm-i915-fix-calculation-of-edp-signal-levels-on-sandybridge.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable