vgaswitcheroo: call fbcon_remap_all directly
While at it, clean up the interface a bit and push the console locking into fbcon.c. v2: Remove now outdated comment (Lukas). v3: Forgot to add static inline to the dummy function. Acked-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Lukas Wunner <lukas@wunner.de> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Yisheng Xie <ysxie@foxmail.com> Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-30-daniel.vetter@ffwll.ch
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fbcon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pm_domain.h>
|
||||
@@ -736,14 +737,8 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)
|
||||
if (!active->driver_power_control)
|
||||
set_audio_state(active->id, VGA_SWITCHEROO_OFF);
|
||||
|
||||
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();
|
||||
}
|
||||
if (new_client->fb_info)
|
||||
fbcon_remap_all(new_client->fb_info);
|
||||
|
||||
mutex_lock(&vgasr_priv.mux_hw_lock);
|
||||
ret = vgasr_priv.handler->switchto(new_client->id);
|
||||
|
Reference in New Issue
Block a user