diff options
-rw-r--r-- | drivers/video/console/fbcon.c | 5 | ||||
-rw-r--r-- | include/linux/fb.h | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index c024ffd0266d..bd4500a8992e 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) | |||
2191 | ops->graphics = 1; | 2191 | ops->graphics = 1; |
2192 | 2192 | ||
2193 | if (!blank) { | 2193 | if (!blank) { |
2194 | if (info->fbops->fb_save_state) | ||
2195 | info->fbops->fb_save_state(info); | ||
2194 | var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; | 2196 | var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; |
2195 | fb_set_var(info, &var); | 2197 | fb_set_var(info, &var); |
2196 | ops->graphics = 0; | 2198 | ops->graphics = 0; |
2197 | ops->var = info->var; | 2199 | ops->var = info->var; |
2198 | } | 2200 | } else if (info->fbops->fb_restore_state) |
2201 | info->fbops->fb_restore_state(info); | ||
2199 | } | 2202 | } |
2200 | 2203 | ||
2201 | if (!fbcon_is_inactive(vc, info)) { | 2204 | if (!fbcon_is_inactive(vc, info)) { |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 04a58f33ec53..55ccaf3706c1 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -617,6 +617,12 @@ struct fb_ops { | |||
617 | 617 | ||
618 | /* perform fb specific mmap */ | 618 | /* perform fb specific mmap */ |
619 | int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); | 619 | int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); |
620 | |||
621 | /* save current hardware state */ | ||
622 | void (*fb_save_state)(struct fb_info *info); | ||
623 | |||
624 | /* restore saved state */ | ||
625 | void (*fb_restore_state)(struct fb_info *info); | ||
620 | }; | 626 | }; |
621 | 627 | ||
622 | #ifdef CONFIG_FB_TILEBLITTING | 628 | #ifdef CONFIG_FB_TILEBLITTING |