summaryrefslogtreecommitdiff
path: root/drivers/gpu/vga/vga_switcheroo.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-16 08:47:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-16 08:47:31 -0700
commit7c21738efd0b5e8c2a9ac2440e7ffbf432d6f239 (patch)
treed65f02ae98b229604e04df9984632272686cef9a /drivers/gpu/vga/vga_switcheroo.c
parenteed631e0d741d1a1067cfc6d709fdf2363126f9c (diff)
parent752d2635ebb12b6122ba05775f7d1ccfef14b275 (diff)
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm: Take lock around probes for drm_fb_helper_hotplug_event drm/i915: Revert i915.semaphore=1 default from 47ae63e0 vga_switcheroo: don't toggle-switch devices drm/radeon/kms: add some evergreen/ni safe regs drm/radeon/kms: fix extended lvds info parsing drm/radeon/kms: fix tiling reg on fusion
Diffstat (limited to 'drivers/gpu/vga/vga_switcheroo.c')
-rw-r--r--drivers/gpu/vga/vga_switcheroo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index e01cacba685f..498b284e5ef9 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -219,9 +219,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
int i;
struct vga_switcheroo_client *active = NULL;
- if (new_client->active == true)
- return 0;
-
for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) {
if (vgasr_priv.clients[i].active == true) {
active = &vgasr_priv.clients[i];
@@ -372,6 +369,9 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
goto out;
}
+ if (client->active == true)
+ 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++) {