Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228826
b: refs/heads/master
c: 851ab95
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Jan 5, 2011
1 parent 2dd744b commit 478289d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5cfb3c3a1013e7fca54c3624871755cdfd960b3b
refs/heads/master: 851ab954daee0d8328e239a468835e36e6215182
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/vga/vga_switcheroo.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
const char *pdev_name;
int i, ret;
bool delay = false, can_switch;
bool just_mux = false;
int client_id = -1;
struct vga_switcheroo_client *client = NULL;

Expand Down Expand Up @@ -320,6 +321,15 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
if (strncmp(usercmd, "DIS", 3) == 0)
client_id = VGA_SWITCHEROO_DIS;

if (strncmp(usercmd, "MIGD", 3) == 0) {
just_mux = true;
client_id = VGA_SWITCHEROO_IGD;
}
if (strncmp(usercmd, "MDIS", 3) == 0) {
just_mux = true;
client_id = VGA_SWITCHEROO_DIS;
}

if (client_id == -1)
goto out;

Expand All @@ -331,6 +341,12 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
}

vgasr_priv.delayed_switch_active = false;

if (just_mux) {
ret = vgasr_priv.handler->switchto(client_id);
goto out;
}

/* okay we want a switch - test if devices are willing to switch */
can_switch = true;
for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) {
Expand Down

0 comments on commit 478289d

Please sign in to comment.