lkml.org 
[lkml]   [2012]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] apple-gmux: Restore switch registers on suspend/resume
From
Date
On Sun, 2012-07-29 at 09:46 +0200, Andreas Heider wrote:
> The gmux code you're using is a bit outdated, but if you use
> git://kernel.ubuntu.com/sforshee/linux.git gmux-switcheroo and connect
> an external display (I tested it with a DP one) you should be able to
> boot to DIS and switch to the IGD and get output on the external display.

Matthew's version has changes to the core vga_switcheroo code too, to
add the ->client_active() method which lets it pick the right client at
init time. I'll let you work out how to merge the two, but in the
meantime here's what I needed to do to Matthew's one to make it work...

diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 321d17c..e2149e6 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -108,6 +108,7 @@ static void vga_switcheroo_enable(void)
ret = vgasr_priv.handler->get_client_id(client->pdev);
if (ret < 0)
return;
+ client->id = ret;

if (vgasr_priv.handler->client_active) {
active = vgasr_priv.handler->client_active(client->id);
@@ -117,7 +118,7 @@ static void vga_switcheroo_enable(void)
* but the client itself doesn't, update state
*/

- if (active && !client->active) {
+ if (active && !client->active && client->fb_info) {
struct fb_event event;
event.info = client->fb_info;
fb_notifier_call_chain(FB_EVENT_REMAP_ALL_CONSOLE, &event);
@@ -125,8 +126,6 @@ static void vga_switcheroo_enable(void)

client->active = active;
}
-
- client->id = ret;
}
vga_switcheroo_debugfs_init(&vgasr_priv);
vgasr_priv.active = true;

--
dwmw2
[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2012-07-30 01:21    [W:0.084 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site