Beispiel #1
0
#include <machine/xbox.h>

#define	VT_XBOX_WIDTH	640
#define	VT_XBOX_HEIGHT	480

static vd_init_t xboxfb_init;

static struct vt_driver xboxfb_driver = {
	.vd_init = xboxfb_init,
	.vd_blank = vt_fb_blank,
	.vd_bitbltchr = vt_fb_bitbltchr,
	.vd_priority = VD_PRIORITY_GENERIC,
};

static struct fb_info xboxfb_info;
VT_CONSDEV_DECLARE(xboxfb_driver, PIXEL_WIDTH(VT_XBOX_WIDTH),
    PIXEL_HEIGHT(VT_XBOX_HEIGHT), &xboxfb_info);

static int
xboxfb_init(struct vt_device *vd)
{
	struct fb_info *info;
	int i;

	if (!arch_i386_is_xbox)
		return (CN_DEAD);

	info = &xboxfb_info;
	/*
	 * We must make a mapping from video framebuffer memory
	 * to real. This is very crude:  we map the entire
Beispiel #2
0
#include <dev/vt/vt.h>
#include <dev/vt/hw/fb/vt_fb.h>
#include <dev/vt/colors/vt_termcolors.h>

static vd_init_t vt_efb_init;

static struct vt_driver vt_fb_early_driver = {
	.vd_init = vt_efb_init,
	.vd_blank = vt_fb_blank,
	.vd_bitbltchr = vt_fb_bitbltchr,
	.vd_priority = VD_PRIORITY_GENERIC,
};

static struct fb_info info;
VT_CONSDEV_DECLARE(vt_fb_early_driver,
    MAX(80, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)),
    MAX(25, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)), &info);

static void
#ifdef	FDT
vt_efb_initialize(struct fb_info *info, phandle_t node)
#else
vt_efb_initialize(struct fb_info *info)
#endif
{
#ifdef	FDT
	char name[64];
	cell_t retval;
	ihandle_t ih;
	int i;