Subject: Re: 69030 Dual HiQVideo Support on MIPS arch
To: None <port-mips@netbsd.org>
From: Toru Nishimura <locore32@gaea.ocn.ne.jp>
List: port-mips
Date: 10/01/2003 22:26:50
Chris Gray asked;
> More particularly is there a general way to port sw which uses Linux
> /dev/fb to netbsd?
I start recognizing that there has been a large influx into MIPS from off-RISC
world :-)
I have little knowledge about Linux /dev/fb and the software you mentioned,
however, if your target software just wants to render bitmaps on bare framebuffer,
it's the answer to mmap framebuffer into application address space like as;
fd = open("/dev/ttyE0", 2);
ioctl(fd, WSDISPLAYIO_GTYPE, &rv);
/* To see the hardware is one you wants */
ioctl(fd, WSDISPLAYIO_GINFO, &fbi);
/* To determine framebuffer dimension */
rv = WSDISPLAYIO_MODE_MAPPED;
ioctl(ws, WSDISPLAYIO_SMODE, &rv);
/* To tell WSCONS mode switch will follow */
ptr = mmap(0, mapsize, PROT_READ|PROT_WRITE, MAP_PRIVATE, ws, mapoff);
/* mapsize and mapoff are target hardware dependent */
ptr would be the start address of linear framebuffer memory, or start address of display
controlling hardware registers if wscons driver layouts so. Beware, please. I have been
talking in linear framebuffer context and never in VGA/VEGA context.
Toru Nishimura/ALKYL Technology
I would like to point out the mmap scheme mentioned was the sun2/SunOS invention of
1980's, not by Linux.