diff options
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r-- | drivers/video/console/fbcon.c | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index bcea87c3cc06..3660e51b2612 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2048,7 +2048,7 @@ static int fbcon_switch(struct vc_data *vc) | |||
2048 | struct fbcon_ops *ops; | 2048 | struct fbcon_ops *ops; |
2049 | struct display *p = &fb_display[vc->vc_num]; | 2049 | struct display *p = &fb_display[vc->vc_num]; |
2050 | struct fb_var_screeninfo var; | 2050 | struct fb_var_screeninfo var; |
2051 | int i, prev_console; | 2051 | int i, prev_console, charcnt = 256; |
2052 | 2052 | ||
2053 | info = registered_fb[con2fb_map[vc->vc_num]]; | 2053 | info = registered_fb[con2fb_map[vc->vc_num]]; |
2054 | ops = info->fbcon_par; | 2054 | ops = info->fbcon_par; |
@@ -2103,7 +2103,8 @@ static int fbcon_switch(struct vc_data *vc) | |||
2103 | fb_set_var(info, &var); | 2103 | fb_set_var(info, &var); |
2104 | ops->var = info->var; | 2104 | ops->var = info->var; |
2105 | 2105 | ||
2106 | if (old_info != NULL && old_info != info) { | 2106 | if (old_info != NULL && (old_info != info || |
2107 | info->flags & FBINFO_MISC_ALWAYS_SETPAR)) { | ||
2107 | if (info->fbops->fb_set_par) | 2108 | if (info->fbops->fb_set_par) |
2108 | info->fbops->fb_set_par(info); | 2109 | info->fbops->fb_set_par(info); |
2109 | fbcon_del_cursor_timer(old_info); | 2110 | fbcon_del_cursor_timer(old_info); |
@@ -2120,6 +2121,13 @@ static int fbcon_switch(struct vc_data *vc) | |||
2120 | 2121 | ||
2121 | vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); | 2122 | vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); |
2122 | vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; | 2123 | vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; |
2124 | |||
2125 | if (p->userfont) | ||
2126 | charcnt = FNTCHARCNT(vc->vc_font.data); | ||
2127 | |||
2128 | if (charcnt > 256) | ||
2129 | vc->vc_complement_mask <<= 1; | ||
2130 | |||
2123 | updatescrollmode(p, info, vc); | 2131 | updatescrollmode(p, info, vc); |
2124 | 2132 | ||
2125 | switch (p->scrollmode) { | 2133 | switch (p->scrollmode) { |
@@ -2139,8 +2147,12 @@ static int fbcon_switch(struct vc_data *vc) | |||
2139 | 2147 | ||
2140 | scrollback_max = 0; | 2148 | scrollback_max = 0; |
2141 | scrollback_current = 0; | 2149 | scrollback_current = 0; |
2142 | ops->var.xoffset = ops->var.yoffset = p->yscroll = 0; | 2150 | |
2143 | ops->update_start(info); | 2151 | if (!fbcon_is_inactive(vc, info)) { |
2152 | ops->var.xoffset = ops->var.yoffset = p->yscroll = 0; | ||
2153 | ops->update_start(info); | ||
2154 | } | ||
2155 | |||
2144 | fbcon_set_palette(vc, color_table); | 2156 | fbcon_set_palette(vc, color_table); |
2145 | fbcon_clear_margins(vc, 0); | 2157 | fbcon_clear_margins(vc, 0); |
2146 | 2158 | ||
@@ -2184,11 +2196,14 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) | |||
2184 | ops->graphics = 1; | 2196 | ops->graphics = 1; |
2185 | 2197 | ||
2186 | if (!blank) { | 2198 | if (!blank) { |
2199 | if (info->fbops->fb_save_state) | ||
2200 | info->fbops->fb_save_state(info); | ||
2187 | var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; | 2201 | var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; |
2188 | fb_set_var(info, &var); | 2202 | fb_set_var(info, &var); |
2189 | ops->graphics = 0; | 2203 | ops->graphics = 0; |
2190 | ops->var = info->var; | 2204 | ops->var = info->var; |
2191 | } | 2205 | } else if (info->fbops->fb_restore_state) |
2206 | info->fbops->fb_restore_state(info); | ||
2192 | } | 2207 | } |
2193 | 2208 | ||
2194 | if (!fbcon_is_inactive(vc, info)) { | 2209 | if (!fbcon_is_inactive(vc, info)) { |
@@ -2736,8 +2751,12 @@ static void fbcon_modechanged(struct fb_info *info) | |||
2736 | updatescrollmode(p, info, vc); | 2751 | updatescrollmode(p, info, vc); |
2737 | scrollback_max = 0; | 2752 | scrollback_max = 0; |
2738 | scrollback_current = 0; | 2753 | scrollback_current = 0; |
2739 | ops->var.xoffset = ops->var.yoffset = p->yscroll = 0; | 2754 | |
2740 | ops->update_start(info); | 2755 | if (!fbcon_is_inactive(vc, info)) { |
2756 | ops->var.xoffset = ops->var.yoffset = p->yscroll = 0; | ||
2757 | ops->update_start(info); | ||
2758 | } | ||
2759 | |||
2741 | fbcon_set_palette(vc, color_table); | 2760 | fbcon_set_palette(vc, color_table); |
2742 | update_screen(vc); | 2761 | update_screen(vc); |
2743 | if (softback_buf) | 2762 | if (softback_buf) |
@@ -2774,8 +2793,13 @@ static void fbcon_set_all_vcs(struct fb_info *info) | |||
2774 | updatescrollmode(p, info, vc); | 2793 | updatescrollmode(p, info, vc); |
2775 | scrollback_max = 0; | 2794 | scrollback_max = 0; |
2776 | scrollback_current = 0; | 2795 | scrollback_current = 0; |
2777 | ops->var.xoffset = ops->var.yoffset = p->yscroll = 0; | 2796 | |
2778 | ops->update_start(info); | 2797 | if (!fbcon_is_inactive(vc, info)) { |
2798 | ops->var.xoffset = ops->var.yoffset = | ||
2799 | p->yscroll = 0; | ||
2800 | ops->update_start(info); | ||
2801 | } | ||
2802 | |||
2779 | fbcon_set_palette(vc, color_table); | 2803 | fbcon_set_palette(vc, color_table); |
2780 | update_screen(vc); | 2804 | update_screen(vc); |
2781 | if (softback_buf) | 2805 | if (softback_buf) |