All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <matthew.garrett@nebula.com>
To: airlied@gmail.com
Cc: dri-devel@lists.freedesktop.org,
	platform-driver-x86@vger.kernel.org,
	Matthew Garrett <matthew.garrett@nebula.com>
Subject: [PATCH 07/11] vga_switcheroo: Reprobe old device on switching
Date: Sun,  1 Jun 2014 12:38:39 -0400	[thread overview]
Message-ID: <1401640723-2058-8-git-send-email-matthew.garrett@nebula.com> (raw)
In-Reply-To: <1401640723-2058-1-git-send-email-matthew.garrett@nebula.com>

We need to force the previously active device to reprobe its connectors
when we switch in order to allow it to give up connectors that are no
longer in use.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
---
 drivers/gpu/vga/vga_switcheroo.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 199a111..d380158 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -429,6 +429,9 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)
 	if (new_client->ops->reprobe)
 		new_client->ops->reprobe(new_client->pdev);
 
+	if (active->ops->reprobe)
+		active->ops->reprobe(active->pdev);
+
 	if (active->pwr_state == VGA_SWITCHEROO_ON)
 		vga_switchoff(active);
 
-- 
1.8.5.3

  parent reply	other threads:[~2014-06-01 16:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 16:38 Improve Apple GMUX support on switcheroo Matthew Garrett
2014-06-01 16:38 ` [PATCH 01/11] vga_switcheroo: Add support for switching only the DDC Matthew Garrett
2014-06-03 13:26   ` Jani Nikula
2014-06-12  0:37   ` Dave Airlie
2014-06-01 16:38 ` [PATCH 02/11] vga_switcheroo: Add support for reprobing connectors Matthew Garrett
2014-06-01 16:38 ` [PATCH 03/11] vga_switcheroo: Add command line option Matthew Garrett
2014-06-01 16:38 ` [PATCH 04/11] vga_switcheroo: Allow stashing of panel data Matthew Garrett
2014-06-03 13:40   ` Jani Nikula
2014-06-01 16:38 ` [PATCH 05/11] vga_switcheroo: Allow handlers to indicate that they can handle PM Matthew Garrett
2014-06-01 16:38 ` [PATCH 06/11] vga_switcheroo: Add enable() call to clients and permit deferral of dynamic PM Matthew Garrett
2014-06-01 16:38 ` Matthew Garrett [this message]
2014-06-01 16:38 ` [PATCH 08/11] apple-gmux: Add support for the switch_ddc callback Matthew Garrett
2014-06-02 14:35   ` Alex Deucher
2014-06-01 16:38 ` [PATCH 09/11] apple-gmux: Assign apple_gmux_data before registering Matthew Garrett
2014-06-01 16:38 ` [PATCH 10/11] apple-gmux: Indicate that driver supports changing of GPU power states Matthew Garrett
2014-06-01 16:38 ` [PATCH 11/11] apple_gmux: Wait for switch completion Matthew Garrett

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=1401640723-2058-8-git-send-email-matthew.garrett@nebula.com \
    --to=matthew.garrett@nebula.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=platform-driver-x86@vger.kernel.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.