Lines Matching refs:sisusb

95 sisusb_initialize(struct sisusb_usb_data *sisusb)  in sisusb_initialize()  argument
98 if (sisusb_setidxreg(sisusb, SISCR, 0x0c, 0x00)) in sisusb_initialize()
100 if (sisusb_setidxreg(sisusb, SISCR, 0x0d, 0x00)) in sisusb_initialize()
102 if (sisusb_setidxreg(sisusb, SISCR, 0x0e, 0x00)) in sisusb_initialize()
104 sisusb_setidxreg(sisusb, SISCR, 0x0f, 0x00); in sisusb_initialize()
108 sisusbcon_set_start_address(struct sisusb_usb_data *sisusb, struct vc_data *c) in sisusbcon_set_start_address() argument
110 sisusb->cur_start_addr = (c->vc_visible_origin - sisusb->scrbuf) / 2; in sisusbcon_set_start_address()
112 sisusb_setidxreg(sisusb, SISCR, 0x0c, (sisusb->cur_start_addr >> 8)); in sisusbcon_set_start_address()
113 sisusb_setidxreg(sisusb, SISCR, 0x0d, (sisusb->cur_start_addr & 0xff)); in sisusbcon_set_start_address()
117 sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location) in sisusb_set_cursor() argument
119 if (sisusb->sisusb_cursor_loc == location) in sisusb_set_cursor()
122 sisusb->sisusb_cursor_loc = location; in sisusb_set_cursor()
130 sisusb->bad_cursor_pos = 1; in sisusb_set_cursor()
132 if (sisusb_setidxregandor(sisusb, SISCR, 0x0b, 0x1f, 0x20)) in sisusb_set_cursor()
134 } else if (sisusb->bad_cursor_pos) { in sisusb_set_cursor()
135 if (sisusb_setidxregand(sisusb, SISCR, 0x0b, 0x1f)) in sisusb_set_cursor()
137 sisusb->bad_cursor_pos = 0; in sisusb_set_cursor()
140 if (sisusb_setidxreg(sisusb, SISCR, 0x0e, (location >> 8))) in sisusb_set_cursor()
142 sisusb_setidxreg(sisusb, SISCR, 0x0f, (location & 0xff)); in sisusb_set_cursor()
152 sisusb_sisusb_valid(struct sisusb_usb_data *sisusb) in sisusb_sisusb_valid() argument
154 if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) in sisusb_sisusb_valid()
163 struct sisusb_usb_data *sisusb; in sisusb_get_sisusb_lock_and_check() local
173 sisusb = sisusb_get_sisusb(console); in sisusb_get_sisusb_lock_and_check()
174 if (!sisusb) in sisusb_get_sisusb_lock_and_check()
177 mutex_lock(&sisusb->lock); in sisusb_get_sisusb_lock_and_check()
179 if (!sisusb_sisusb_valid(sisusb) || in sisusb_get_sisusb_lock_and_check()
180 !sisusb->havethisconsole[console]) { in sisusb_get_sisusb_lock_and_check()
181 mutex_unlock(&sisusb->lock); in sisusb_get_sisusb_lock_and_check()
185 return sisusb; in sisusb_get_sisusb_lock_and_check()
189 sisusb_is_inactive(struct vc_data *c, struct sisusb_usb_data *sisusb) in sisusb_is_inactive() argument
191 if (sisusb->is_gfx || in sisusb_is_inactive()
192 sisusb->textmodedestroyed || in sisusb_is_inactive()
210 struct sisusb_usb_data *sisusb; in sisusbcon_init() local
219 sisusb = sisusb_get_sisusb(c->vc_num); in sisusbcon_init()
220 if (!sisusb) in sisusbcon_init()
223 mutex_lock(&sisusb->lock); in sisusbcon_init()
225 if (!sisusb_sisusb_valid(sisusb)) { in sisusbcon_init()
226 mutex_unlock(&sisusb->lock); in sisusbcon_init()
234 c->vc_hi_font_mask = sisusb->current_font_512 ? 0x0800 : 0; in sisusbcon_init()
236 sisusb->haveconsole = 1; in sisusbcon_init()
238 sisusb->havethisconsole[c->vc_num] = 1; in sisusbcon_init()
243 c->vc_font.height = sisusb->current_font_height; in sisusbcon_init()
258 kref_get(&sisusb->kref); in sisusbcon_init()
263 mutex_unlock(&sisusb->lock); in sisusbcon_init()
276 struct sisusb_usb_data *sisusb; in sisusbcon_deinit() local
283 sisusb = sisusb_get_sisusb(c->vc_num); in sisusbcon_deinit()
284 if (!sisusb) in sisusbcon_deinit()
287 mutex_lock(&sisusb->lock); in sisusbcon_deinit()
292 sisusb->havethisconsole[c->vc_num] = 0; in sisusbcon_deinit()
295 if (sisusb->font_backup) { in sisusbcon_deinit()
297 if (sisusb->havethisconsole[c->vc_num]) in sisusbcon_deinit()
301 vfree(sisusb->font_backup); in sisusbcon_deinit()
302 sisusb->font_backup = NULL; in sisusbcon_deinit()
306 mutex_unlock(&sisusb->lock); in sisusbcon_deinit()
309 kref_put(&sisusb->kref, sisusb_delete); in sisusbcon_deinit()
361 (y) * sisusb->sisusb_num_columns + \
365 ((u16 *)(sisusb->vrambase + (c->vc_origin - sisusb->scrbuf)) + \
366 (y) * sisusb->sisusb_num_columns + \
373 struct sisusb_usb_data *sisusb; in sisusbcon_putc() local
375 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_putc()
376 if (!sisusb) in sisusbcon_putc()
380 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_putc()
381 mutex_unlock(&sisusb->lock); in sisusbcon_putc()
386 sisusb_copy_memory(sisusb, (char *)SISUSB_VADDR(x, y), in sisusbcon_putc()
389 mutex_unlock(&sisusb->lock); in sisusbcon_putc()
397 struct sisusb_usb_data *sisusb; in sisusbcon_putcs() local
401 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_putcs()
402 if (!sisusb) in sisusbcon_putcs()
416 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_putcs()
417 mutex_unlock(&sisusb->lock); in sisusbcon_putcs()
421 sisusb_copy_memory(sisusb, (char *)SISUSB_VADDR(x, y), in sisusbcon_putcs()
424 mutex_unlock(&sisusb->lock); in sisusbcon_putcs()
431 struct sisusb_usb_data *sisusb; in sisusbcon_clear() local
439 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_clear()
440 if (!sisusb) in sisusbcon_clear()
451 cols = sisusb->sisusb_num_columns; in sisusbcon_clear()
467 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_clear()
468 mutex_unlock(&sisusb->lock); in sisusbcon_clear()
475 sisusb_copy_memory(sisusb, (unsigned char *)SISUSB_VADDR(x, y), in sisusbcon_clear()
478 mutex_unlock(&sisusb->lock); in sisusbcon_clear()
485 struct sisusb_usb_data *sisusb; in sisusbcon_switch() local
493 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_switch()
494 if (!sisusb) in sisusbcon_switch()
500 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_switch()
501 mutex_unlock(&sisusb->lock); in sisusbcon_switch()
510 mutex_unlock(&sisusb->lock); in sisusbcon_switch()
511 dev_dbg(&sisusb->sisusb_dev->dev, "ASSERT ORIGIN != SCREENBUF!\n"); in sisusbcon_switch()
517 (int)(sisusb->scrbuf + sisusb->scrbuf_size - c->vc_origin)); in sisusbcon_switch()
523 sisusb_copy_memory(sisusb, (unsigned char *)c->vc_origin, in sisusbcon_switch()
527 mutex_unlock(&sisusb->lock); in sisusbcon_switch()
536 struct sisusb_usb_data *sisusb; in sisusbcon_save_screen() local
543 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_save_screen()
544 if (!sisusb) in sisusbcon_save_screen()
549 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_save_screen()
550 mutex_unlock(&sisusb->lock); in sisusbcon_save_screen()
556 (int)(sisusb->scrbuf + sisusb->scrbuf_size - c->vc_origin)); in sisusbcon_save_screen()
562 mutex_unlock(&sisusb->lock); in sisusbcon_save_screen()
569 struct sisusb_usb_data *sisusb; in sisusbcon_set_palette() local
577 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_set_palette()
578 if (!sisusb) in sisusbcon_set_palette()
583 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_set_palette()
584 mutex_unlock(&sisusb->lock); in sisusbcon_set_palette()
589 if (sisusb_setreg(sisusb, SISCOLIDX, table[i])) in sisusbcon_set_palette()
591 if (sisusb_setreg(sisusb, SISCOLDATA, c->vc_palette[j++] >> 2)) in sisusbcon_set_palette()
593 if (sisusb_setreg(sisusb, SISCOLDATA, c->vc_palette[j++] >> 2)) in sisusbcon_set_palette()
595 if (sisusb_setreg(sisusb, SISCOLDATA, c->vc_palette[j++] >> 2)) in sisusbcon_set_palette()
599 mutex_unlock(&sisusb->lock); in sisusbcon_set_palette()
606 struct sisusb_usb_data *sisusb; in sisusbcon_blank() local
610 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_blank()
611 if (!sisusb) in sisusbcon_blank()
617 sisusb->is_gfx = blank ? 1 : 0; in sisusbcon_blank()
619 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_blank()
620 mutex_unlock(&sisusb->lock); in sisusbcon_blank()
631 sisusb_copy_memory(sisusb, in sisusbcon_blank()
633 (u32)(sisusb->vrambase + in sisusbcon_blank()
634 (c->vc_origin - sisusb->scrbuf)), in sisusbcon_blank()
636 sisusb->con_blanked = 1; in sisusbcon_blank()
648 sisusb->con_blanked = 0; in sisusbcon_blank()
669 mutex_unlock(&sisusb->lock); in sisusbcon_blank()
673 sisusb_setidxregandor(sisusb, SISSR, 0x01, ~0x20, sr1); in sisusbcon_blank()
674 sisusb_setidxregandor(sisusb, SISCR, 0x17, 0x7f, cr17); in sisusbcon_blank()
675 sisusb_setidxregandor(sisusb, SISSR, 0x1f, 0x3f, pmreg); in sisusbcon_blank()
676 sisusb_setidxregandor(sisusb, SISCR, 0x63, 0xbf, cr63); in sisusbcon_blank()
680 mutex_unlock(&sisusb->lock); in sisusbcon_blank()
689 struct sisusb_usb_data *sisusb; in sisusbcon_scrolldelta() local
691 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_scrolldelta()
692 if (!sisusb) in sisusbcon_scrolldelta()
697 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_scrolldelta()
698 mutex_unlock(&sisusb->lock); in sisusbcon_scrolldelta()
702 vc_scrolldelta_helper(c, lines, sisusb->con_rolled_over, in sisusbcon_scrolldelta()
703 (void *)sisusb->scrbuf, sisusb->scrbuf_size); in sisusbcon_scrolldelta()
705 sisusbcon_set_start_address(sisusb, c); in sisusbcon_scrolldelta()
707 mutex_unlock(&sisusb->lock); in sisusbcon_scrolldelta()
714 struct sisusb_usb_data *sisusb; in sisusbcon_cursor() local
717 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_cursor()
718 if (!sisusb) in sisusbcon_cursor()
723 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_cursor()
724 mutex_unlock(&sisusb->lock); in sisusbcon_cursor()
730 sisusbcon_set_start_address(sisusb, c); in sisusbcon_cursor()
734 sisusb_setidxregor(sisusb, SISCR, 0x0a, 0x20); in sisusbcon_cursor()
735 sisusb->sisusb_cursor_size_to = -1; in sisusbcon_cursor()
736 mutex_unlock(&sisusb->lock); in sisusbcon_cursor()
740 sisusb_set_cursor(sisusb, (c->vc_pos - sisusb->scrbuf) / 2); in sisusbcon_cursor()
766 if (sisusb->sisusb_cursor_size_from != from || in sisusbcon_cursor()
767 sisusb->sisusb_cursor_size_to != to) { in sisusbcon_cursor()
769 sisusb_setidxreg(sisusb, SISCR, 0x0a, from); in sisusbcon_cursor()
770 sisusb_setidxregandor(sisusb, SISCR, 0x0b, 0xe0, to); in sisusbcon_cursor()
772 sisusb->sisusb_cursor_size_from = from; in sisusbcon_cursor()
773 sisusb->sisusb_cursor_size_to = to; in sisusbcon_cursor()
776 mutex_unlock(&sisusb->lock); in sisusbcon_cursor()
780 sisusbcon_scroll_area(struct vc_data *c, struct sisusb_usb_data *sisusb, in sisusbcon_scroll_area() argument
784 int cols = sisusb->sisusb_num_columns; in sisusbcon_scroll_area()
815 sisusb_copy_memory(sisusb, (char *)SISUSB_VADDR(0, t), in sisusbcon_scroll_area()
818 mutex_unlock(&sisusb->lock); in sisusbcon_scroll_area()
828 struct sisusb_usb_data *sisusb; in sisusbcon_scroll() local
845 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_scroll()
846 if (!sisusb) in sisusbcon_scroll()
851 if (sisusb_is_inactive(c, sisusb)) { in sisusbcon_scroll()
852 mutex_unlock(&sisusb->lock); in sisusbcon_scroll()
858 return sisusbcon_scroll_area(c, sisusb, t, b, dir, lines); in sisusbcon_scroll()
862 sisusbcon_set_start_address(sisusb, c); in sisusbcon_scroll()
876 sisusb->scrbuf + sisusb->scrbuf_size) { in sisusbcon_scroll()
877 sisusbcon_memcpyw((u16 *)sisusb->scrbuf, in sisusbcon_scroll()
880 c->vc_origin = sisusb->scrbuf; in sisusbcon_scroll()
881 sisusb->con_rolled_over = oldorigin - sisusb->scrbuf; in sisusbcon_scroll()
894 if (oldorigin - delta < sisusb->scrbuf) { in sisusbcon_scroll()
895 sisusbcon_memmovew((u16 *)(sisusb->scrbuf + in sisusbcon_scroll()
896 sisusb->scrbuf_size - in sisusbcon_scroll()
901 c->vc_origin = sisusb->scrbuf + in sisusbcon_scroll()
902 sisusb->scrbuf_size - in sisusbcon_scroll()
904 sisusb->con_rolled_over = 0; in sisusbcon_scroll()
916 originoffset = (u32)(c->vc_origin - sisusb->scrbuf); in sisusbcon_scroll()
919 sisusb_copy_memory(sisusb, in sisusbcon_scroll()
921 (u32)(sisusb->vrambase + originoffset), in sisusbcon_scroll()
924 sisusb_copy_memory(sisusb, in sisusbcon_scroll()
926 (u32)sisusb->vrambase + originoffset + in sisusbcon_scroll()
930 sisusb_copy_memory(sisusb, in sisusbcon_scroll()
932 (u32)(sisusb->vrambase + originoffset), in sisusbcon_scroll()
938 sisusbcon_set_start_address(sisusb, c); in sisusbcon_scroll()
942 mutex_unlock(&sisusb->lock); in sisusbcon_scroll()
951 struct sisusb_usb_data *sisusb; in sisusbcon_set_origin() local
958 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_set_origin()
959 if (!sisusb) in sisusbcon_set_origin()
964 if (sisusb_is_inactive(c, sisusb) || sisusb->con_blanked) { in sisusbcon_set_origin()
965 mutex_unlock(&sisusb->lock); in sisusbcon_set_origin()
969 c->vc_origin = c->vc_visible_origin = sisusb->scrbuf; in sisusbcon_set_origin()
971 sisusbcon_set_start_address(sisusb, c); in sisusbcon_set_origin()
973 sisusb->con_rolled_over = 0; in sisusbcon_set_origin()
975 mutex_unlock(&sisusb->lock); in sisusbcon_set_origin()
985 struct sisusb_usb_data *sisusb; in sisusbcon_resize() local
988 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_resize()
989 if (!sisusb) in sisusbcon_resize()
992 fh = sisusb->current_font_height; in sisusbcon_resize()
994 mutex_unlock(&sisusb->lock); in sisusbcon_resize()
1010 sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot, in sisusbcon_do_font_op() argument
1028 mutex_unlock(&sisusb->lock); in sisusbcon_do_font_op()
1033 sisusb->font_slot = slot; in sisusbcon_do_font_op()
1043 err |= sisusb_setidxreg(sisusb, SISSR, 0x00, 0x01); /* Reset */ in sisusbcon_do_font_op()
1044 err |= sisusb_setidxreg(sisusb, SISSR, 0x02, 0x04); /* Write to plane 2 */ in sisusbcon_do_font_op()
1045 err |= sisusb_setidxreg(sisusb, SISSR, 0x04, 0x07); /* Memory mode a0-bf */ in sisusbcon_do_font_op()
1046 err |= sisusb_setidxreg(sisusb, SISSR, 0x00, 0x03); /* Reset */ in sisusbcon_do_font_op()
1051 err |= sisusb_setidxreg(sisusb, SISGR, 0x04, 0x03); /* Select plane read 2 */ in sisusbcon_do_font_op()
1052 err |= sisusb_setidxreg(sisusb, SISGR, 0x05, 0x00); /* Disable odd/even */ in sisusbcon_do_font_op()
1053 err |= sisusb_setidxreg(sisusb, SISGR, 0x06, 0x00); /* Address range a0-bf */ in sisusbcon_do_font_op()
1061 err |= sisusb_writeb(sisusb, in sisusbcon_do_font_op()
1062 sisusb->vrambase + offset + i, in sisusbcon_do_font_op()
1069 err |= sisusb_readb(sisusb, in sisusbcon_do_font_op()
1070 sisusb->vrambase + offset + i, in sisusbcon_do_font_op()
1084 err |= sisusb_writeb(sisusb, in sisusbcon_do_font_op()
1085 sisusb->vrambase + offset + in sisusbcon_do_font_op()
1093 err |= sisusb_readb(sisusb, in sisusbcon_do_font_op()
1094 sisusb->vrambase + offset + in sisusbcon_do_font_op()
1106 err |= sisusb_setidxreg(sisusb, SISSR, 0x00, 0x01); /* Reset */ in sisusbcon_do_font_op()
1107 err |= sisusb_setidxreg(sisusb, SISSR, 0x02, 0x03); /* Write to planes 0+1 */ in sisusbcon_do_font_op()
1108 err |= sisusb_setidxreg(sisusb, SISSR, 0x04, 0x03); /* Memory mode a0-bf */ in sisusbcon_do_font_op()
1110 sisusb_setidxreg(sisusb, SISSR, 0x03, font_select); in sisusbcon_do_font_op()
1111 err |= sisusb_setidxreg(sisusb, SISSR, 0x00, 0x03); /* Reset end */ in sisusbcon_do_font_op()
1116 err |= sisusb_setidxreg(sisusb, SISGR, 0x04, 0x00); /* Select plane read 0 */ in sisusbcon_do_font_op()
1117 err |= sisusb_setidxreg(sisusb, SISGR, 0x05, 0x10); /* Enable odd/even */ in sisusbcon_do_font_op()
1118 err |= sisusb_setidxreg(sisusb, SISGR, 0x06, 0x06); /* Address range b8-bf */ in sisusbcon_do_font_op()
1123 if ((set) && (ch512 != sisusb->current_font_512)) { in sisusbcon_do_font_op()
1134 sisusb->current_font_512 = ch512; in sisusbcon_do_font_op()
1139 sisusb_getreg(sisusb, SISINPSTAT, &dummy); in sisusbcon_do_font_op()
1140 sisusb_setreg(sisusb, SISAR, 0x12); in sisusbcon_do_font_op()
1141 sisusb_setreg(sisusb, SISAR, ch512 ? 0x07 : 0x0f); in sisusbcon_do_font_op()
1143 sisusb_getreg(sisusb, SISINPSTAT, &dummy); in sisusbcon_do_font_op()
1144 sisusb_setreg(sisusb, SISAR, 0x20); in sisusbcon_do_font_op()
1145 sisusb_getreg(sisusb, SISINPSTAT, &dummy); in sisusbcon_do_font_op()
1167 sisusb_getidxreg(sisusb, SISCR, 0x07, &ovr); in sisusbcon_do_font_op()
1172 sisusb_setidxreg(sisusb, SISCR, 0x07, ovr); in sisusbcon_do_font_op()
1173 sisusb_setidxreg(sisusb, SISCR, 0x12, vde); in sisusbcon_do_font_op()
1177 sisusb_getidxreg(sisusb, SISCR, 0x09, &fsr); in sisusbcon_do_font_op()
1179 sisusb_setidxreg(sisusb, SISCR, 0x09, fsr); in sisusbcon_do_font_op()
1180 sisusb->current_font_height = fh; in sisusbcon_do_font_op()
1182 sisusb->sisusb_cursor_size_from = -1; in sisusbcon_do_font_op()
1183 sisusb->sisusb_cursor_size_to = -1; in sisusbcon_do_font_op()
1188 mutex_unlock(&sisusb->lock); in sisusbcon_do_font_op()
1212 mutex_unlock(&sisusb->lock); in sisusbcon_do_font_op()
1222 struct sisusb_usb_data *sisusb; in sisusbcon_font_set() local
1228 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_font_set()
1229 if (!sisusb) in sisusbcon_font_set()
1238 if (sisusb->font_backup) { in sisusbcon_font_set()
1239 if (sisusb->font_backup_size < charcount) { in sisusbcon_font_set()
1240 vfree(sisusb->font_backup); in sisusbcon_font_set()
1241 sisusb->font_backup = NULL; in sisusbcon_font_set()
1245 if (!sisusb->font_backup) in sisusbcon_font_set()
1246 sisusb->font_backup = vmalloc(array_size(charcount, 32)); in sisusbcon_font_set()
1248 if (sisusb->font_backup) { in sisusbcon_font_set()
1249 memcpy(sisusb->font_backup, font->data, charcount * 32); in sisusbcon_font_set()
1250 sisusb->font_backup_size = charcount; in sisusbcon_font_set()
1251 sisusb->font_backup_height = font->height; in sisusbcon_font_set()
1252 sisusb->font_backup_512 = (charcount == 512) ? 1 : 0; in sisusbcon_font_set()
1257 return sisusbcon_do_font_op(sisusb, 1, 2, font->data, in sisusbcon_font_set()
1267 struct sisusb_usb_data *sisusb; in sisusbcon_font_get() local
1269 sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num); in sisusbcon_font_get()
1270 if (!sisusb) in sisusbcon_font_get()
1280 mutex_unlock(&sisusb->lock); in sisusbcon_font_get()
1284 if (!sisusb->font_backup) { in sisusbcon_font_get()
1285 mutex_unlock(&sisusb->lock); in sisusbcon_font_get()
1290 memcpy(font->data, sisusb->font_backup, 256 * 32); in sisusbcon_font_get()
1292 mutex_unlock(&sisusb->lock); in sisusbcon_font_get()
1403 sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) in sisusb_console_init() argument
1407 mutex_lock(&sisusb->lock); in sisusb_console_init()
1410 if (sisusb->haveconsole || !sisusb->SiS_Pr) { in sisusb_console_init()
1411 mutex_unlock(&sisusb->lock); in sisusb_console_init()
1415 sisusb->con_first = first; in sisusb_console_init()
1416 sisusb->con_last = last; in sisusb_console_init()
1421 mutex_unlock(&sisusb->lock); in sisusb_console_init()
1426 if (!sisusb->gfxinit || first < 1 || last < 1) { in sisusb_console_init()
1427 mutex_unlock(&sisusb->lock); in sisusb_console_init()
1431 sisusb->sisusb_cursor_loc = -1; in sisusb_console_init()
1432 sisusb->sisusb_cursor_size_from = -1; in sisusb_console_init()
1433 sisusb->sisusb_cursor_size_to = -1; in sisusb_console_init()
1436 if (sisusb_reset_text_mode(sisusb, 1)) { in sisusb_console_init()
1437 mutex_unlock(&sisusb->lock); in sisusb_console_init()
1438 dev_err(&sisusb->sisusb_dev->dev, "Failed to set up text mode\n"); in sisusb_console_init()
1443 sisusb_initialize(sisusb); in sisusb_console_init()
1447 mysisusbs[i] = sisusb; in sisusb_console_init()
1451 sisusb->sisusb_num_columns = 80; in sisusb_console_init()
1454 sisusb->scrbuf_size = 32 * 1024; in sisusb_console_init()
1457 if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) { in sisusb_console_init()
1458 mutex_unlock(&sisusb->lock); in sisusb_console_init()
1459 dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate screen buffer\n"); in sisusb_console_init()
1463 mutex_unlock(&sisusb->lock); in sisusb_console_init()
1470 sisusb->haveconsole = 1; in sisusb_console_init()
1480 sisusb_console_exit(struct sisusb_usb_data *sisusb) in sisusb_console_exit() argument
1510 if (sisusb->haveconsole) { in sisusb_console_exit()
1512 if (sisusb->havethisconsole[i]) { in sisusb_console_exit()
1520 sisusb->haveconsole = 0; in sisusb_console_exit()
1523 vfree((void *)sisusb->scrbuf); in sisusb_console_exit()
1524 sisusb->scrbuf = 0; in sisusb_console_exit()
1526 vfree(sisusb->font_backup); in sisusb_console_exit()
1527 sisusb->font_backup = NULL; in sisusb_console_exit()