Lines Matching refs:ri
341 cg6_ras_nuke_cursor(struct rasops_info *ri) in cg6_ras_nuke_cursor() argument
343 struct vcons_screen *scr = ri->ri_hw; in cg6_ras_nuke_cursor()
347 if (ri->ri_flg & RI_CURSOR) { in cg6_ras_nuke_cursor()
348 wi = ri->ri_font->fontwidth; in cg6_ras_nuke_cursor()
349 he = ri->ri_font->fontheight; in cg6_ras_nuke_cursor()
350 x = ri->ri_ccol * wi + ri->ri_xorigin; in cg6_ras_nuke_cursor()
351 y = ri->ri_crow * he + ri->ri_yorigin; in cg6_ras_nuke_cursor()
353 ri->ri_flg &= ~RI_CURSOR; in cg6_ras_nuke_cursor()
360 struct rasops_info *ri = cookie; in cg6_ras_copyrows() local
361 struct vcons_screen *scr = ri->ri_hw; in cg6_ras_copyrows()
371 if (src+n > ri->ri_rows) in cg6_ras_copyrows()
372 n = ri->ri_rows - src; in cg6_ras_copyrows()
377 if (dst+n > ri->ri_rows) in cg6_ras_copyrows()
378 n = ri->ri_rows - dst; in cg6_ras_copyrows()
381 if ((ri->ri_crow >= src && ri->ri_crow < (src + n)) && in cg6_ras_copyrows()
382 (ri->ri_flg & RI_CURSOR)) { in cg6_ras_copyrows()
383 cg6_ras_nuke_cursor(ri); in cg6_ras_copyrows()
385 n *= ri->ri_font->fontheight; in cg6_ras_copyrows()
386 src *= ri->ri_font->fontheight; in cg6_ras_copyrows()
387 dst *= ri->ri_font->fontheight; in cg6_ras_copyrows()
394 fbc->fbc_x0 = ri->ri_xorigin; in cg6_ras_copyrows()
395 fbc->fbc_y0 = ri->ri_yorigin + src; in cg6_ras_copyrows()
396 fbc->fbc_x1 = ri->ri_xorigin + ri->ri_emuwidth - 1; in cg6_ras_copyrows()
397 fbc->fbc_y1 = ri->ri_yorigin + src + n - 1; in cg6_ras_copyrows()
398 fbc->fbc_x2 = ri->ri_xorigin; in cg6_ras_copyrows()
399 fbc->fbc_y2 = ri->ri_yorigin + dst; in cg6_ras_copyrows()
400 fbc->fbc_x3 = ri->ri_xorigin + ri->ri_emuwidth - 1; in cg6_ras_copyrows()
401 fbc->fbc_y3 = ri->ri_yorigin + dst + n - 1; in cg6_ras_copyrows()
403 if (ri->ri_crow >= dst && ri->ri_crow < (dst + n)) in cg6_ras_copyrows()
404 ri->ri_flg &= ~RI_CURSOR; in cg6_ras_copyrows()
410 struct rasops_info *ri = cookie; in cg6_ras_copycols() local
411 struct vcons_screen *scr = ri->ri_hw; in cg6_ras_copycols()
417 if ((row < 0) || (row >= ri->ri_rows)) in cg6_ras_copycols()
423 if (src+n > ri->ri_cols) in cg6_ras_copycols()
424 n = ri->ri_cols - src; in cg6_ras_copycols()
429 if (dst+n > ri->ri_cols) in cg6_ras_copycols()
430 n = ri->ri_cols - dst; in cg6_ras_copycols()
433 if (ri->ri_crow == row && in cg6_ras_copycols()
434 (ri->ri_ccol >= src && ri->ri_ccol < (src + n)) && in cg6_ras_copycols()
435 (ri->ri_flg & RI_CURSOR)) { in cg6_ras_copycols()
436 cg6_ras_nuke_cursor(ri); in cg6_ras_copycols()
438 n *= ri->ri_font->fontwidth; in cg6_ras_copycols()
439 src *= ri->ri_font->fontwidth; in cg6_ras_copycols()
440 dst *= ri->ri_font->fontwidth; in cg6_ras_copycols()
441 row *= ri->ri_font->fontheight; in cg6_ras_copycols()
448 fbc->fbc_x0 = ri->ri_xorigin + src; in cg6_ras_copycols()
449 fbc->fbc_y0 = ri->ri_yorigin + row; in cg6_ras_copycols()
450 fbc->fbc_x1 = ri->ri_xorigin + src + n - 1; in cg6_ras_copycols()
451 fbc->fbc_y1 = ri->ri_yorigin + row + in cg6_ras_copycols()
452 ri->ri_font->fontheight - 1; in cg6_ras_copycols()
453 fbc->fbc_x2 = ri->ri_xorigin + dst; in cg6_ras_copycols()
454 fbc->fbc_y2 = ri->ri_yorigin + row; in cg6_ras_copycols()
455 fbc->fbc_x3 = ri->ri_xorigin + dst + n - 1; in cg6_ras_copycols()
456 fbc->fbc_y3 = ri->ri_yorigin + row + in cg6_ras_copycols()
457 ri->ri_font->fontheight - 1; in cg6_ras_copycols()
459 if (ri->ri_crow == row && in cg6_ras_copycols()
460 (ri->ri_ccol >= dst && ri->ri_ccol < (dst + n))) in cg6_ras_copycols()
461 ri->ri_flg &= ~RI_CURSOR; in cg6_ras_copycols()
467 struct rasops_info *ri = cookie; in cg6_ras_erasecols() local
468 struct vcons_screen *scr = ri->ri_hw; in cg6_ras_erasecols()
472 if ((row < 0) || (row >= ri->ri_rows)) in cg6_ras_erasecols()
478 if (col+n > ri->ri_cols) in cg6_ras_erasecols()
479 n = ri->ri_cols - col; in cg6_ras_erasecols()
483 if (ri->ri_crow == row && in cg6_ras_erasecols()
484 (ri->ri_ccol >= col && ri->ri_ccol < (col + n))) in cg6_ras_erasecols()
485 ri->ri_flg &= ~RI_CURSOR; in cg6_ras_erasecols()
487 n *= ri->ri_font->fontwidth; in cg6_ras_erasecols()
488 col *= ri->ri_font->fontwidth; in cg6_ras_erasecols()
489 row *= ri->ri_font->fontheight; in cg6_ras_erasecols()
495 fbc->fbc_fg = ri->ri_devcmap[(attr >> 16) & 0xff]; in cg6_ras_erasecols()
496 fbc->fbc_arecty = ri->ri_yorigin + row; in cg6_ras_erasecols()
497 fbc->fbc_arectx = ri->ri_xorigin + col; in cg6_ras_erasecols()
498 fbc->fbc_arecty = ri->ri_yorigin + row + in cg6_ras_erasecols()
499 ri->ri_font->fontheight - 1; in cg6_ras_erasecols()
500 fbc->fbc_arectx = ri->ri_xorigin + col + n - 1; in cg6_ras_erasecols()
507 struct rasops_info *ri = cookie; in cg6_ras_eraserows() local
508 struct vcons_screen *scr = ri->ri_hw; in cg6_ras_eraserows()
516 if (row+n > ri->ri_rows) in cg6_ras_eraserows()
517 n = ri->ri_rows - row; in cg6_ras_eraserows()
521 if (ri->ri_crow >= row && ri->ri_crow < (row + n)) in cg6_ras_eraserows()
522 ri->ri_flg &= ~RI_CURSOR; in cg6_ras_eraserows()
528 fbc->fbc_fg = ri->ri_devcmap[(attr >> 16) & 0xff]; in cg6_ras_eraserows()
529 if ((n == ri->ri_rows) && (ri->ri_flg & RI_FULLCLEAR)) { in cg6_ras_eraserows()
532 fbc->fbc_arecty = ri->ri_height - 1; in cg6_ras_eraserows()
533 fbc->fbc_arectx = ri->ri_width - 1; in cg6_ras_eraserows()
535 row *= ri->ri_font->fontheight; in cg6_ras_eraserows()
536 fbc->fbc_arecty = ri->ri_yorigin + row; in cg6_ras_eraserows()
537 fbc->fbc_arectx = ri->ri_xorigin; in cg6_ras_eraserows()
538 fbc->fbc_arecty = ri->ri_yorigin + row + in cg6_ras_eraserows()
539 (n * ri->ri_font->fontheight) - 1; in cg6_ras_eraserows()
540 fbc->fbc_arectx = ri->ri_xorigin + ri->ri_emuwidth - 1; in cg6_ras_eraserows()
550 struct rasops_info *ri = &cg6_console_screen.scr_ri; in cg6attach() local
618 memset(sc->sc_fb.fb_pixels, ri->ri_devcmap[sc->sc_bg], in cg6attach()
625 cgsix_defaultscreen.textops = &ri->ri_ops; in cg6attach()
626 cgsix_defaultscreen.capabilities = ri->ri_caps; in cg6attach()
627 cgsix_defaultscreen.nrows = ri->ri_rows; in cg6attach()
628 cgsix_defaultscreen.ncols = ri->ri_cols; in cg6attach()
631 wsdisplay_cnattach(&cgsix_defaultscreen, ri, 0, 0, defattr); in cg6attach()
632 if (ri->ri_flg & RI_ENABLE_ALPHA) { in cg6attach()
637 ri->ri_font->fontwidth, in cg6attach()
638 ri->ri_font->fontheight, in cg6attach()
652 (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr); in cg6attach()
654 if (ri->ri_flg & RI_ENABLE_ALPHA) { in cg6attach()
659 ri->ri_font->fontwidth, in cg6attach()
660 ri->ri_font->fontheight, in cg6attach()
1281 struct rasops_info *ri = &scr->scr_ri; in cgsix_init_screen() local
1284 ri->ri_depth = 8; in cgsix_init_screen()
1285 ri->ri_width = sc->sc_width; in cgsix_init_screen()
1286 ri->ri_height = sc->sc_height; in cgsix_init_screen()
1287 ri->ri_stride = sc->sc_stride; in cgsix_init_screen()
1289 ri->ri_flg = RI_CENTER | RI_8BIT_IS_RGB; in cgsix_init_screen()
1291 ri->ri_flg |= RI_ENABLE_ALPHA | RI_PREFER_ALPHA; in cgsix_init_screen()
1293 ri->ri_bits = sc->sc_fb.fb_pixels; in cgsix_init_screen()
1296 rasops_init(ri, 0, 0); in cgsix_init_screen()
1297 ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_REVERSE | in cgsix_init_screen()
1299 rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight, in cgsix_init_screen()
1300 sc->sc_width / ri->ri_font->fontwidth); in cgsix_init_screen()
1303 ri->ri_hw = scr; in cgsix_init_screen()
1304 ri->ri_ops.copyrows = cg6_ras_copyrows; in cgsix_init_screen()
1305 ri->ri_ops.copycols = cg6_ras_copycols; in cgsix_init_screen()
1306 ri->ri_ops.eraserows = cg6_ras_eraserows; in cgsix_init_screen()
1307 ri->ri_ops.erasecols = cg6_ras_erasecols; in cgsix_init_screen()
1308 ri->ri_ops.cursor = cgsix_cursor; in cgsix_init_screen()
1309 if (FONT_IS_ALPHA(ri->ri_font)) { in cgsix_init_screen()
1310 ri->ri_ops.putchar = cgsix_putchar_aa; in cgsix_init_screen()
1312 ri->ri_ops.putchar = cgsix_putchar; in cgsix_init_screen()
1401 struct rasops_info *ri = cookie; in cgsix_putchar() local
1402 struct wsdisplay_font *font = PICK_FONT(ri, c); in cgsix_putchar()
1403 struct vcons_screen *scr = ri->ri_hw; in cgsix_putchar()
1407 if ((row >= 0) && (row < ri->ri_rows) && (col >= 0) && in cgsix_putchar()
1408 (col < ri->ri_cols)) { in cgsix_putchar()
1410 if (row == ri->ri_crow && col == ri->ri_ccol) { in cgsix_putchar()
1411 ri->ri_flg &= ~RI_CURSOR; in cgsix_putchar()
1428 fg = (u_char)ri->ri_devcmap[(attr >> 16) & in cgsix_putchar()
1430 bg = (u_char)ri->ri_devcmap[(attr >> 24) & in cgsix_putchar()
1433 bg = (u_char)ri->ri_devcmap[(attr >> 16) & in cgsix_putchar()
1435 fg = (u_char)ri->ri_devcmap[(attr >> 24) & in cgsix_putchar()
1439 x = ri->ri_xorigin + col * wi; in cgsix_putchar()
1440 y = ri->ri_yorigin + row * he; in cgsix_putchar()
1447 ri->ri_fontscale; in cgsix_putchar()
1465 struct rasops_info *ri = cookie; in cgsix_putchar_aa() local
1466 struct wsdisplay_font *font = PICK_FONT(ri, c); in cgsix_putchar_aa()
1467 struct vcons_screen *scr = ri->ri_hw; in cgsix_putchar_aa()
1483 if (row == ri->ri_crow && col == ri->ri_ccol) { in cgsix_putchar_aa()
1484 ri->ri_flg &= ~RI_CURSOR; in cgsix_putchar_aa()
1490 bg = ri->ri_devcmap[(attr >> 16) & 0xf]; in cgsix_putchar_aa()
1491 x = ri->ri_xorigin + col * wi; in cgsix_putchar_aa()
1492 y = ri->ri_yorigin + row * he; in cgsix_putchar_aa()
1572 struct rasops_info *ri = cookie; in cgsix_cursor() local
1573 struct vcons_screen *scr = ri->ri_hw; in cgsix_cursor()
1577 wi = ri->ri_font->fontwidth; in cgsix_cursor()
1578 he = ri->ri_font->fontheight; in cgsix_cursor()
1582 if (ri->ri_flg & RI_CURSOR) { in cgsix_cursor()
1583 cg6_ras_nuke_cursor(ri); in cgsix_cursor()
1585 x = col * wi + ri->ri_xorigin; in cgsix_cursor()
1586 y = row * he + ri->ri_yorigin; in cgsix_cursor()
1588 ri->ri_flg |= RI_CURSOR; in cgsix_cursor()
1590 ri->ri_crow = row; in cgsix_cursor()
1591 ri->ri_ccol = col; in cgsix_cursor()
1594 ri->ri_crow = row; in cgsix_cursor()
1595 ri->ri_ccol = col; in cgsix_cursor()
1596 ri->ri_flg &= ~RI_CURSOR; in cgsix_cursor()
1603 struct rasops_info *ri = &cg6_console_screen.scr_ri; in cgsix_clearscreen() local
1613 fbc->fbc_fg = ri->ri_devcmap[sc->sc_bg]; in cgsix_clearscreen()
1616 fbc->fbc_arectx = ri->ri_width - 1; in cgsix_clearscreen()
1617 fbc->fbc_arecty = ri->ri_height - 1; in cgsix_clearscreen()
1619 ri->ri_flg &= ~RI_CURSOR; in cgsix_clearscreen()