diff options
author | Toomas Soome <tsoome@me.com> | 2017-01-08 19:42:47 +0200 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-02-07 20:38:45 -0500 |
commit | 5a80180135ef1464c88328124fbd15e94a5fb632 (patch) | |
tree | 3fccbb94796bb25bcc524819571a5f8e1da86743 /usr/src/uts/common/io/tem.c | |
parent | 82bb7c22d8e83f1de600f67544ab4c79e4d44b14 (diff) | |
download | illumos-joyent-5a80180135ef1464c88328124fbd15e94a5fb632.tar.gz |
10337 uts: tem implement cls callback & visual_io v4
Reviewed by: Gergő Doma <domag02@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/io/tem.c')
-rw-r--r-- | usr/src/uts/common/io/tem.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/usr/src/uts/common/io/tem.c b/usr/src/uts/common/io/tem.c index 29bd71e95c..e6a3e2edd6 100644 --- a/usr/src/uts/common/io/tem.c +++ b/usr/src/uts/common/io/tem.c @@ -458,6 +458,7 @@ tem_info_init(char *pathname, cred_t *credp) /* other sanity checks */ if (!((temargs.depth == 4) || (temargs.depth == 8) || + (temargs.depth == 15) || (temargs.depth == 16) || (temargs.depth == 24) || (temargs.depth == 32))) { cmn_err(CE_WARN, "terminal emulator: unsupported depth"); ret = tems_failed(credp, B_TRUE); @@ -533,6 +534,7 @@ tems_setup_terminal(struct vis_devinit *tp, size_t height, size_t width) tems.ts_pdepth = tp->depth; tems.ts_linebytes = tp->linebytes; tems.ts_display_mode = tp->mode; + tems.ts_color_map = tp->color_map; switch (tp->mode) { case VIS_TEXT: @@ -679,14 +681,28 @@ tems_modechange_callback(struct vis_modechg_arg *arg, } /* + * This function is used to clear entire screen via the underlying framebuffer + * driver. + */ +int +tems_cls_layered(struct vis_consclear *pda, + cred_t *credp) +{ + int rval; + + (void) ldi_ioctl(tems.ts_hdl, VIS_CONSCLEAR, + (intptr_t)pda, FKIOCTL, credp, &rval); + return (rval); +} + +/* * This function is used to display a rectangular blit of data * of a given size and location via the underlying framebuffer driver. * The blit can be as small as a pixel or as large as the screen. */ void -tems_display_layered( - struct vis_consdisplay *pda, - cred_t *credp) +tems_display_layered(struct vis_consdisplay *pda, + cred_t *credp) { int rval; @@ -701,9 +717,8 @@ tems_display_layered( * such as from vi when deleting characters and words. */ void -tems_copy_layered( - struct vis_conscopy *pma, - cred_t *credp) +tems_copy_layered(struct vis_conscopy *pma, + cred_t *credp) { int rval; @@ -716,9 +731,8 @@ tems_copy_layered( * pixel inverting, text block cursor via the underlying framebuffer. */ void -tems_cursor_layered( - struct vis_conscursor *pca, - cred_t *credp) +tems_cursor_layered(struct vis_conscursor *pca, + cred_t *credp) { int rval; |