Mercurial > illumos > git > illumos-omnios
changeset 21419:449b1c6af032
11077 tem: do not restore image areas also in text mode
Reviewed by: Gergő Doma <domag02@gmail.com>
Reviewed by: Rob Johnston <rob.johnston@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
author | Toomas Soome <tsoome@me.com> |
---|---|
date | Wed, 29 May 2019 20:02:05 +0300 |
parents | 9b66c66b16c5 |
children | bd7ccdd2aa7b |
files | usr/src/uts/common/io/tem.c usr/src/uts/common/sys/tem_impl.h |
diffstat | 2 files changed, 37 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/tem.c Thu May 30 09:18:03 2019 +0300 +++ b/usr/src/uts/common/io/tem.c Wed May 29 20:02:05 2019 +0300 @@ -374,7 +374,7 @@ if (finish_ioctl) (void) ldi_ioctl(tems.ts_hdl, VIS_DEVFINI, 0, - FWRITE|FKIOCTL, credp, &lyr_rval); + FWRITE | FKIOCTL, credp, &lyr_rval); (void) ldi_close(tems.ts_hdl, 0, credp); tems.ts_hdl = NULL; @@ -491,8 +491,7 @@ p = list_next(&tems.ts_list, p)) { mutex_enter(&p->tvs_lock); tem_internal_init(p, credp, B_TRUE, B_FALSE); - if (temargs.mode == VIS_PIXEL) - tem_pix_align(p, credp, CALLED_FROM_NORMAL); + tem_align(p, credp, CALLED_FROM_NORMAL); mutex_exit(&p->tvs_lock); } @@ -851,6 +850,9 @@ int prom_window_top = 0; int scroll_up_lines; + if (tems.ts_display_mode == VIS_TEXT) + return (prom_row); + plat_tem_get_prom_font_size(&prom_charheight, &prom_window_top); if (prom_charheight == 0) prom_charheight = PROM_DEFAULT_FONT_HEIGHT; @@ -879,51 +881,47 @@ } void -tem_pix_align(struct tem_vt_state *tem, cred_t *credp, +tem_align(struct tem_vt_state *tem, cred_t *credp, enum called_from called_from) { uint32_t row = 0; uint32_t col = 0; - if (plat_stdout_is_framebuffer()) { - plat_tem_hide_prom_cursor(); - - /* - * We are getting the current cursor position in pixel - * mode so that we don't over-write the console output - * during boot. - */ - plat_tem_get_prom_pos(&row, &col); + plat_tem_hide_prom_cursor(); - /* - * Adjust the row if necessary when the font of our - * kernel console tem is different with that of prom - * tem. - */ - row = tem_adjust_row(tem, row, credp, called_from); + /* + * We are getting the current cursor position in pixel + * mode so that we don't over-write the console output + * during boot. + */ + plat_tem_get_prom_pos(&row, &col); - /* first line of our kernel console output */ - tem->tvs_first_line = row + 1; + /* + * Adjust the row if necessary when the font of our + * kernel console tem is different with that of prom + * tem. + */ + row = tem_adjust_row(tem, row, credp, called_from); - /* re-set and align cusror position */ - tem->tvs_s_cursor.row = tem->tvs_c_cursor.row = - (screen_pos_t)row; - tem->tvs_s_cursor.col = tem->tvs_c_cursor.col = 0; + /* first line of our kernel console output */ + tem->tvs_first_line = row + 1; + + /* re-set and align cursor position */ + tem->tvs_s_cursor.row = tem->tvs_c_cursor.row = + (screen_pos_t)row; + tem->tvs_s_cursor.col = tem->tvs_c_cursor.col = 0; - /* - * When tem is starting up, part of the screen is filled - * with information from boot loader and early boot. - * For tem, the screen content above current cursor - * should be treated as image. - */ - for (; row > 0; row--) { - for (col = 0; col < tems.ts_c_dimension.width; col++) { - tem->tvs_screen_rows[row][col].tc_char = - TEM_ATTR(TEM_ATTR_IMAGE); - } + /* + * When tem is starting up, part of the screen is filled + * with information from boot loader and early boot. + * For tem, the screen content above current cursor + * should be treated as image. + */ + for (; row > 0; row--) { + for (col = 0; col < tems.ts_c_dimension.width; col++) { + tem->tvs_screen_rows[row][col].tc_char = + TEM_ATTR(TEM_ATTR_IMAGE); } - } else { - tem_safe_reset_display(tem, credp, called_from, B_TRUE, B_TRUE); } }
--- a/usr/src/uts/common/sys/tem_impl.h Thu May 30 09:18:03 2019 +0300 +++ b/usr/src/uts/common/sys/tem_impl.h Wed May 29 20:02:05 2019 +0300 @@ -283,7 +283,7 @@ void tems_cursor_layered(struct vis_conscursor *, cred_t *); void tems_safe_copy(struct vis_conscopy *, cred_t *, enum called_from); -void tem_pix_align(struct tem_vt_state *, cred_t *, enum called_from); +void tem_align(struct tem_vt_state *, cred_t *, enum called_from); void tem_safe_check_first_time(struct tem_vt_state *tem, cred_t *, enum called_from); void tem_safe_reset_display(struct tem_vt_state *, cred_t *,