diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/console/fbcon.c | 18 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 1 |
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 3681c6a8821..b0a3fa00706 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -3025,6 +3025,20 @@ static int fbcon_fb_unregistered(struct fb_info *info) return 0; } +static void fbcon_remap_all(int idx) +{ + int i; + for (i = first_fb_vc; i <= last_fb_vc; i++) + set_con2fb_map(i, idx, 0); + + if (con_is_bound(&fb_con)) { + printk(KERN_INFO "fbcon: Remapping primary device, " + "fb%i, to tty %i-%i\n", idx, + first_fb_vc + 1, last_fb_vc + 1); + info_idx = idx; + } +} + #ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY static void fbcon_select_primary(struct fb_info *info) { @@ -3225,6 +3239,10 @@ static int fbcon_event_notify(struct notifier_block *self, caps = event->data; fbcon_get_requirement(info, caps); break; + case FB_EVENT_REMAP_ALL_CONSOLE: + idx = info->node; + fbcon_remap_all(idx); + break; } done: return ret; diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 99bbd282ce6..a15b44e9c00 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1513,7 +1513,6 @@ register_framebuffer(struct fb_info *fb_info) fb_info->fix.id, registered_fb[i]->fix.id); unregister_framebuffer(registered_fb[i]); - break; } } } |