diff options
-rw-r--r-- | drivers/video/fbmem.c | 7 | ||||
-rw-r--r-- | include/linux/fb.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index dc61c12ecf8c..2af7153da2e4 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1645,6 +1645,11 @@ static int do_register_framebuffer(struct fb_info *fb_info) | |||
1645 | if (!fb_info->modelist.prev || !fb_info->modelist.next) | 1645 | if (!fb_info->modelist.prev || !fb_info->modelist.next) |
1646 | INIT_LIST_HEAD(&fb_info->modelist); | 1646 | INIT_LIST_HEAD(&fb_info->modelist); |
1647 | 1647 | ||
1648 | if (fb_info->skip_vt_switch) | ||
1649 | pm_vt_switch_required(fb_info->dev, false); | ||
1650 | else | ||
1651 | pm_vt_switch_required(fb_info->dev, true); | ||
1652 | |||
1648 | fb_var_to_videomode(&mode, &fb_info->var); | 1653 | fb_var_to_videomode(&mode, &fb_info->var); |
1649 | fb_add_videomode(&mode, &fb_info->modelist); | 1654 | fb_add_videomode(&mode, &fb_info->modelist); |
1650 | registered_fb[i] = fb_info; | 1655 | registered_fb[i] = fb_info; |
@@ -1679,6 +1684,8 @@ static int do_unregister_framebuffer(struct fb_info *fb_info) | |||
1679 | if (ret) | 1684 | if (ret) |
1680 | return -EINVAL; | 1685 | return -EINVAL; |
1681 | 1686 | ||
1687 | pm_vt_switch_unregister(fb_info->dev); | ||
1688 | |||
1682 | unlink_framebuffer(fb_info); | 1689 | unlink_framebuffer(fb_info); |
1683 | if (fb_info->pixmap.addr && | 1690 | if (fb_info->pixmap.addr && |
1684 | (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) | 1691 | (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 58b98606ac26..d49c60f5aa4c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -501,6 +501,8 @@ struct fb_info { | |||
501 | resource_size_t size; | 501 | resource_size_t size; |
502 | } ranges[0]; | 502 | } ranges[0]; |
503 | } *apertures; | 503 | } *apertures; |
504 | |||
505 | bool skip_vt_switch; /* no VT switch on suspend/resume required */ | ||
504 | }; | 506 | }; |
505 | 507 | ||
506 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { | 508 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { |