Lines Matching defs:fb
174 if (strcmp("fb", ia->ia_modname) != 0)
314 topcat_reset(struct diofb *fb, int scode, struct diofbreg *fbr)
317 struct rasops_info *ri = &fb->ri;
322 if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0)
330 if (fb->planes == 0) {
334 fbp = (uint8_t *)fb->fbkva;
341 fb->planemask = *fbp;
344 for (fb->planes = 1; fb->planemask >= (1 << fb->planes);
345 fb->planes++);
346 if (fb->planes > 8)
347 fb->planes = 8;
348 fb->planemask = (1 << fb->planes) - 1;
373 if (fb->planes <= 4 && fb->dwidth == 1024 && fb->dheight == 400) {
374 fb->dwidth = 512;
378 fb->bmv = topcat_windowmove;
379 topcat_restore(fb);
380 diofb_fbsetup(fb);
383 fb->wsputchar = ri->ri_ops.putchar;
388 fb->wsd.fontwidth *= 2;
392 for (i = 0; i <= fb->planemask; i++)
393 topcat_setcolor(fb, i);
399 topcat_restore(struct diofb *fb)
401 volatile struct tcboxfb *tc = (struct tcboxfb *)fb->regkva;
421 tc->fben = fb->planemask;
422 tc->wen = fb->planemask;
423 tc->ren = fb->planemask;
427 tc->nblank = fb->planemask;
434 struct diofb *fb = v;
443 fb->mapmode = *(u_int *)data;
444 if (fb->mapmode == WSDISPLAYIO_MODE_EMUL) {
445 topcat_restore(fb);
446 for (i = 0; i <= fb->planemask; i++)
447 topcat_setcolor(fb, i);
452 wdf->width = fb->ri.ri_width;
453 wdf->height = fb->ri.ri_height;
454 wdf->depth = fb->ri.ri_depth;
455 wdf->cmsize = 1 << fb->planes;
458 *(u_int *)data = fb->ri.ri_stride;
461 if (fb->planemask == 1)
463 return diofb_getcmap(fb, (struct wsdisplay_cmap *)data);
465 if (fb->planemask == 1)
467 return topcat_setcmap(fb, (struct wsdisplay_cmap *)data);
477 topcat_setcolor(struct diofb *fb, u_int index)
479 volatile struct tcboxfb *tc = (struct tcboxfb *)fb->regkva;
482 if (fb->planemask == 1)
485 tc_waitbusy(tc, fb->planemask);
489 tc->plane_mask = fb->planemask;
491 tc->rdata = fb->cmap.r[index];
492 tc->gdata = fb->cmap.g[index];
493 tc->bdata = fb->cmap.b[index];
502 tc->plane_mask = fb->planemask;
503 tc->rdata = fb->cmap.r[index];
504 tc->gdata = fb->cmap.g[index];
505 tc->bdata = fb->cmap.b[index];
522 topcat_setcmap(struct diofb *fb, struct wsdisplay_cmap *cm)
526 u_int colcount = 1 << fb->planes;
539 memcpy(fb->cmap.r + index, r, count);
540 memcpy(fb->cmap.g + index, g, count);
541 memcpy(fb->cmap.b + index, b, count);
544 topcat_setcolor(fb, index++);
554 topcat_windowmove(struct diofb *fb, uint16_t sx, uint16_t sy,
558 volatile struct tcboxfb *tc = (struct tcboxfb *)fb->regkva;
560 tc_waitbusy(tc, fb->planemask);
565 tc->wen = fb->planemask;
576 tc->wmove = fb->planemask;
603 uint32_t fb;
652 fb = be32dec(fr);
657 uint16_t c = clr[(fb >> 31) & 1];
662 fb <<= 1;
691 struct diofb *fb = &diofb_cn;
728 topcat_reset(fb, conscode, (struct diofbreg *)conaddr);
733 diofb_cnattach(fb);