[PATCH v2 1/4] drm/i915: add support for vga_switcheroo reprobe

From: Ramkumar Ramachandra
Date: Tue Jan 07 2014 - 09:54:48 EST


Cc: Andreas Heider <andreas@xxxxxxxx>
Cc: Seth Forshee <seth.forshee@xxxxxxxxxxxxx>
Original-patch-by: Andreas Heider <andreas@xxxxxxxx>
Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
---
drivers/gpu/drm/i915/i915_dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 5c64842..336a835b 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1265,6 +1265,12 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_
}
}

+static void i915_switcheroo_reprobe(struct pci_dev *pdev)
+{
+ struct drm_device *dev = pci_get_drvdata(pdev);
+ intel_fbdev_output_poll_changed(dev);
+}
+
static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
{
struct drm_device *dev = pci_get_drvdata(pdev);
@@ -1278,7 +1284,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)

static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
.set_gpu_state = i915_switcheroo_set_state,
- .reprobe = NULL,
+ .reprobe = i915_switcheroo_reprobe,
.can_switch = i915_switcheroo_can_switch,
};

--
1.8.5.2.229.g4448466

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/