Lines Matching +full:count +full:- +full:width

2  *  linux/drivers/video/console/sticon.c - console driver using HP's STI firmware
5 * Copyright (C) 2002-2020 Helge Deller <deller@gmx.de>
28 * Emmanuel Marty (core@ggi-project.org)
59 #define STI_DEF_FONT sticon_sti->font
62 #define FNTREFCOUNT(fd) (fd->refcount)
63 #define FNTCRC(fd) (fd->crc)
79 if (conp->vc_mode != KD_TEXT) in sticon_putc()
82 sti_putc(sticon_sti, c, ypos, xpos, font_data[conp->vc_num]); in sticon_putc()
86 int count, int ypos, int xpos) in sticon_putcs() argument
91 if (conp->vc_mode != KD_TEXT) in sticon_putcs()
94 while (count--) { in sticon_putcs()
96 font_data[conp->vc_num]); in sticon_putcs()
108 car1 = conp->vc_screenbuf[conp->state.x + conp->state.y * conp->vc_cols]; in sticon_cursor()
111 sti_putc(sticon_sti, car1, conp->state.y, conp->state.x, in sticon_cursor()
112 font_data[conp->vc_num]); in sticon_cursor()
116 switch (CUR_SIZE(conp->vc_cursor_type)) { in sticon_cursor()
123 conp->state.y, conp->state.x, font_data[conp->vc_num]); in sticon_cursor()
131 unsigned int b, enum con_scroll dir, unsigned int count) in sticon_scroll() argument
142 sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols, in sticon_scroll()
143 font_data[conp->vc_num]); in sticon_scroll()
144 sti_clear(sti, b - count, 0, count, conp->vc_cols, in sticon_scroll()
145 conp->vc_video_erase_char, font_data[conp->vc_num]); in sticon_scroll()
149 sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols, in sticon_scroll()
150 font_data[conp->vc_num]); in sticon_scroll()
151 sti_clear(sti, t, 0, count, conp->vc_cols, in sticon_scroll()
152 conp->vc_video_erase_char, font_data[conp->vc_num]); in sticon_scroll()
162 if (--FNTREFCOUNT(font_data[unit]) == 0) { in sticon_set_def_font()
163 kfree(font_data[unit]->raw_ptr); in sticon_set_def_font()
175 int unit = vc->vc_num; in sticon_set_font()
176 int w = op->width; in sticon_set_font()
177 int h = op->height; in sticon_set_font()
181 unsigned char *data = op->data, *p; in sticon_set_font()
184 || (op->charcount != 256 && op->charcount != 512)) in sticon_set_font()
185 return -EINVAL; in sticon_set_font()
188 size = bpc * op->charcount; in sticon_set_font()
192 return -ENOMEM; in sticon_set_font()
194 new_font->first_char = 0; in sticon_set_font()
195 new_font->last_char = op->charcount - 1; in sticon_set_font()
196 new_font->width = w; in sticon_set_font()
197 new_font->height = h; in sticon_set_font()
198 new_font->font_type = STI_FONT_HPROMAN8; in sticon_set_font()
199 new_font->bytes_per_char = bpc; in sticon_set_font()
200 new_font->underline_height = 0; in sticon_set_font()
201 new_font->underline_pos = 0; in sticon_set_font()
206 return -ENOMEM; in sticon_set_font()
208 cooked_font->raw = new_font; in sticon_set_font()
209 cooked_font->raw_ptr = new_font; in sticon_set_font()
210 cooked_font->width = w; in sticon_set_font()
211 cooked_font->height = h; in sticon_set_font()
216 for (i = 0; i < op->charcount; i++) { in sticon_set_font()
223 new_font = cooked_font->raw_ptr; in sticon_set_font()
235 new_font = cooked_font->raw_ptr; in sticon_set_font()
241 vc_old_rows = vc->vc_rows; in sticon_set_font()
242 vc_old_cols = vc->vc_cols; in sticon_set_font()
244 vc->vc_video_erase_char, font_data[vc->vc_num]); in sticon_set_font()
252 vc_cols = sti_onscreen_x(sti) / cooked_font->width; in sticon_set_font()
253 vc_rows = sti_onscreen_y(sti) / cooked_font->height; in sticon_set_font()
265 sticon_set_def_font(vc->vc_num); in sticon_font_default()
282 vc_cols = sti_onscreen_x(sti) / sti->font->width; in sticon_init()
283 vc_rows = sti_onscreen_y(sti) / sti->font->height; in sticon_init()
284 c->vc_can_do_color = 1; in sticon_init()
287 c->vc_cols = vc_cols; in sticon_init()
288 c->vc_rows = vc_rows; in sticon_init()
304 int width) in sticon_clear() argument
306 if (!height || !width) in sticon_clear()
309 sti_clear(sticon_sti, sy, sx, height, width, in sticon_clear()
310 conp->vc_video_erase_char, font_data[conp->vc_num]); in sticon_clear()
325 sti_clear(sticon_sti, 0, 0, c->vc_rows, c->vc_cols, BLANK, in sticon_blank()
326 font_data[c->vc_num]); in sticon_blank()
346 static void sticon_invert_region(struct vc_data *conp, u16 *p, int count) in sticon_invert_region() argument
350 while (count--) { in sticon_invert_region()
392 return -ENODEV; in sticonsole_init()
398 sticon_sti->sti_data->inq_outptr.dev_name, in sticonsole_init()
399 sticon_sti->pa_path); in sticonsole_init()
401 err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, in sticonsole_init()
402 PAGE0->mem_cons.cl_class != CL_DUPLEX); in sticonsole_init()