Home | History | Annotate | Line # | Download | only in dev
ffbreg.h revision 1.2
      1 /*	$NetBSD: ffbreg.h,v 1.2 2004/05/20 01:50:43 heas Exp $	*/
      2 /*	$OpenBSD: creatorreg.h,v 1.5 2002/07/29 06:21:45 jason Exp $	*/
      3 
      4 /*
      5  * Copyright (c) 2002 Jason L. Wright (jason (at) thought.net)
      6  * All rights reserved.
      7  *
      8  * Redistribution and use in source and binary forms, with or without
      9  * modification, are permitted provided that the following conditions
     10  * are met:
     11  * 1. Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  * 2. Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in the
     15  *    documentation and/or other materials provided with the distribution.
     16  * 3. All advertising materials mentioning features or use of this software
     17  *    must display the following acknowledgement:
     18  *	This product includes software developed by Jason L. Wright
     19  * 4. The name of the author may not be used to endorse or promote products
     20  *    derived from this software without specific prior written permission.
     21  *
     22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     24  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     25  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
     26  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     27  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     30  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
     31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     32  * POSSIBILITY OF SUCH DAMAGE.
     33  */
     34 
     35 /* Number of register sets */
     36 #define	FFB_NREGS		24
     37 
     38 /* Register set numbers */
     39 #define	FFB_REG_PROM		0
     40 #define	FFB_REG_DAC		1
     41 #define	FFB_REG_FBC		2
     42 #define	FFB_REG_DFB8R		3
     43 #define	FFB_REG_DFB8G		4
     44 #define	FFB_REG_DFB8B		5
     45 #define	FFB_REG_DFB8X		6
     46 #define	FFB_REG_DFB24		7
     47 #define	FFB_REG_DFB32		8
     48 #define	FFB_REG_SFB8R		9
     49 #define	FFB_REG_SFB8G		10
     50 #define	FFB_REG_SFB8B		11
     51 #define	FFB_REG_SFB8X		12
     52 #define	FFB_REG_SFB32		13
     53 #define	FFB_REG_SFB64		14
     54 #define	FFB_REG_DFB422A		15
     55 
     56 #define	FFB_DAC_TYPE		0x0
     57 #define	FFB_DAC_VALUE		0x4
     58 #define	FFB_DAC_TYPE2		0x8
     59 #define	FFB_DAC_VALUE2		0xc
     60 
     61 #define	FFB_FBC_ALPHA		0x00c
     62 #define	FFB_FBC_RED		0x010
     63 #define	FFB_FBC_GREEN		0x014
     64 #define	FFB_FBC_BLUE		0x018
     65 #define	FFB_FBC_DEPTH		0x01c
     66 #define	FFB_FBC_Y		0x020
     67 #define	FFB_FBC_X		0x024
     68 #define	FFB_FBC_RYF		0x030
     69 #define	FFB_FBC_RXF		0x034
     70 #define	FFB_FBC_DMYF		0x040
     71 #define	FFB_FBC_DMXF		0x044
     72 #define	FFB_FBC_EBYI		0x050
     73 #define	FFB_FBC_EBXI		0x054
     74 #define	FFB_FBC_BY		0x060
     75 #define	FFB_FBC_BX		0x064
     76 #define	FFB_FBC_DY		0x068
     77 #define	FFB_FBC_DX		0x06c
     78 #define	FFB_FBC_BH		0x070
     79 #define	FFB_FBC_BW		0x074
     80 #define	FFB_FBC_SUVTX		0x100
     81 #define	FFB_FBC_PPC		0x200	/* pixel processor control */
     82 #define	FFB_FBC_WID		0x204
     83 #define	FFB_FBC_FG		0x208
     84 #define	FFB_FBC_BG		0x20c
     85 #define	FFB_FBC_CONSTY		0x210
     86 #define	FFB_FBC_CONSTZ		0x214
     87 #define	FFB_FBC_XCLIP		0x218
     88 #define	FFB_FBC_DCSS		0x21c
     89 #define	FFB_FBC_VCLIPMIN	0x220
     90 #define	FFB_FBC_VCLIPMAX	0x224
     91 #define	FFB_FBC_VCLIPZMIN	0x228
     92 #define	FFB_FBC_VCLIPZMAX	0x22c
     93 #define	FFB_FBC_DCSF		0x230
     94 #define	FFB_FBC_DCSB		0x234
     95 #define	FFB_FBC_DCZF		0x238
     96 #define	FFB_FBC_DCZB		0x23c
     97 #define	FFB_FBC_BLENDC		0x244
     98 #define	FFB_FBC_BLENDC1		0x248
     99 #define	FFB_FBC_BLENDC2		0x24c
    100 #define	FFB_FBC_FBRAMITC	0x250
    101 #define	FFB_FBC_FBC		0x254	/* Frame Buffer Control	*/
    102 #define	FFB_FBC_ROP		0x258	/* Raster OPeration */
    103 #define	FFB_FBC_CMP		0x25c	/* Frame Buffer Compare */
    104 #define	FFB_FBC_MATCHAB		0x260	/* Buffer AB Match Mask	*/
    105 #define	FFB_FBC_MATCHC		0x264
    106 #define	FFB_FBC_MAGNAB		0x268	/* Buffer AB Magnitude Mask */
    107 #define	FFB_FBC_MAGNC		0x26c
    108 #define	FFB_FBC_FBCFG0		0x270
    109 #define	FFB_FBC_FBCFG1		0x274
    110 #define	FFB_FBC_FBCFG2		0x278
    111 #define	FFB_FBC_FBCFG3		0x27c
    112 #define	FFB_FBC_PPCFG		0x280
    113 #define	FFB_FBC_PICK		0x284
    114 #define	FFB_FBC_FILLMODE	0x288
    115 #define	FFB_FBC_FBRAMWAC	0x28c
    116 #define	FFB_FBC_PMASK		0x290	/* RGB Plane Mask */
    117 #define	FFB_FBC_XPMASK		0x294	/* X PlaneMask */
    118 #define	FFB_FBC_YPMASK		0x298
    119 #define	FFB_FBC_ZPMASK		0x29c
    120 #define	FFB_FBC_CLIP0MIN	0x2a0
    121 #define	FFB_FBC_CLIP0MAX	0x2a4
    122 #define	FFB_FBC_CLIP1MIN	0x2a8
    123 #define	FFB_FBC_CLIP1MAX	0x2ac
    124 #define	FFB_FBC_CLIP2MIN	0x2b0
    125 #define	FFB_FBC_CLIP2MAX	0x2b4
    126 #define	FFB_FBC_CLIP3MIN	0x2b8
    127 #define	FFB_FBC_CLIP3MAX	0x2bc
    128 #define	FFB_FBC_RAWBLEND2	0x2c0
    129 #define	FFB_FBC_RAWPREBLEND	0x2c4
    130 #define	FFB_FBC_RAWSTENCIL	0x2c8
    131 #define	FFB_FBC_RAWSTENCILCTL	0x2cc
    132 #define	FFB_FBC_THREEDRAM1	0x2d0
    133 #define	FFB_FBC_THREEDRAM2	0x2d4
    134 #define	FFB_FBC_PASSIN		0x2d8
    135 #define	FFB_FBC_RAWCLRDEPTH	0x2dc
    136 #define	FFB_FBC_RAWPMASK	0x2e0
    137 #define	FFB_FBC_RAWCSRC		0x2e4
    138 #define	FFB_FBC_RAWMATCH	0x2e8
    139 #define	FFB_FBC_RAWMAGN		0x2ec
    140 #define	FFB_FBC_RAWROPBLEND	0x2f0
    141 #define	FFB_FBC_RAWCMP		0x2f4
    142 #define	FFB_FBC_RAWWAC		0x2f8
    143 #define	FFB_FBC_FBRAMID		0x2fc
    144 #define	FFB_FBC_DRAWOP		0x300	/* Draw OPeration */
    145 #define	FFB_FBC_FONTLPAT	0x30c
    146 #define	FFB_FBC_FONTXY		0x314
    147 #define	FFB_FBC_FONTW		0x318	/* Font Width */
    148 #define	FFB_FBC_FONTINC		0x31c	/* Font Increment */
    149 #define	FFB_FBC_FONT		0x320
    150 #define	FFB_FBC_BLEND2		0x330
    151 #define	FFB_FBC_PREBLEND	0x334
    152 #define	FFB_FBC_STENCIL		0x338
    153 #define	FFB_FBC_STENCILCTL	0x33c
    154 #define	FFB_FBC_DCSS1		0x350
    155 #define	FFB_FBC_DCSS2		0x354
    156 #define	FFB_FBC_DCSS3		0x358
    157 #define	FFB_FBC_WIDPMASK	0x35c
    158 #define	FFB_FBC_DCS2		0x360
    159 #define	FFB_FBC_DCS3		0x364
    160 #define	FFB_FBC_DCS4		0x368
    161 #define	FFB_FBC_DCD2		0x370
    162 #define	FFB_FBC_DCD3		0x374
    163 #define	FFB_FBC_DCD4		0x378
    164 #define	FFB_FBC_PATTERN		0x380
    165 #define	FFB_FBC_DEVID		0x800
    166 #define	FFB_FBC_UCSR		0x900	/* User Control & Status */
    167 #define	FFB_FBC_MER		0x980
    168 
    169 #define	FFB_FBC_WB_A		0x20000000
    170 #define	FFB_FBC_WM_COMBINED	0x00080000
    171 #define	FFB_FBC_RB_A		0x00004000
    172 #define	FFB_FBC_SB_BOTH		0x00003000
    173 #define	FFB_FBC_ZE_OFF		0x00000400
    174 #define	FFB_FBC_YE_OFF		0x00000100
    175 #define	FFB_FBC_XE_ON		0x00000080
    176 #define	FFB_FBC_XE_OFF		0x00000040
    177 #define	FFB_FBC_RGBE_ON		0x0000002a
    178 #define	FFB_FBC_RGBE_MASK	0x0000003f
    179 
    180 #define	FBC_PPC_FW_DIS		0x00800000	/* force wid disable */
    181 #define	FBC_PPC_FW_ENA		0x00c00000	/* force wid enable */
    182 #define	FBC_PPC_ACE_DIS		0x00040000	/* aux clip disable */
    183 #define	FBC_PPC_ACE_AUXSUB	0x00080000	/* aux clip add */
    184 #define	FBC_PPC_ACE_AUXADD	0x000c0000	/* aux clip subtract */
    185 #define	FBC_PPC_DCE_DIS		0x00020000	/* depth cue disable */
    186 #define	FBC_PPC_DCE_ENA		0x00020000	/* depth cue enable */
    187 #define	FBC_PPC_ABE_DIS		0x00008000	/* alpha blend disable */
    188 #define	FBC_PPC_ABE_ENA		0x0000c000	/* alpha blend enable */
    189 #define	FBC_PPC_VCE_DIS		0x00001000	/* view clip disable */
    190 #define	FBC_PPC_VCE_2D		0x00002000	/* view clip 2d */
    191 #define	FBC_PPC_VCE_3D		0x00003000	/* view clip 3d */
    192 #define	FBC_PPC_APE_DIS		0x00000800	/* area pattern disable */
    193 #define	FBC_PPC_APE_ENA		0x00000c00	/* area pattern enable */
    194 #define	FBC_PPC_TBE_OPAQUE	0x00000200	/* opaque background */
    195 #define	FBC_PPC_TBE_TRANSPAR	0x00000300	/* transparent background */
    196 #define	FBC_PPC_ZS_VAR		0x00000080	/* z source ??? */
    197 #define	FBC_PPC_ZS_CONST	0x000000c0	/* z source ??? */
    198 #define	FBC_PPC_YS_VAR		0x00000020	/* y source ??? */
    199 #define	FBC_PPC_YS_CONST	0x00000030	/* y source ??? */
    200 #define	FBC_PPC_XS_WID		0x00000004	/* x source ??? */
    201 #define	FBC_PPC_XS_VAR		0x00000008	/* x source ??? */
    202 #define	FBC_PPC_XS_CONST	0x0000000c	/* x source ??? */
    203 #define	FBC_PPC_CS_VAR		0x00000002	/* color source ??? */
    204 #define	FBC_PPC_CS_CONST	0x00000003	/* color source ??? */
    205 
    206 #define	FBC_ROP_NEW		0x83
    207 #define	FBC_ROP_OLD		0x85
    208 
    209 #define	FBC_UCSR_FIFO_MASK	0x00000fff
    210 #define	FBC_UCSR_FB_BUSY	0x01000000
    211 #define	FBC_UCSR_RP_BUSY	0x02000000
    212 #define	FBC_UCSR_READ_ERR	0x40000000
    213 #define	FBC_UCSR_FIFO_OVFL	0x80000000
    214 
    215 #define	FBC_DRAWOP_DOT		0x00
    216 #define	FBC_DRAWOP_AADOT	0x01
    217 #define	FBC_DRAWOP_BRLINECAP	0x02
    218 #define	FBC_DRAWOP_BRLINEOPEN	0x03
    219 #define	FBC_DRAWOP_DDLINE	0x04
    220 #define	FBC_DRAWOP_AALINE	0x05
    221 #define	FBC_DRAWOP_TRIANGLE	0x06
    222 #define	FBC_DRAWOP_POLYGON	0x07
    223 #define	FBC_DRAWOP_RECTANGLE	0x08
    224 #define	FBC_DRAWOP_FASTFILL	0x09
    225 #define	FBC_DRAWOP_BCOPY	0x0a	/* block copy: not implemented */
    226 #define	FBC_DRAWOP_VSCROLL	0x0b	/* vertical scroll */
    227