From: Matthew Garrett Subject: [PATCH 07/11] vga_switcheroo: Reprobe old device on switching Date: Sun, 1 Jun 2014 12:38:39 -0400 Message-ID: <1401640723-2058-8-git-send-email-matthew.garrett@nebula.com> References: <1401640723-2058-1-git-send-email-matthew.garrett@nebula.com> Return-path: In-Reply-To: <1401640723-2058-1-git-send-email-matthew.garrett@nebula.com> Sender: platform-driver-x86-owner@vger.kernel.org To: airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, Matthew Garrett List-Id: dri-devel@lists.freedesktop.org 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 --- 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