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 <[email protected]>
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)
74 static void sticon_putcs(struct vc_data *conp, const u16 *s, unsigned int count, in sticon_putcs() argument
80 if (conp->vc_mode != KD_TEXT) in sticon_putcs()
83 while (count--) { in sticon_putcs()
85 font_data[conp->vc_num]); in sticon_putcs()
97 car1 = conp->vc_screenbuf[conp->state.x + conp->state.y * conp->vc_cols]; in sticon_cursor()
99 sti_putc(sticon_sti, car1, conp->state.y, conp->state.x, in sticon_cursor()
100 font_data[conp->vc_num]); in sticon_cursor()
104 switch (CUR_SIZE(conp->vc_cursor_type)) { in sticon_cursor()
111 conp->state.y, conp->state.x, font_data[conp->vc_num]); in sticon_cursor()
117 unsigned int b, enum con_scroll dir, unsigned int count) in sticon_scroll() argument
128 sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols, in sticon_scroll()
129 font_data[conp->vc_num]); in sticon_scroll()
130 sti_clear(sti, b - count, 0, count, conp->vc_cols, in sticon_scroll()
131 conp->vc_video_erase_char, font_data[conp->vc_num]); in sticon_scroll()
135 sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols, in sticon_scroll()
136 font_data[conp->vc_num]); in sticon_scroll()
137 sti_clear(sti, t, 0, count, conp->vc_cols, in sticon_scroll()
138 conp->vc_video_erase_char, font_data[conp->vc_num]); in sticon_scroll()
148 if (--FNTREFCOUNT(font_data[unit]) == 0) { in sticon_set_def_font()
149 kfree(font_data[unit]->raw_ptr); in sticon_set_def_font()
161 int unit = vc->vc_num; in sticon_set_font()
162 int w = op->width; in sticon_set_font()
163 int h = op->height; in sticon_set_font()
167 unsigned char *data = op->data, *p; in sticon_set_font()
170 || (op->charcount != 256 && op->charcount != 512)) in sticon_set_font()
171 return -EINVAL; in sticon_set_font()
174 size = bpc * op->charcount; in sticon_set_font()
178 return -ENOMEM; in sticon_set_font()
180 new_font->first_char = 0; in sticon_set_font()
181 new_font->last_char = op->charcount - 1; in sticon_set_font()
182 new_font->width = w; in sticon_set_font()
183 new_font->height = h; in sticon_set_font()
184 new_font->font_type = STI_FONT_HPROMAN8; in sticon_set_font()
185 new_font->bytes_per_char = bpc; in sticon_set_font()
186 new_font->underline_height = 0; in sticon_set_font()
187 new_font->underline_pos = 0; in sticon_set_font()
192 return -ENOMEM; in sticon_set_font()
194 cooked_font->raw = new_font; in sticon_set_font()
195 cooked_font->raw_ptr = new_font; in sticon_set_font()
196 cooked_font->width = w; in sticon_set_font()
197 cooked_font->height = h; in sticon_set_font()
202 for (i = 0; i < op->charcount; i++) { in sticon_set_font()
209 new_font = cooked_font->raw_ptr; in sticon_set_font()
221 new_font = cooked_font->raw_ptr; in sticon_set_font()
227 vc_old_rows = vc->vc_rows; in sticon_set_font()
228 vc_old_cols = vc->vc_cols; in sticon_set_font()
230 vc->vc_video_erase_char, font_data[vc->vc_num]); in sticon_set_font()
238 vc_cols = sti_onscreen_x(sti) / cooked_font->width; in sticon_set_font()
239 vc_rows = sti_onscreen_y(sti) / cooked_font->height; in sticon_set_font()
252 sticon_set_def_font(vc->vc_num); in sticon_font_default()
269 vc_cols = sti_onscreen_x(sti) / sti->font->width; in sticon_init()
270 vc_rows = sti_onscreen_y(sti) / sti->font->height; in sticon_init()
271 c->vc_can_do_color = 1; in sticon_init()
274 c->vc_cols = vc_cols; in sticon_init()
275 c->vc_rows = vc_rows; in sticon_init()
291 unsigned int width) in sticon_clear() argument
293 sti_clear(sticon_sti, sy, sx, 1, width, in sticon_clear()
294 conp->vc_video_erase_char, font_data[conp->vc_num]); in sticon_clear()
310 sti_clear(sticon_sti, 0, 0, c->vc_rows, c->vc_cols, BLANK, in sticon_blank()
311 font_data[c->vc_num]); in sticon_blank()
332 static void sticon_invert_region(struct vc_data *conp, u16 *p, int count) in sticon_invert_region() argument
336 while (count--) { in sticon_invert_region()
377 return -ENODEV; in sticonsole_init()
383 sticon_sti->sti_data->inq_outptr.dev_name, in sticonsole_init()
384 sticon_sti->pa_path); in sticonsole_init()
386 err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, in sticonsole_init()
387 PAGE0->mem_cons.cl_class != CL_DUPLEX); in sticonsole_init()