summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/console/fbcon.c5
-rw-r--r--include/linux/fb.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index c024ffd..bd4500a 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2191,11 +2191,14 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
ops->graphics = 1;
if (!blank) {
+ if (info->fbops->fb_save_state)
+ info->fbops->fb_save_state(info);
var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE;
fb_set_var(info, &var);
ops->graphics = 0;
ops->var = info->var;
- }
+ } else if (info->fbops->fb_restore_state)
+ info->fbops->fb_restore_state(info);
}
if (!fbcon_is_inactive(vc, info)) {
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 04a58f3..55ccaf3 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -617,6 +617,12 @@ struct fb_ops {
/* perform fb specific mmap */
int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
+
+ /* save current hardware state */
+ void (*fb_save_state)(struct fb_info *info);
+
+ /* restore saved state */
+ void (*fb_restore_state)(struct fb_info *info);
};
#ifdef CONFIG_FB_TILEBLITTING
OpenPOWER on IntegriCloud