All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Pitcher <tom@tjbp.net>
To: intel-gfx@lists.freedesktop.org
Subject: Switcheroo support in i915
Date: Sat, 06 Sep 2014 18:50:09 +0100	[thread overview]
Message-ID: <2770674.gkFWLGgXdD@donek> (raw)

[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]

I've been attempting to solve a bug with i915 & switcheroo on many Macbook 
Pros (some with nvidia discrete cards, others radeon), report here:

https://bugs.freedesktop.org/show_bug.cgi?id=61115

Basically, after switching to i915 using switcheroo the display isn't 
connected. It was mentioned that some kind of reprobing was needed, so I tried 
the following:

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index d443441..fbc0d1c 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1281,6 +1281,13 @@ 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);
@@ -1295,7 +1302,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,
 };
 
Unfortunately that hasn't solved it. I've attached my dmesg too, since I think 
the following line is related to the problem:

[Firmware Bug]: ACPI(GFX0) defines _DOD but not _DOS

I'd be very grateful if somebody with a better understanding of this could 
take a look - I'll happily test any patches.

[-- Attachment #2: dmesg.gz --]
[-- Type: application/gzip, Size: 23017 bytes --]

[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2014-09-06 17:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-06 17:50 Tom Pitcher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-09-06 13:01 Switcheroo support in i915 Tom Pitcher
2014-09-08  8:06 ` Chris Wilson
2014-09-08 21:41   ` Tom Pitcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2770674.gkFWLGgXdD@donek \
    --to=tom@tjbp.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.