Lines Matching refs:fb

266 gbox_reset(struct diofb *fb, int scode, struct diofbreg *fbr)  in gbox_reset()  argument
272 fb->fbwidth = 1024; in gbox_reset()
273 fb->fbheight = 1024; in gbox_reset()
274 fb->dwidth = 1024; in gbox_reset()
275 fb->dheight = 768; in gbox_reset()
276 if ((rc = diofb_fbinquire(fb, scode, fbr)) != 0) in gbox_reset()
279 fb->bmv = gbox_windowmove; in gbox_reset()
280 gbox_restore(fb); in gbox_reset()
291 fbp = (uint8_t *)fb->fbkva; in gbox_reset()
294 fb->planemask = *fbp; in gbox_reset()
297 for (fb->planes = 1; fb->planemask >= (1 << fb->planes); in gbox_reset()
298 fb->planes++); in gbox_reset()
299 if (fb->planes > 8) in gbox_reset()
300 fb->planes = 8; in gbox_reset()
301 fb->planemask = (1 << fb->planes) - 1; in gbox_reset()
304 diofb_fbsetup(fb); in gbox_reset()
305 for (i = 0; i <= fb->planemask; i++) in gbox_reset()
306 gbox_setcolor(fb, i); in gbox_reset()
312 gbox_restore(struct diofb *fb) in gbox_restore() argument
314 volatile struct gboxfb *gb = (struct gboxfb *)fb->regkva; in gbox_restore()
343 struct diofb *fb = v; in gbox_ioctl() local
352 fb->mapmode = *(u_int *)data; in gbox_ioctl()
353 if (fb->mapmode == WSDISPLAYIO_MODE_EMUL) { in gbox_ioctl()
354 gbox_restore(fb); in gbox_ioctl()
355 for (i = 0; i <= fb->planemask; i++) in gbox_ioctl()
356 gbox_setcolor(fb, i); in gbox_ioctl()
361 wdf->width = fb->ri.ri_width; in gbox_ioctl()
362 wdf->height = fb->ri.ri_height; in gbox_ioctl()
363 wdf->depth = fb->ri.ri_depth; in gbox_ioctl()
364 wdf->cmsize = 1 << fb->planes; in gbox_ioctl()
367 *(u_int *)data = fb->ri.ri_stride; in gbox_ioctl()
370 return diofb_getcmap(fb, (struct wsdisplay_cmap *)data); in gbox_ioctl()
372 return gbox_setcmap(fb, (struct wsdisplay_cmap *)data); in gbox_ioctl()
382 gbox_setcolor(struct diofb *fb, u_int index) in gbox_setcolor() argument
384 volatile struct gboxfb *gb = (struct gboxfb *)fb->regkva; in gbox_setcolor()
387 gb->cmap_red = fb->cmap.r[index]; in gbox_setcolor()
388 gb->cmap_grn = fb->cmap.g[index]; in gbox_setcolor()
389 gb->cmap_blu = fb->cmap.b[index]; in gbox_setcolor()
395 gbox_setcmap(struct diofb *fb, struct wsdisplay_cmap *cm) in gbox_setcmap() argument
399 u_int colcount = 1 << fb->planes; in gbox_setcmap()
412 memcpy(fb->cmap.r + index, r, count); in gbox_setcmap()
413 memcpy(fb->cmap.g + index, g, count); in gbox_setcmap()
414 memcpy(fb->cmap.b + index, b, count); in gbox_setcmap()
417 gbox_setcolor(fb, index++); in gbox_setcmap()
423 gbox_windowmove(struct diofb *fb, uint16_t sx, uint16_t sy, in gbox_windowmove() argument
427 volatile struct gboxfb *gb = (struct gboxfb *)fb->regkva; in gbox_windowmove()
450 *(volatile uint8_t *)(fb->fbkva + dest) = in gbox_windowmove()
451 *(volatile uint8_t *)(fb->fbkva + src); in gbox_windowmove()
467 struct diofb *fb = &diofb_cn; in gboxcnattach() local
493 gbox_reset(fb, conscode, (struct diofbreg *)conaddr); in gboxcnattach()
498 diofb_cnattach(fb); in gboxcnattach()