fbcon: fix locking harder
authorDave Airlie <airlied@gmail.com>
Fri, 25 Jan 2013 01:38:56 +0000 (11:38 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 13:38:39 +0000 (05:38 -0800)
commitc3e1d1ac1e2cb9fdb73d88427762358de63bc0ba
tree93e5992d48384545807ed2f15209340b8e0656c7
parent65b0ff5839499e66e78f536af33fce96f86312a7
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>
drivers/gpu/vga/vga_switcheroo.c
drivers/video/console/fbcon.c
drivers/video/fbmem.c