Use rasops with 4bit depth.

This commit is contained in:
takemura 2001-01-21 14:00:32 +00:00
parent 0906d8d1fe
commit 9aa8ab9279
3 changed files with 40 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.hpcmips,v 1.43 2001/01/17 00:07:25 fvdl Exp $
# $NetBSD: files.hpcmips,v 1.44 2001/01/21 14:00:32 takemura Exp $
# maxpartitions must be first item in files.${ARCH}.
maxpartitions 8
@ -76,7 +76,7 @@ defopt PCKBD_LAYOUT
# Simple framebuffer interface for wsdisplay
define hpcfbif {}
device hpcfb: wsemuldisplaydev, rasops1, rasops2, rasops8, rasops15, rasops16
device hpcfb: wsemuldisplaydev, rasops1, rasops2, rasops4, rasops8, rasops15, rasops16
attach hpcfb at hpcfbif
file arch/hpcmips/dev/hpcfb.c hpcfb needs-flag

View File

@ -1,4 +1,4 @@
/* $NetBSD: bivideo.c,v 1.15 2001/01/21 09:11:29 takemura Exp $ */
/* $NetBSD: bivideo.c,v 1.16 2001/01/21 14:00:32 takemura Exp $ */
/*-
* Copyright (c) 1999
@ -37,7 +37,7 @@
static const char _copyright[] __attribute__ ((unused)) =
"Copyright (c) 1999 Shin Takemura. All rights reserved.";
static const char _rcsid[] __attribute__ ((unused)) =
"$Id: bivideo.c,v 1.15 2001/01/21 09:11:29 takemura Exp $";
"$Id: bivideo.c,v 1.16 2001/01/21 14:00:32 takemura Exp $";
#include <sys/param.h>
#include <sys/systm.h>
@ -243,6 +243,21 @@ bivideo_init(fb)
fb->hf_u.hf_gray.hf_flags = 0; /* reserved for future use */
break;
case BIFB_D4_M2L_F:
case BIFB_D4_M2L_Fx2:
fb->hf_access_flags |= HPCFB_ACCESS_REVERSE;
/* fall through */
case BIFB_D4_M2L_0:
case BIFB_D4_M2L_0x2:
fb->hf_class = HPCFB_CLASS_GRAYSCALE;
fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
fb->hf_pack_width = 8;
fb->hf_pixels_per_pack = 2;
fb->hf_pixel_width = 4;
fb->hf_class_data_length = sizeof(struct hf_gray_tag);
fb->hf_u.hf_gray.hf_flags = 0; /* reserved for future use */
break;
/*
* indexed color
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: mq200.c,v 1.6 2001/01/05 09:09:48 sato Exp $ */
/* $NetBSD: mq200.c,v 1.7 2001/01/21 14:00:32 takemura Exp $ */
/*-
* Copyright (c) 2000 Takemura Shin
@ -134,7 +134,11 @@ mq200_attach(sc)
printf("%s: WARNING: unable to establish hard power hook\n",
sc->sc_dev.dv_xname);
mq200_fbinit(&sc->sc_fbconf);
if (mq200_fbinit(&sc->sc_fbconf) != 0) {
/* just return so that hpcfb will not be attached */
return;
}
sc->sc_fbconf.hf_baseaddr = (u_long)bootinfo->fb_addr;
sc->sc_fbconf.hf_offset = (u_long)sc->sc_fbconf.hf_baseaddr -
MIPS_PHYS_TO_KSEG1(mips_ptob(mips_btop(sc->sc_baseaddr)));
@ -292,6 +296,21 @@ mq200_fbinit(fb)
fb->hf_u.hf_gray.hf_flags = 0; /* reserved for future use */
break;
case BIFB_D4_M2L_F:
case BIFB_D4_M2L_Fx2:
fb->hf_access_flags |= HPCFB_ACCESS_REVERSE;
/* fall through */
case BIFB_D4_M2L_0:
case BIFB_D4_M2L_0x2:
fb->hf_class = HPCFB_CLASS_GRAYSCALE;
fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
fb->hf_pack_width = 8;
fb->hf_pixels_per_pack = 2;
fb->hf_pixel_width = 4;
fb->hf_class_data_length = sizeof(struct hf_gray_tag);
fb->hf_u.hf_gray.hf_flags = 0; /* reserved for future use */
break;
/*
* indexed color
*/