aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2013-01-25 11:38:56 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-25 21:23:48 -0700
commit22fd0f0bb5e791b7cd5b5e0c7d4c2172c722844d (patch)
tree3fd530a384354dca12eacbbb89bb9f984906b7e6 /drivers/gpu
parent456edf57d7a6fe1b238ec708b19063d78cf4b250 (diff)
downloadkernel_samsung_aries-22fd0f0bb5e791b7cd5b5e0c7d4c2172c722844d.zip
kernel_samsung_aries-22fd0f0bb5e791b7cd5b5e0c7d4c2172c722844d.tar.gz
kernel_samsung_aries-22fd0f0bb5e791b7cd5b5e0c7d4c2172c722844d.tar.bz2
fbcon: fix locking harder
commit 054430e773c9a1e26f38e30156eff02dedfffc17 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/vga/vga_switcheroo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 58434e8..37fe246 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -26,6 +26,7 @@
#include <linux/fb.h>
#include <linux/pci.h>
+#include <linux/console.h>
#include <linux/vga_switcheroo.h>
struct vga_switcheroo_client {
@@ -256,8 +257,10 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)
if (new_client->fb_info) {
struct fb_event event;
+ console_lock();
event.info = new_client->fb_info;
fb_notifier_call_chain(FB_EVENT_REMAP_ALL_CONSOLE, &event);
+ console_unlock();
}
ret = vgasr_priv.handler->switchto(new_client->id);