diff options
author | Dave Airlie <airlied@gmail.com> | 2013-01-24 20:38:56 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-02-07 21:02:43 -0500 |
commit | 054430e773c9a1e26f38e30156eff02dedfffc17 (patch) | |
tree | 9866f12c399f63de3ac285624226b19c0501b191 /drivers/gpu/vga | |
parent | e93a9a868792ad71cdd09d75e5a02d8067473c4e (diff) |
fbcon: fix locking harder
Okay so Alan's patch handled the case where there was no registered fbcon,
however the other path entered in set_con2fb_map pit.
In there we called fbcon_takeover, but we also took the console lock in a couple
of places. So push the console lock out to the callers of set_con2fb_map,
this means fbmem and switcheroo needed to take the lock around the fb notifier
entry points that lead to this.
This should fix the efifb regression seen by Maarten.
Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Lu Hua <huax.lu@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/vga')
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index fa60add0ff63..cf787e1d9322 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
26 | 26 | ||
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/console.h> | ||
28 | #include <linux/vga_switcheroo.h> | 29 | #include <linux/vga_switcheroo.h> |
29 | 30 | ||
30 | #include <linux/vgaarb.h> | 31 | #include <linux/vgaarb.h> |
@@ -337,8 +338,10 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) | |||
337 | 338 | ||
338 | if (new_client->fb_info) { | 339 | if (new_client->fb_info) { |
339 | struct fb_event event; | 340 | struct fb_event event; |
341 | console_lock(); | ||
340 | event.info = new_client->fb_info; | 342 | event.info = new_client->fb_info; |
341 | fb_notifier_call_chain(FB_EVENT_REMAP_ALL_CONSOLE, &event); | 343 | fb_notifier_call_chain(FB_EVENT_REMAP_ALL_CONSOLE, &event); |
344 | console_unlock(); | ||
342 | } | 345 | } |
343 | 346 | ||
344 | ret = vgasr_priv.handler->switchto(new_client->id); | 347 | ret = vgasr_priv.handler->switchto(new_client->id); |