diff options
Diffstat (limited to 'usr/src/uts/sun/sys')
-rw-r--r-- | usr/src/uts/sun/sys/Makefile | 9 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/cg3var.h | 74 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/cg6fbc.h | 519 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/cg6reg.h | 148 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/cg6tec.h | 742 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/cg6thc.h | 334 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/cg6var.h | 167 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/memvar.h | 191 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/pr_impl_util.h | 224 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/pr_planegroups.h | 81 | ||||
-rw-r--r-- | usr/src/uts/sun/sys/ramdac.h | 94 |
11 files changed, 2 insertions, 2581 deletions
diff --git a/usr/src/uts/sun/sys/Makefile b/usr/src/uts/sun/sys/Makefile index 6b25f3c934..941abb0d76 100644 --- a/usr/src/uts/sun/sys/Makefile +++ b/usr/src/uts/sun/sys/Makefile @@ -30,16 +30,11 @@ HDRS= \ avintr.h \ bootconf.h bpp_reg.h \ bpp_var.h \ -cg3var.h \ -cg6fbc.h cg6reg.h cg6tec.h \ -cg6thc.h cg6var.h \ dkmpio.h dmaga.h \ fdreg.h fdvar.h \ -memvar.h \ -obpdefs.h pixrect.h \ -pr_impl_util.h pr_planegroups.h \ +obpdefs.h \ promif.h promimpl.h \ -ramdac.h ser_async.h ser_zscc.h \ +ser_async.h ser_zscc.h \ socalio.h socalreg.h \ socal_cq_defs.h socalmap.h socalvar.h \ stp4020_reg.h stp4020_var.h \ diff --git a/usr/src/uts/sun/sys/cg3var.h b/usr/src/uts/sun/sys/cg3var.h deleted file mode 100644 index 16b4fde797..0000000000 --- a/usr/src/uts/sun/sys/cg3var.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 by Sun Microsystems, Inc. - */ - -#ifndef _SYS_CG3VAR_H -#define _SYS_CG3VAR_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * cg3 -- color memory frame buffer - */ - -/* - * On architectures where cg4s have been implemented we need a nice big - * mmap offset to avoid the cg4 compatible simulated overlay/enable planes. - */ -#define CG3_MMAP_OFFSET 0x04000000 /* 8K x 8K */ - -/* - * In the kernel we just use a memory pixrect so we don't - * need any of this stuff. - */ -#ifndef _KERNEL -#include <sys/memvar.h> - -/* pixrect private data */ -struct cg3_data { - struct mprp_data mprp; /* memory pixrect simulator */ - int fd; /* file descriptor */ -}; - -#define cg3_d(pr) ((struct cg3_data *) (pr)->pr_data) - -/* pixrect ops vector */ -extern struct pixrectops cg3_ops; - -Pixrect *cg3_make(); -int cg3_destroy(); -Pixrect *cg3_region(); -int cg3_putcolormap(); -int cg3_getcolormap(); -#endif /* !_KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_CG3VAR_H */ diff --git a/usr/src/uts/sun/sys/cg6fbc.h b/usr/src/uts/sun/sys/cg6fbc.h deleted file mode 100644 index 604589cc07..0000000000 --- a/usr/src/uts/sun/sys/cg6fbc.h +++ /dev/null @@ -1,519 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988-1989, Sun Microsystems, Inc. - */ - -#ifndef _SYS_CG6FBC_H -#define _SYS_CG6FBC_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * CG6 register definitions, common to all environments. - */ - -/* - * FBC MISC register bits - */ -typedef enum { - L_FBC_MISC_BLIT_IGNORE, L_FBC_MISC_BLIT_NOSRC, L_FBC_MISC_BLIT_SRC, - L_FBC_MISC_BLIT_ILLEGAL -} l_fbc_misc_blit_t; - -typedef enum { - L_FBC_MISC_DATA_IGNORE, L_FBC_MISC_DATA_COLOR8, L_FBC_MISC_DATA_COLOR1, - L_FBC_MISC_DATA_HRMONO -} l_fbc_misc_data_t; - -typedef enum { - L_FBC_MISC_DRAW_IGNORE, L_FBC_MISC_DRAW_RENDER, L_FBC_MISC_DRAW_PICK, - L_FBC_MISC_DRAW_ILLEGAL -} l_fbc_misc_draw_t; - -typedef enum { - L_FBC_MISC_BWRITE0_IGNORE, L_FBC_MISC_BWRITE0_ENABLE, - L_FBC_MISC_BWRITE0_DISABLE, L_FBC_MISC_BWRITE0_ILLEGAL -} l_fbc_misc_bwrite0_t; - -typedef enum { - L_FBC_MISC_BWRITE1_IGNORE, L_FBC_MISC_BWRITE1_ENABLE, - L_FBC_MISC_BWRITE1_DISABLE, L_FBC_MISC_BWRITE1_ILLEGAL -} l_fbc_misc_bwrite1_t; - -typedef enum { - L_FBC_MISC_BREAD_IGNORE, L_FBC_MISC_BREAD_0, L_FBC_MISC_BREAD_1, - L_FBC_MISC_BREAD_ILLEGAL -} l_fbc_misc_bread_t; - -typedef enum { - L_FBC_MISC_BDISP_IGNORE, L_FBC_MISC_BDISP_0, L_FBC_MISC_BDISP_1, - L_FBC_MISC_BDISP_ILLEGAL -} l_fbc_misc_bdisp_t; - -struct l_fbc_misc { - uint32_t : 10; /* not used */ - l_fbc_misc_blit_t l_fbc_misc_blit : 2; /* blit src check */ - uint32_t l_fbc_misc_vblank : 1; /* 1 == VBLANK has occured */ - l_fbc_misc_data_t l_fbc_misc_data : 2; /* Color mode select */ - l_fbc_misc_draw_t l_fbc_misc_draw : 2; /* Render/Pick mode */ - l_fbc_misc_bwrite0_t l_fbc_misc_bwrite0 : 2; /* buffer 0 write */ - l_fbc_misc_bwrite1_t l_fbc_misc_bwrite1 : 2; /* buffer 1 write */ - l_fbc_misc_bread_t l_fbc_misc_bread : 2; /* read enable */ - l_fbc_misc_bdisp_t l_fbc_misc_bdisp : 2; /* display enable */ - uint32_t l_fbc_misc_index_mod : 1; /* modify index */ - uint32_t l_fbc_misc_index : 2; /* index */ - uint32_t : 4; /* not used */ -}; - -/* - * FBC RASTEROP register bits - */ -typedef enum { - L_FBC_RASTEROP_PLANE_IGNORE, L_FBC_RASTEROP_PLANE_ZEROES, - L_FBC_RASTEROP_PLANE_ONES, L_FBC_RASTEROP_PLANE_MASK -} l_fbc_rasterop_plane_t; - -typedef enum { - L_FBC_RASTEROP_PIXEL_IGNORE, L_FBC_RASTEROP_PIXEL_ZEROES, - L_FBC_RASTEROP_PIXEL_ONES, L_FBC_RASTEROP_PIXEL_MASK -} l_fbc_rasterop_pixel_t; - -typedef enum { - L_FBC_RASTEROP_PATTERN_IGNORE, L_FBC_RASTEROP_PATTERN_ZEROES, - L_FBC_RASTEROP_PATTERN_ONES, L_FBC_RASTEROP_PATTERN_MASK -} l_fbc_rasterop_patt_t; - -typedef enum { - L_FBC_RASTEROP_POLYG_IGNORE, L_FBC_RASTEROP_POLYG_OVERLAP, - L_FBC_RASTEROP_POLYG_NONOVERLAP, L_FBC_RASTEROP_POLYG_ILLEGAL -} l_fbc_rasterop_polyg_t; - -typedef enum { - L_FBC_RASTEROP_ATTR_IGNORE, L_FBC_RASTEROP_ATTR_UNSUPP, - L_FBC_RASTEROP_ATTR_SUPP, L_FBC_RASTEROP_ATTR_ILLEGAL -} l_fbc_rasterop_attr_t; - -typedef enum { - L_FBC_RASTEROP_RAST_BOOL, L_FBC_RASTEROP_RAST_LINEAR -} l_fbc_rasterop_rast_t; - -typedef enum { - L_FBC_RASTEROP_PLOT_PLOT, L_FBC_RASTEROP_PLOT_UNPLOT -} l_fbc_rasterop_plot_t; - -struct l_fbc_rasterop { - l_fbc_rasterop_plane_t l_fbc_rasterop_plane : 2; /* plane mask */ - l_fbc_rasterop_pixel_t l_fbc_rasterop_pixel : 2; /* pixel mask */ - l_fbc_rasterop_patt_t l_fbc_rasterop_patt : 2; /* pattern mask */ - l_fbc_rasterop_polyg_t l_fbc_rasterop_polyg : 2; /* polygon draw */ - l_fbc_rasterop_attr_t l_fbc_rasterop_attr : 2; /* attribute select */ - uint32_t : 4; /* not used */ - l_fbc_rasterop_rast_t l_fbc_rasterop_rast : 1; /* rasterop mode */ - l_fbc_rasterop_plot_t l_fbc_rasterop_plot : 1; /* plot/unplot mode */ - uint32_t l_fbc_rasterop_rop11: 4; /* rasterop for f==1, b==1 */ - uint32_t l_fbc_rasterop_rop10: 4; /* rasterop for f==1, b==0 */ - uint32_t l_fbc_rasterop_rop01: 4; /* rasterop for f==0, b==1 */ - uint32_t l_fbc_rasterop_rop00: 4; /* rasterop for f==0, b==0 */ -}; - -/* - * FBC PATTALIGN register bits - */ -union l_fbc_pattalign { - uint32_t word; - uint16_t l_fbc_pattalign_array[2]; -#define l_fbc_pattalign_alignx l_fbc_pattalign_array[0] -#define l_fbc_pattalign_aligny l_fbc_pattalign_array[1] -}; - -/* - * FBC offsets & structure definition - */ -struct fbc { - -/* miscellaneous & clipcheck registers */ - - uint8_t fil0[ 0x4 ]; - - struct l_fbc_misc l_fbc_misc; - uint32_t l_fbc_clipcheck; - -#define L_FBC_MISC (0x004 / sizeof (uint32_t)) -#define L_FBC_CLIPCHECK (0x008 / sizeof (uint32_t)) - - uint8_t fill00[ 0x10 - 0x08 - 4 ]; - - uint32_t l_fbc_status; - uint32_t l_fbc_drawstatus; - uint32_t l_fbc_blitstatus; - uint32_t l_fbc_font; - -/* status and command registers */ -#define L_FBC_STATUS (0x010 / sizeof (uint32_t)) -#define L_FBC_DRAWSTATUS (0x014 / sizeof (uint32_t)) -#define L_FBC_BLITSTATUS (0x018 / sizeof (uint32_t)) -#define L_FBC_FONT (0x01C / sizeof (uint32_t)) - - uint8_t fill01[ 0x80 - 0x1C - 4 ]; - - uint32_t l_fbc_x0; - uint32_t l_fbc_y0; - uint32_t l_fbc_z0; - uint32_t l_fbc_color0; - uint32_t l_fbc_x1; - uint32_t l_fbc_y1; - uint32_t l_fbc_z1; - uint32_t l_fbc_color1; - uint32_t l_fbc_x2; - uint32_t l_fbc_y2; - uint32_t l_fbc_z2; - uint32_t l_fbc_color2; - uint32_t l_fbc_x3; - uint32_t l_fbc_y3; - uint32_t l_fbc_z3; - uint32_t l_fbc_color3; - -/* address registers */ -/* writing a z-register just sets the corresponding z clip status bits */ -#define L_FBC_X0 (0x080 / sizeof (uint32_t)) -#define L_FBC_Y0 (0x084 / sizeof (uint32_t)) -#define L_FBC_Z0 (0x088 / sizeof (uint32_t)) -#define L_FBC_COLOR0 (0x08C / sizeof (uint32_t)) -#define L_FBC_X1 (0x090 / sizeof (uint32_t)) -#define L_FBC_Y1 (0x094 / sizeof (uint32_t)) -#define L_FBC_Z1 (0x098 / sizeof (uint32_t)) -#define L_FBC_COLOR1 (0x09C / sizeof (uint32_t)) -#define L_FBC_X2 (0x0A0 / sizeof (uint32_t)) -#define L_FBC_Y2 (0x0A4 / sizeof (uint32_t)) -#define L_FBC_Z2 (0x0A8 / sizeof (uint32_t)) -#define L_FBC_COLOR2 (0x0AC / sizeof (uint32_t)) -#define L_FBC_X3 (0x0B0 / sizeof (uint32_t)) -#define L_FBC_Y3 (0x0B4 / sizeof (uint32_t)) -#define L_FBC_Z3 (0x0B8 / sizeof (uint32_t)) -#define L_FBC_COLOR3 (0x0BC / sizeof (uint32_t)) - -/* raster offset registers */ - - uint32_t l_fbc_rasteroffx; - uint32_t l_fbc_rasteroffy; - -#define L_FBC_RASTEROFFX (0x0C0 / sizeof (uint32_t)) -#define L_FBC_RASTEROFFY (0x0C4 / sizeof (uint32_t)) - - uint8_t fill02[ 0xD0 - 0xC4 - 4 ]; - - uint32_t l_fbc_autoincx; - uint32_t l_fbc_autoincy; - -/* autoincrement registers */ -#define L_FBC_AUTOINCX (0x0D0 / sizeof (uint32_t)) -#define L_FBC_AUTOINCY (0x0D4 / sizeof (uint32_t)) - - -/* window registers */ - - uint8_t fill03[ 0xE0 - 0xD4 - 4 ]; - - uint32_t l_fbc_clipminx; - uint32_t l_fbc_clipminy; - -#define L_FBC_CLIPMINX (0x0E0 / sizeof (uint32_t)) -#define L_FBC_CLIPMINY (0x0E4 / sizeof (uint32_t)) - - uint8_t fill04[ 0xF0 - 0xE4 - 4 ]; - - uint32_t l_fbc_clipmaxx; - uint32_t l_fbc_clipmaxy; - -#define L_FBC_CLIPMAXX (0x0F0 / sizeof (uint32_t)) -#define L_FBC_CLIPMAXY (0x0F4 / sizeof (uint32_t)) - - uint8_t fill05[ 0x100 - 0x0F4 - 4 ]; - - uint32_t l_fbc_fcolor; - uint32_t l_fbc_bcolor; - struct l_fbc_rasterop l_fbc_rasterop; - uint32_t l_fbc_planemask; - uint32_t l_fbc_pixelmask; - -/* attribute registers */ -#define L_FBC_FCOLOR (0x100 / sizeof (uint32_t)) -#define L_FBC_BCOLOR (0x104 / sizeof (uint32_t)) -#define L_FBC_RASTEROP (0x108 / sizeof (uint32_t)) -#define L_FBC_PLANEMASK (0x10C / sizeof (uint32_t)) -#define L_FBC_PIXELMASK (0x110 / sizeof (uint32_t)) - - uint8_t fill06[ 0x11C - 0x110 - 4 ]; - - union l_fbc_pattalign l_fbc_pattalign; - -#define L_FBC_PATTALIGN (0x11C / sizeof (uint32_t)) - - uint32_t l_fbc_pattern0; - uint32_t l_fbc_pattern1; - uint32_t l_fbc_pattern2; - uint32_t l_fbc_pattern3; - uint32_t l_fbc_pattern4; - uint32_t l_fbc_pattern5; - uint32_t l_fbc_pattern6; - uint32_t l_fbc_pattern7; - -#define L_FBC_PATTERN0 (0x120 / sizeof (uint32_t)) -#define L_FBC_PATTERN1 (0x124 / sizeof (uint32_t)) -#define L_FBC_PATTERN2 (0x128 / sizeof (uint32_t)) -#define L_FBC_PATTERN3 (0x12C / sizeof (uint32_t)) -#define L_FBC_PATTERN4 (0x130 / sizeof (uint32_t)) -#define L_FBC_PATTERN5 (0x134 / sizeof (uint32_t)) -#define L_FBC_PATTERN6 (0x138 / sizeof (uint32_t)) -#define L_FBC_PATTERN7 (0x13C / sizeof (uint32_t)) - -/* indexed address registers */ - - uint8_t fill07[ 0x800 - 0x13C - 4 ]; - - uint32_t l_fbc_ipointabsx; - uint32_t l_fbc_ipointabsy; - uint32_t l_fbc_ipointabsz; - -#define L_FBC_IPOINTABSX (0x800 / sizeof (uint32_t)) -#define L_FBC_IPOINTABSY (0x804 / sizeof (uint32_t)) -#define L_FBC_IPOINTABSZ (0x808 / sizeof (uint32_t)) - - uint8_t fill08[ 0x810 - 0x808 - 4 ]; - - uint32_t l_fbc_ipointrelx; - uint32_t l_fbc_ipointrely; - uint32_t l_fbc_ipointrelz; - -#define L_FBC_IPOINTRELX (0x810 / sizeof (uint32_t)) -#define L_FBC_IPOINTRELY (0x814 / sizeof (uint32_t)) -#define L_FBC_IPOINTRELZ (0x818 / sizeof (uint32_t)) - - uint8_t fill09[ 0x830 - 0x818 - 4 ]; - - uint32_t l_fbc_ipointcolr; - uint32_t l_fbc_ipointcolg; - uint32_t l_fbc_ipointcolb; - uint32_t l_fbc_ipointcola; - uint32_t l_fbc_ilineabsx; - uint32_t l_fbc_ilineabsy; - uint32_t l_fbc_ilineabsz; - -#define L_FBC_IPOINTCOLR (0x830 / sizeof (uint32_t)) -#define L_FBC_IPOINTCOLG (0x834 / sizeof (uint32_t)) -#define L_FBC_IPOINTCOLB (0x838 / sizeof (uint32_t)) -#define L_FBC_IPOINTCOLA (0x83C / sizeof (uint32_t)) -#define L_FBC_ILINEABSX (0x840 / sizeof (uint32_t)) -#define L_FBC_ILINEABSY (0x844 / sizeof (uint32_t)) -#define L_FBC_ILINEABSZ (0x848 / sizeof (uint32_t)) - - uint8_t fill10[ 0x850 - 0x848 - 4 ]; - - uint32_t l_fbc_ilinerelx; - uint32_t l_fbc_ilinerely; - uint32_t l_fbc_ilinerelz; - -#define L_FBC_ILINERELX (0x850 / sizeof (uint32_t)) -#define L_FBC_ILINERELY (0x854 / sizeof (uint32_t)) -#define L_FBC_ILINERELZ (0x858 / sizeof (uint32_t)) - - uint8_t fill11[ 0x870 - 0x858 - 4 ]; - - uint32_t l_fbc_ilinecolr; - uint32_t l_fbc_ilinecolg; - uint32_t l_fbc_ilinecolb; - uint32_t l_fbc_ilinecola; - -#define L_FBC_ILINECOLR (0x870 / sizeof (uint32_t)) -#define L_FBC_ILINECOLG (0x874 / sizeof (uint32_t)) -#define L_FBC_ILINECOLB (0x878 / sizeof (uint32_t)) -#define L_FBC_ILINECOLA (0x87C / sizeof (uint32_t)) - - uint32_t l_fbc_itriabsx; - uint32_t l_fbc_itriabsy; - uint32_t l_fbc_itriabsz; - -#define L_FBC_ITRIABSX (0x880 / sizeof (uint32_t)) -#define L_FBC_ITRIABSY (0x884 / sizeof (uint32_t)) -#define L_FBC_ITRIABSZ (0x888 / sizeof (uint32_t)) - - uint8_t fill12[ 0x890 - 0x888 - 4 ]; - - uint32_t l_fbc_itrirelx; - uint32_t l_fbc_itrirely; - uint32_t l_fbc_itrirelz; - -#define L_FBC_ITRIRELX (0x890 / sizeof (uint32_t)) -#define L_FBC_ITRIRELY (0x894 / sizeof (uint32_t)) -#define L_FBC_ITRIRELZ (0x898 / sizeof (uint32_t)) - - uint8_t fill13[ 0x8B0 - 0x898 - 4 ]; - - uint32_t l_fbc_itricolr; - uint32_t l_fbc_itricolg; - uint32_t l_fbc_itricolb; - uint32_t l_fbc_itricola; - uint32_t l_fbc_iquadabsx; - uint32_t l_fbc_iquadabsy; - uint32_t l_fbc_iquadabsz; - -#define L_FBC_ITRICOLR (0x8B0 / sizeof (uint32_t)) -#define L_FBC_ITRICOLG (0x8B4 / sizeof (uint32_t)) -#define L_FBC_ITRICOLB (0x8B8 / sizeof (uint32_t)) -#define L_FBC_ITRICOLA (0x8BC / sizeof (uint32_t)) -#define L_FBC_IQUADABSX (0x8C0 / sizeof (uint32_t)) -#define L_FBC_IQUADABSY (0x8C4 / sizeof (uint32_t)) -#define L_FBC_IQUADABSZ (0x8C8 / sizeof (uint32_t)) - - uint8_t fill14[ 0x8D0 - 0x8C8 - 4 ]; - - uint32_t l_fbc_iquadrelx; - uint32_t l_fbc_iquadrely; - uint32_t l_fbc_iquadrelz; - -#define L_FBC_IQUADRELX (0x8D0 / sizeof (uint32_t)) -#define L_FBC_IQUADRELY (0x8D4 / sizeof (uint32_t)) -#define L_FBC_IQUADRELZ (0x8D8 / sizeof (uint32_t)) - - uint8_t fill15[ 0x8F0 - 0x8D8 - 4 ]; - - uint32_t l_fbc_iquadcolr; - uint32_t l_fbc_iquadcolg; - uint32_t l_fbc_iquadcolb; - uint32_t l_fbc_iquadcola; - uint32_t l_fbc_irectabsx; - uint32_t l_fbc_irectabsy; - uint32_t l_fbc_irectabsz; - -#define L_FBC_IQUADCOLR (0x8F0 / sizeof (uint32_t)) -#define L_FBC_IQUADCOLG (0x8F4 / sizeof (uint32_t)) -#define L_FBC_IQUADCOLB (0x8F8 / sizeof (uint32_t)) -#define L_FBC_IQUADCOLA (0x8FC / sizeof (uint32_t)) -#define L_FBC_IRECTABSX (0x900 / sizeof (uint32_t)) -#define L_FBC_IRECTABSY (0x904 / sizeof (uint32_t)) -#define L_FBC_IRECTABSZ (0x908 / sizeof (uint32_t)) - - uint8_t fill17[ 0x910 - 0x908 - 4 ]; - - uint32_t l_fbc_irectrelx; - uint32_t l_fbc_irectrely; - uint32_t l_fbc_irectrelz; - -#define L_FBC_IRECTRELX (0x910 / sizeof (uint32_t)) -#define L_FBC_IRECTRELY (0x914 / sizeof (uint32_t)) -#define L_FBC_IRECTRELZ (0x918 / sizeof (uint32_t)) - - uint8_t fill18[ 0x930 - 0x918 - 4 ]; - - uint32_t l_fbc_irectcolr; - uint32_t l_fbc_irectcolg; - uint32_t l_fbc_irectcolb; - uint32_t l_fbc_irectcola; - -#define L_FBC_IRECTCOLR (0x930 / sizeof (uint32_t)) -#define L_FBC_IRECTCOLG (0x934 / sizeof (uint32_t)) -#define L_FBC_IRECTCOLB (0x938 / sizeof (uint32_t)) -#define L_FBC_IRECTCOLA (0x93C / sizeof (uint32_t)) - -}; - -/* - * FBC CLIPCHECK register bits. - */ -#define CLIP_MASK 0x3 -#define CLIP_IN 0x0 -#define CLIP_LT 0x1 -#define CLIP_GT 0x2 -#define CLIP_BACK 0x3 - -#define CLIP_X(bits, reg_num) ((bits) << (0+(2*(reg_num)))) -#define CLIP_Y(bits, reg_num) ((bits) << (8+(2*(reg_num)))) -#define CLIP_Z(bits, reg_num) ((bits) << (16+(2*(reg_num)))) - -/* - * FBC STATUS, DRAWSTATUS, and BLITSTATUS register bits. - */ -#define L_FBC_ACC_CLEAR 0x80000000 /* when writing STATUS */ -#define L_FBC_DRAW_EXCEPTION 0x80000000 /* when reading DRAWSTATUS */ -#define L_FBC_BLIT_EXCEPTION 0x80000000 /* when reading BLITSTATUS */ -#define L_FBC_TEC_EXCEPTION 0x40000000 -#define L_FBC_FULL 0x20000000 -#define L_FBC_BUSY 0x10000000 -#define L_FBC_UNSUPPORTED_ATTR 0x02000000 -#define L_FBC_HRMONO 0x01000000 -#define L_FBC_ACC_OVERFLOW 0x00200000 -#define L_FBC_ACC_PICK 0x00100000 -#define L_FBC_TEC_HIDDEN 0x00040000 -#define L_FBC_TEC_INTERSECT 0x00020000 -#define L_FBC_TEC_VISIBLE 0x00010000 -#define L_FBC_BLIT_HARDWARE 0x00008000 -#define L_FBC_BLIT_SOFTWARE 0x00004000 -#define L_FBC_BLIT_SRC_HID 0x00002000 -#define L_FBC_BLIT_SRC_INT 0x00001000 -#define L_FBC_BLIT_SRC_VIS 0x00000800 -#define L_FBC_BLIT_DST_HID 0x00000400 -#define L_FBC_BLIT_DST_INT 0x00000200 -#define L_FBC_BLIT_DST_VIS 0x00000100 -#define L_FBC_DRAW_HARDWARE 0x00000010 -#define L_FBC_DRAW_SOFTWARE 0x00000008 -#define L_FBC_DRAW_HIDDEN 0x00000004 -#define L_FBC_DRAW_INTERSECT 0x00000002 -#define L_FBC_DRAW_VISIBLE 0x00000001 - -/* - * FBC/FHC CONFIG register - */ -#define FHC_CONFIG_FBID_SHIFT 24 -#define FHC_CONFIG_FBID_MASK 255 -#define FHC_CONFIG_REV_SHIFT 20 -#define FHC_CONFIG_REV_MASK 15 -#define FHC_CONFIG_FROP_DISABLE (1 << 19) -#define FHC_CONFIG_ROW_DISABLE (1 << 18) -#define FHC_CONFIG_SRC_DISABLE (1 << 17) -#define FHC_CONFIG_DST_DISABLE (1 << 16) -#define FHC_CONFIG_RESET (1 << 15) -#define FHC_CONFIG_LITTLE_ENDIAN (1 << 13) -#define FHC_CONFIG_RES_MASK (3 << 11) -#define FHC_CONFIG_1024 (0 << 11) -#define FHC_CONFIG_1152 (1 << 11) -#define FHC_CONFIG_1280 (2 << 11) -#define FHC_CONFIG_1600 (3 << 11) -#define FHC_CONFIG_CPU_MASK (3 << 9) -#define FHC_CONFIG_CPU_SPARC (0 << 9) -#define FHC_CONFIG_CPU_68020 (1 << 9) -#define FHC_CONFIG_CPU_386 (2 << 9) -#define FHC_CONFIG_TEST (1 << 8) -#define FHC_CONFIG_TESTX_SHIFT 4 -#define FHC_CONFIG_TESTX_MASK (15 << 4) -#define FHC_CONFIG_TESTY_SHIFT 0 -#define FHC_CONFIG_TESTY_MASK 15 - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_CG6FBC_H */ diff --git a/usr/src/uts/sun/sys/cg6reg.h b/usr/src/uts/sun/sys/cg6reg.h deleted file mode 100644 index 2e1321b256..0000000000 --- a/usr/src/uts/sun/sys/cg6reg.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1988-1989,1997-1998 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _SYS_CG6REG_H -#define _SYS_CG6REG_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * CG6 frame buffer hardware definitions. - */ - - -/* Physical frame buffer and color map addresses */ -/* - * The base address is defined in the configuration file, e.g. GENERIC. - * These constants are the offset from that address. - */ - -#define CG6_P4BASE 0xFB000000L - -#define CG6_ADDR_ROM_SBUS 0L -#define CG6_ADDR_ROM_P4 0x380000L - - -#define CG6_ADDR_CMAP 0x200000L -#define CG6_ADDR_DHC 0x240000L -#define CG6_ADDR_ALT 0x280000L -#define CG6_ADDR_FBC 0x700000L -#define CG6_ADDR_TEC 0x701000L -#define CG6_ADDR_P4REG 0x300000L -#define CG6_ADDR_OVERLAY 0x400000L /* FAKE */ -#define CG6_ADDR_FHC 0x300000L -#define CG6_ADDR_THC 0x301000L -#define CG6_ADDR_ENABLE 0x600000L -#define CG6_ADDR_COLOR 0x800000L - -#define CG6_ADDR_FBCTEC CG6_ADDR_FBC -#define CG6_ADDR_FHCTHC CG6_ADDR_FHC - -#define CG6_CMAP_SZ 8192 -#define CG6_FBCTEC_SZ 8192 -#define CG6_FHCTHC_SZ 8192 -#define CG6_ROM_SZ (64*1024) -#define CG6_FB_SZ (1024*1024) -#define CG6_DHC_SZ 8192 -#define CG6_ALT_SZ 8192 - -/* - * Offsets of TEC/FHC into page - */ -#define CG6_TEC_POFF 0x1000 -#define CG6_THC_POFF 0x1000 - -/* - * Virtual (mmap offsets) addresses - */ -#define CG6_VBASE 0x70000000L /* nobody knows where */ - /* this comes from */ -#define CG6_VADDR(x) (CG6_VBASE + (x) * 8192) - -/* - * CG6 Virtual object addresses - */ -#define CG6_VADDR_FBC CG6_VADDR(0) -#define CG6_VADDR_TEC (CG6_VADDR_FBC + CG6_TEC_POFF) -#define CG6_VADDR_CMAP CG6_VADDR(1) -#define CG6_VADDR_FHC CG6_VADDR(2) -#define CG6_VADDR_THC (CG6_VADDR_FHC + CG6_THC_POFF) -#define CG6_VADDR_ROM CG6_VADDR(3) -#define CG6_VADDR_COLOR (CG6_VADDR_ROM + CG6_ROM_SZ) - /* KLUDGE: BIG gap here, to accomodate potential future framebuffers */ -#define CG6_VADDR_DHC CG6_VADDR(16384) -#define CG6_VADDR_ALT CG6_VADDR(16385) -#define CG6_VADDR_UART CG6_VADDR(16386) -#define CG6_VADDR_VRT CG6_VADDR(16387) /* vertical retrace page */ - -#define CG6_VADDR_FBCTEC CG6_VADDR_FBC -#define CG6_VADDR_FHCTHC CG6_VADDR_FHC -/* - * to map in all of lego, use mmapsize below, and offset CG6_VBASE - */ -#define MMAPSIZE(dfbsize) (CG6_VADDR_COLOR-CG6_VBASE+dfbsize) - -/* - * convert from address returned by pr_makefromfd (eg. mmap) - * to CG6 register set. - */ -#define CG6VA_TO_FBC(base) \ - ((struct fbc *)(((char *)base)+(CG6_VADDR_FBC-CG6_VBASE))) -#define CG6VA_TO_TEC(base) \ - ((struct tec *)(((char *)base)+(CG6_VADDR_TEC-CG6_VBASE))) -#define CG6VA_TO_FHC(base) \ - ((uint_t *)(((char *)base)+(CG6_VADDR_FHC-CG6_VBASE))) -#define CG6VA_TO_THC(base) \ - ((struct thc *)(((char *)base)+(CG6_VADDR_THC-CG6_VBASE))) -#define CG6VA_TO_DFB(base) \ - ((short *)(((char *)base)+(CG6_VADDR_COLOR-CG6_VBASE))) -#define CG6VA_TO_ROM(base) \ - ((uint_t *)(((char *)base)+(CG6_VADDR_ROM-CG6_VBASE))) -#define CG6VA_TO_CMAP(base) \ - ((struct cg6_cmap *)(((char *)base)+(CG6_VADDR_CMAP-CG6_VBASE))) - - -/* (Brooktree DAC) definitions */ - -/* number of colormap entries */ -#define CG6_CMAP_ENTRIES 256 - -struct cg6_cmap { - uint32_t addr; /* address register */ - uint32_t cmap; /* color map data register */ - uint32_t ctrl; /* control register */ - uint32_t omap; /* overlay map data register */ -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_CG6REG_H */ diff --git a/usr/src/uts/sun/sys/cg6tec.h b/usr/src/uts/sun/sys/cg6tec.h deleted file mode 100644 index cd42288b32..0000000000 --- a/usr/src/uts/sun/sys/cg6tec.h +++ /dev/null @@ -1,742 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1991,1997-1998 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _SYS_CG6TEC_H -#define _SYS_CG6TEC_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS-4.1 1.2 */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * TEC register offsets from base address. These offsets are - * u_intended to be added to a pointer-to-integer whose value is the - * base address of the CG6 memory mapped register area. - */ - -/* base for transform data registers */ - -#define L_TEC_DATA_BASE (0x100/sizeof (uint32_t)) -#define L_TEC_DATA00 (0x100/sizeof (uint32_t)) -#define L_TEC_DATA01 (0x104/sizeof (uint32_t)) -#define L_TEC_DATA02 (0x108/sizeof (uint32_t)) -#define L_TEC_DATA03 (0x10C/sizeof (uint32_t)) -#define L_TEC_DATA04 (0x110/sizeof (uint32_t)) -#define L_TEC_DATA05 (0x114/sizeof (uint32_t)) -#define L_TEC_DATA06 (0x118/sizeof (uint32_t)) -#define L_TEC_DATA07 (0x11C/sizeof (uint32_t)) -#define L_TEC_DATA08 (0x120/sizeof (uint32_t)) -#define L_TEC_DATA09 (0x124/sizeof (uint32_t)) -#define L_TEC_DATA10 (0x128/sizeof (uint32_t)) -#define L_TEC_DATA11 (0x12C/sizeof (uint32_t)) -#define L_TEC_DATA12 (0x130/sizeof (uint32_t)) -#define L_TEC_DATA13 (0x134/sizeof (uint32_t)) -#define L_TEC_DATA14 (0x138/sizeof (uint32_t)) -#define L_TEC_DATA15 (0x13C/sizeof (uint32_t)) -#define L_TEC_DATA16 (0x140/sizeof (uint32_t)) -#define L_TEC_DATA17 (0x144/sizeof (uint32_t)) -#define L_TEC_DATA18 (0x148/sizeof (uint32_t)) -#define L_TEC_DATA19 (0x14C/sizeof (uint32_t)) -#define L_TEC_DATA20 (0x150/sizeof (uint32_t)) -#define L_TEC_DATA21 (0x154/sizeof (uint32_t)) -#define L_TEC_DATA22 (0x158/sizeof (uint32_t)) -#define L_TEC_DATA23 (0x15C/sizeof (uint32_t)) -#define L_TEC_DATA24 (0x160/sizeof (uint32_t)) -#define L_TEC_DATA25 (0x164/sizeof (uint32_t)) -#define L_TEC_DATA26 (0x168/sizeof (uint32_t)) -#define L_TEC_DATA27 (0x16C/sizeof (uint32_t)) -#define L_TEC_DATA28 (0x170/sizeof (uint32_t)) -#define L_TEC_DATA29 (0x174/sizeof (uint32_t)) -#define L_TEC_DATA30 (0x178/sizeof (uint32_t)) -#define L_TEC_DATA31 (0x17C/sizeof (uint32_t)) -#define L_TEC_DATA32 (0x180/sizeof (uint32_t)) -#define L_TEC_DATA33 (0x184/sizeof (uint32_t)) -#define L_TEC_DATA34 (0x188/sizeof (uint32_t)) -#define L_TEC_DATA35 (0x18C/sizeof (uint32_t)) -#define L_TEC_DATA36 (0x190/sizeof (uint32_t)) -#define L_TEC_DATA37 (0x194/sizeof (uint32_t)) -#define L_TEC_DATA38 (0x198/sizeof (uint32_t)) -#define L_TEC_DATA39 (0x19C/sizeof (uint32_t)) -#define L_TEC_DATA40 (0x1A0/sizeof (uint32_t)) -#define L_TEC_DATA41 (0x1A4/sizeof (uint32_t)) -#define L_TEC_DATA42 (0x1A8/sizeof (uint32_t)) -#define L_TEC_DATA43 (0x1AC/sizeof (uint32_t)) -#define L_TEC_DATA44 (0x1B0/sizeof (uint32_t)) -#define L_TEC_DATA45 (0x1B4/sizeof (uint32_t)) -#define L_TEC_DATA46 (0x1B8/sizeof (uint32_t)) -#define L_TEC_DATA47 (0x1BC/sizeof (uint32_t)) -#define L_TEC_DATA48 (0x1C0/sizeof (uint32_t)) -#define L_TEC_DATA49 (0x1C4/sizeof (uint32_t)) -#define L_TEC_DATA50 (0x1C8/sizeof (uint32_t)) -#define L_TEC_DATA51 (0x1CC/sizeof (uint32_t)) -#define L_TEC_DATA52 (0x1D0/sizeof (uint32_t)) -#define L_TEC_DATA53 (0x1D4/sizeof (uint32_t)) -#define L_TEC_DATA54 (0x1D8/sizeof (uint32_t)) -#define L_TEC_DATA55 (0x1DC/sizeof (uint32_t)) -#define L_TEC_DATA56 (0x1E0/sizeof (uint32_t)) -#define L_TEC_DATA57 (0x1E4/sizeof (uint32_t)) -#define L_TEC_DATA58 (0x1E8/sizeof (uint32_t)) -#define L_TEC_DATA59 (0x1EC/sizeof (uint32_t)) -#define L_TEC_DATA60 (0x1F0/sizeof (uint32_t)) -#define L_TEC_DATA61 (0x1F4/sizeof (uint32_t)) -#define L_TEC_DATA62 (0x1F8/sizeof (uint32_t)) -#define L_TEC_DATA63 (0x1FC/sizeof (uint32_t)) - - -/* matrix registers */ - -#define L_TEC_MV_MATRIX (0x000/sizeof (uint32_t)) -#define L_TEC_CLIPCHECK (0x004/sizeof (uint32_t)) -#define L_TEC_VDC_MATRIX (0x008/sizeof (uint32_t)) - - -/* command register */ - -#define L_TEC_COMMAND1 (0x0010/sizeof (uint32_t)) -#define L_TEC_COMMAND2 (0x0014/sizeof (uint32_t)) -#define L_TEC_COMMAND3 (0x0018/sizeof (uint32_t)) -#define L_TEC_COMMAND4 (0x001c/sizeof (uint32_t)) - - -/* uint32_teger indexed address registers */ - -#define L_TEC_IPOINTABSX (0x800 / sizeof (uint32_t)) -#define L_TEC_IPOINTABSY (0x804 / sizeof (uint32_t)) -#define L_TEC_IPOINTABSZ (0x808 / sizeof (uint32_t)) -#define L_TEC_IPOINTABSW (0x80C / sizeof (uint32_t)) -#define L_TEC_IPOINTRELX (0x810 / sizeof (uint32_t)) -#define L_TEC_IPOINTRELY (0x814 / sizeof (uint32_t)) -#define L_TEC_IPOINTRELZ (0x818 / sizeof (uint32_t)) -#define L_TEC_IPOINTRELW (0x81C / sizeof (uint32_t)) - -#define L_TEC_ILINEABSX (0x840 / sizeof (uint32_t)) -#define L_TEC_ILINEABSY (0x844 / sizeof (uint32_t)) -#define L_TEC_ILINEABSZ (0x848 / sizeof (uint32_t)) -#define L_TEC_ILINEABSW (0x84C / sizeof (uint32_t)) -#define L_TEC_ILINERELX (0x850 / sizeof (uint32_t)) -#define L_TEC_ILINERELY (0x854 / sizeof (uint32_t)) -#define L_TEC_ILINERELZ (0x858 / sizeof (uint32_t)) -#define L_TEC_ILINERELW (0x85C / sizeof (uint32_t)) - -#define L_TEC_ITRIABSX (0x880 / sizeof (uint32_t)) -#define L_TEC_ITRIABSY (0x884 / sizeof (uint32_t)) -#define L_TEC_ITRIABSZ (0x888 / sizeof (uint32_t)) -#define L_TEC_ITRIABSW (0x88C / sizeof (uint32_t)) -#define L_TEC_ITRIRELX (0x890 / sizeof (uint32_t)) -#define L_TEC_ITRIRELY (0x894 / sizeof (uint32_t)) -#define L_TEC_ITRIRELZ (0x898 / sizeof (uint32_t)) -#define L_TEC_ITRIRELW (0x89C / sizeof (uint32_t)) - -#define L_TEC_IQUADABSX (0x8C0 / sizeof (uint32_t)) -#define L_TEC_IQUADABSY (0x8C4 / sizeof (uint32_t)) -#define L_TEC_IQUADABSZ (0x8C8 / sizeof (uint32_t)) -#define L_TEC_IQUADABSW (0x8CC / sizeof (uint32_t)) -#define L_TEC_IQUADRELX (0x8D0 / sizeof (uint32_t)) -#define L_TEC_IQUADRELY (0x8D4 / sizeof (uint32_t)) -#define L_TEC_IQUADRELZ (0x8D8 / sizeof (uint32_t)) -#define L_TEC_IQUADRELW (0x8DC / sizeof (uint32_t)) - -#define L_TEC_IRECTABSX (0x900 / sizeof (uint32_t)) -#define L_TEC_IRECTABSY (0x904 / sizeof (uint32_t)) -#define L_TEC_IRECTABSZ (0x908 / sizeof (uint32_t)) -#define L_TEC_IRECTABSW (0x90C / sizeof (uint32_t)) -#define L_TEC_IRECTRELX (0x910 / sizeof (uint32_t)) -#define L_TEC_IRECTRELY (0x914 / sizeof (uint32_t)) -#define L_TEC_IRECTRELZ (0x918 / sizeof (uint32_t)) -#define L_TEC_IRECTRELW (0x91C / sizeof (uint32_t)) - -/* fixed pouint32_t indexed address registers */ - -#define L_TEC_BPOINTABSX (0xA00 / sizeof (uint32_t)) -#define L_TEC_BPOINTABSY (0xA04 / sizeof (uint32_t)) -#define L_TEC_BPOINTABSZ (0xA08 / sizeof (uint32_t)) -#define L_TEC_BPOINTABSW (0xA0C / sizeof (uint32_t)) -#define L_TEC_BPOINTRELX (0xA10 / sizeof (uint32_t)) -#define L_TEC_BPOINTRELY (0xA14 / sizeof (uint32_t)) -#define L_TEC_BPOINTRELZ (0xA18 / sizeof (uint32_t)) -#define L_TEC_BPOINTRELW (0xA1C / sizeof (uint32_t)) - -#define L_TEC_BLINEABSX (0xA40 / sizeof (uint32_t)) -#define L_TEC_BLINEABSY (0xA44 / sizeof (uint32_t)) -#define L_TEC_BLINEABSZ (0xA48 / sizeof (uint32_t)) -#define L_TEC_BLINEABSW (0xA4C / sizeof (uint32_t)) -#define L_TEC_BLINERELX (0xA50 / sizeof (uint32_t)) -#define L_TEC_BLINERELY (0xA54 / sizeof (uint32_t)) -#define L_TEC_BLINERELZ (0xA58 / sizeof (uint32_t)) -#define L_TEC_BLINERELW (0xA5C / sizeof (uint32_t)) - -#define L_TEC_BTRIABSX (0xA80 / sizeof (uint32_t)) -#define L_TEC_BTRIABSY (0xA84 / sizeof (uint32_t)) -#define L_TEC_BTRIABSZ (0xA88 / sizeof (uint32_t)) -#define L_TEC_BTRIABSW (0xA8C / sizeof (uint32_t)) -#define L_TEC_BTRIRELX (0xA90 / sizeof (uint32_t)) -#define L_TEC_BTRIRELY (0xA94 / sizeof (uint32_t)) -#define L_TEC_BTRIRELZ (0xA98 / sizeof (uint32_t)) -#define L_TEC_BTRIRELW (0xA9C / sizeof (uint32_t)) - -#define L_TEC_BQUADABSX (0xAC0 / sizeof (uint32_t)) -#define L_TEC_BQUADABSY (0xAC4 / sizeof (uint32_t)) -#define L_TEC_BQUADABSZ (0xAC8 / sizeof (uint32_t)) -#define L_TEC_BQUADABSW (0xACC / sizeof (uint32_t)) -#define L_TEC_BQUADRELX (0xAD0 / sizeof (uint32_t)) -#define L_TEC_BQUADRELY (0xAD4 / sizeof (uint32_t)) -#define L_TEC_BQUADRELZ (0xAD8 / sizeof (uint32_t)) -#define L_TEC_BQUADRELW (0xADC / sizeof (uint32_t)) - -#define L_TEC_BRECTABSX (0xB00 / sizeof (uint32_t)) -#define L_TEC_BRECTABSY (0xB04 / sizeof (uint32_t)) -#define L_TEC_BRECTABSZ (0xB08 / sizeof (uint32_t)) -#define L_TEC_BRECTABSW (0xB0C / sizeof (uint32_t)) -#define L_TEC_BRECTRELX (0xB10 / sizeof (uint32_t)) -#define L_TEC_BRECTRELY (0xB14 / sizeof (uint32_t)) -#define L_TEC_BRECTRELZ (0xB18 / sizeof (uint32_t)) -#define L_TEC_BRECTRELW (0xB1C / sizeof (uint32_t)) - -/* floating pouint32_t indexed address registers */ - -#define L_TEC_FPOINTABSX (0xC00 / sizeof (uint32_t)) -#define L_TEC_FPOINTABSY (0xC04 / sizeof (uint32_t)) -#define L_TEC_FPOINTABSZ (0xC08 / sizeof (uint32_t)) -#define L_TEC_FPOINTABSW (0xC0C / sizeof (uint32_t)) -#define L_TEC_FPOINTRELX (0xC10 / sizeof (uint32_t)) -#define L_TEC_FPOINTRELY (0xC14 / sizeof (uint32_t)) -#define L_TEC_FPOINTRELZ (0xC18 / sizeof (uint32_t)) -#define L_TEC_FPOINTRELW (0xC1C / sizeof (uint32_t)) - -#define L_TEC_FLINEABSX (0xC40 / sizeof (uint32_t)) -#define L_TEC_FLINEABSY (0xC44 / sizeof (uint32_t)) -#define L_TEC_FLINEABSZ (0xC48 / sizeof (uint32_t)) -#define L_TEC_FLINEABSW (0xC4C / sizeof (uint32_t)) -#define L_TEC_FLINERELX (0xC50 / sizeof (uint32_t)) -#define L_TEC_FLINERELY (0xC54 / sizeof (uint32_t)) -#define L_TEC_FLINERELZ (0xC58 / sizeof (uint32_t)) -#define L_TEC_FLINERELW (0xC5C / sizeof (uint32_t)) - -#define L_TEC_FTRIABSX (0xC80 / sizeof (uint32_t)) -#define L_TEC_FTRIABSY (0xC84 / sizeof (uint32_t)) -#define L_TEC_FTRIABSZ (0xC88 / sizeof (uint32_t)) -#define L_TEC_FTRIABSW (0xC8C / sizeof (uint32_t)) -#define L_TEC_FTRIRELX (0xC90 / sizeof (uint32_t)) -#define L_TEC_FTRIRELY (0xC94 / sizeof (uint32_t)) -#define L_TEC_FTRIRELZ (0xC98 / sizeof (uint32_t)) -#define L_TEC_FTRIRELW (0xC9C / sizeof (uint32_t)) - -#define L_TEC_FQUADABSX (0xCC0 / sizeof (uint32_t)) -#define L_TEC_FQUADABSY (0xCC4 / sizeof (uint32_t)) -#define L_TEC_FQUADABSZ (0xCC8 / sizeof (uint32_t)) -#define L_TEC_FQUADABSW (0xCCC / sizeof (uint32_t)) -#define L_TEC_FQUADRELX (0xCD0 / sizeof (uint32_t)) -#define L_TEC_FQUADRELY (0xCD4 / sizeof (uint32_t)) -#define L_TEC_FQUADRELZ (0xCD8 / sizeof (uint32_t)) -#define L_TEC_FQUADRELW (0xCDC / sizeof (uint32_t)) - -#define L_TEC_FRECTABSX (0xD00 / sizeof (uint32_t)) -#define L_TEC_FRECTABSY (0xD04 / sizeof (uint32_t)) -#define L_TEC_FRECTABSZ (0xD08 / sizeof (uint32_t)) -#define L_TEC_FRECTABSW (0xD0C / sizeof (uint32_t)) -#define L_TEC_FRECTRELX (0xD10 / sizeof (uint32_t)) -#define L_TEC_FRECTRELY (0xD14 / sizeof (uint32_t)) -#define L_TEC_FRECTRELZ (0xD18 / sizeof (uint32_t)) -#define L_TEC_FRECTRELW (0xD1C / sizeof (uint32_t)) - -/* - * Generic unsigned types for bit fields - */ -typedef enum { - L_TEC_UNUSED = 0 -} l_tec_unused_t; - -/* - * typedefs for entering index registers - */ -typedef enum { /* coordinate type of {pou_int,line,etc} */ - L_TEC_X = 0, - L_TEC_Y = 1, - L_TEC_Z = 2, - L_TEC_W = 3, /* used as index to store index writes in */ - /* tec_data array */ - L_TEC_X_MV = 4, - L_TEC_Y_MV = 5, - L_TEC_Z_MV = 6, - L_TEC_W_MV = 7, /* used as index to store xform results */ - L_TEC_X_VDC = 8, - L_TEC_Y_VDC = 9, - L_TEC_Z_VDC = 10, /* used as index to store VDC multiply result */ - L_TEC_SCRATCH = 11 /* scratch register */ -} l_tec_coord_t; - -typedef enum { /* index coordinate type */ - L_TEC_INT = 0, - L_TEC_FRAC = 1, - L_TEC_FLOAT = 2 -} l_tec_type_t; - -typedef enum { /* index object type */ - L_TEC_POINT = 0, - L_TEC_LINE = 1, - L_TEC_TRI = 2, - L_TEC_QUAD = 3, - L_TEC_RECT = 4 -} l_tec_object_t; - -typedef enum { - L_TEC_ABS = 0, - L_TEC_REL = 1 -} l_tec_mode_t; - - -/* - * TEC MV_MATRIX register bits. - */ - -typedef enum { - L_TEC_MV_DIV_OFF = 0, - L_TEC_MV_DIV_ON = 1 -} l_tec_mv_div_t; - -typedef enum { - L_TEC_MV_AUTO_OFF = 0, - L_TEC_MV_AUTO_ON = 1 -} l_tec_mv_auto_t; - -typedef enum { - L_TEC_MV_H_FALSE = 0, - L_TEC_MV_H_TRUE = 1 -} l_tec_mv_h_t; - -typedef enum { - L_TEC_MV_Z_FALSE = 0, L_TEC_MV_Z_TRUE = 1 -} l_tec_mv_z_t; - -typedef enum { - L_TEC_MV_I3 = 0, L_TEC_MV_I4 = 1 -} l_tec_mv_i_t; - -typedef enum { - L_TEC_MV_J1 = 0, L_TEC_MV_J2 = 1, L_TEC_MV_J3 = 2, L_TEC_MV_J4 = 3 -} l_tec_mv_j_t; - -typedef struct l_tec_mv { - l_tec_unused_t l_tec_mv_unused1 :16; /* NOT USED */ - l_tec_mv_div_t l_tec_mv_div : 1; /* divide enable */ - l_tec_mv_auto_t l_tec_mv_autoload : 1; /* autoload enable */ - l_tec_mv_h_t l_tec_mv_h : 1; /* pou_int size */ - l_tec_mv_z_t l_tec_mv_z : 1; /* pou_int size */ - l_tec_unused_t l_tec_mv_unused2 : 1; /* NOT USED */ - l_tec_mv_i_t l_tec_mv_i : 1; /* matrix rows */ - l_tec_mv_j_t l_tec_mv_j : 2; /* matrix columns */ - l_tec_unused_t l_tec_mv_unused3 : 2; /* NOT USED */ - uint32_t l_tec_mv_index : 6; /* matrix start data */ - /* register */ -} l_tec_mv_t; - -/* - * TEC CLIPCHECK bits. - */ - -typedef enum { - L_TEC_EXCEPTION_OFF = 0, L_TEC_EXCEPTION_ON = 1 -} l_tec_clip_exception_t; - -typedef enum { - L_TEC_HIDDEN_OFF = 0, L_TEC_HIDDEN_ON = 1 -} l_tec_clip_hidden_t; - -typedef enum { - L_TEC_INTERSECT_OFF = 0, L_TEC_INTERSECT_ON = 1 -} l_tec_clip_u_intersect_t; - -typedef enum { - L_TEC_VISIBLE_OFF = 0, L_TEC_VISIBLE_ON = 1 -} l_tec_clip_visible_t; - -typedef enum { - L_TEC_ACC_BACKSIDE_FALSE = 0, L_TEC_ACC_BACKSIDE_TRUE = 1 -} l_tec_clip_acc_backside_t; - -typedef enum { - L_TEC_ACC_LT_FALSE = 0, L_TEC_ACC_LT_TRUE = 1 -} l_tec_clip_acc_lt_t; - -typedef enum { - L_TEC_ACC_INSIDE_FALSE = 0, L_TEC_ACC_INSIDE_TRUE = 1 -} l_tec_clip_acc_inside_t; - -typedef enum { - L_TEC_ACC_GT_FALSE = 0, L_TEC_ACC_GT_TRUE = 1 -} l_tec_clip_acc_gt_t; - -typedef enum { - L_TEC_LT_FALSE = 0, L_TEC_LT_TRUE = 1 -} l_tec_clip_lt_t; - -typedef enum { - L_TEC_GT_FALSE = 0, L_TEC_GT_TRUE = 1 -} l_tec_clip_gt_t; - -typedef enum { - L_TEC_CLIP_OFF = 0, L_TEC_CLIP_ON = 1 -} l_tec_clip_enable_t; - -typedef struct l_tec_clip { /* big assumption here is compiler */ - /* assigns bit fields left to right */ - l_tec_clip_exception_t l_tec_clip_exception : 1; - l_tec_clip_hidden_t l_tec_clip_hidden : 1; - l_tec_clip_u_intersect_t l_tec_clip_intersect : 1; - l_tec_clip_visible_t l_tec_clip_visible : 1; - l_tec_unused_t l_tec_clip_unused1 : 3; - l_tec_clip_enable_t l_tec_clip_enable : 1; - - l_tec_clip_acc_backside_t l_tec_clip_acc_z_backside : 1; - l_tec_clip_acc_lt_t l_tec_clip_acc_z_lt_front : 1; - l_tec_clip_acc_inside_t l_tec_clip_acc_z_inside : 1; - l_tec_clip_acc_gt_t l_tec_clip_acc_z_gt_back : 1; - l_tec_clip_lt_t l_tec_clip_z_lt_front : 1; - l_tec_clip_gt_t l_tec_clip_z_gt_back : 1; - l_tec_clip_enable_t l_tec_clip_front : 1; - l_tec_clip_enable_t l_tec_clip_back : 1; - - l_tec_clip_acc_backside_t l_tec_clip_acc_y_backside : 1; - l_tec_clip_acc_lt_t l_tec_clip_acc_y_lt_bottom : 1; - l_tec_clip_acc_inside_t l_tec_clip_acc_y_inside : 1; - l_tec_clip_acc_gt_t l_tec_clip_acc_y_gt_top : 1; - l_tec_clip_lt_t l_tec_clip_y_lt_bottom : 1; - l_tec_clip_gt_t l_tec_clip_y_gt_top : 1; - l_tec_clip_enable_t l_tec_clip_bottom : 1; - l_tec_clip_enable_t l_tec_clip_top : 1; - - l_tec_clip_acc_backside_t l_tec_clip_acc_x_backside : 1; - l_tec_clip_acc_lt_t l_tec_clip_acc_x_lt_left : 1; - l_tec_clip_acc_inside_t l_tec_clip_acc_x_inside : 1; - l_tec_clip_acc_gt_t l_tec_clip_acc_x_gt_right : 1; - l_tec_clip_lt_t l_tec_clip_x_lt_left : 1; - l_tec_clip_gt_t l_tec_clip_x_gt_right : 1; - l_tec_clip_enable_t l_tec_clip_left : 1; - l_tec_clip_enable_t l_tec_clip_right : 1; -} l_tec_clip_t; - - -/* - * TEC VDC_MATRIX register bits. - */ - -typedef enum { - L_TEC_VDC_INT = 0, L_TEC_VDC_FIXED = 1, L_TEC_VDC_FLOAT = 2, - L_TEC_VDC_INTRNL0 = 4, L_TEC_VDC_INTRNL1 = 5 -}l_tec_vdc_type_t; - -typedef enum { - L_TEC_VDC_2D = 0, L_TEC_VDC_3D = 1 - }l_tec_vdc_k_t; - -typedef enum { - L_TEC_VDC_MUL_OFF = 0, L_TEC_VDC_MUL_ON = 1 - }l_tec_vdc_mul_t; - - -typedef struct l_tec_vdc { - l_tec_unused_t l_tec_vdc_unused1 : 16; /* NOT USED */ - l_tec_vdc_type_t l_tec_vdc_type : 3; /* reg. access type */ - l_tec_vdc_mul_t l_tec_vdc_mul : 1; /* enable VDC mult. */ - l_tec_unused_t l_tec_vdc_unused2 : 3; /* NOT USED */ - l_tec_vdc_k_t l_tec_vdc_k : 1; /* 2D/3D format */ - l_tec_unused_t l_tec_vdc_unused3 : 2; /* NOT USED */ - uint32_t l_tec_vdc_index : 6; /* matrix start data */ - /* register */ -} l_tec_vdc_t; - -/* - * TEC COMMAND register bits. - */ - -typedef enum { - L_TEC_CMD_M1 = 0, - L_TEC_CMD_M2 = 1, - L_TEC_CMD_M3 = 2, - L_TEC_CMD_M4 = 3 -}l_tec_cmd_m_t; - -typedef enum { - L_TEC_CMD_N1 = 0, - L_TEC_CMD_N2 = 1, - L_TEC_CMD_N3 = 2, - L_TEC_CMD_N4 = 3 -}l_tec_cmd_n_t; - -typedef enum { - L_TEC_CMD_I_POS = 0, - L_TEC_CMD_I_NEG = 1 -}l_tec_cmd_i_t; - -typedef struct l_tec_cmd { - l_tec_cmd_m_t l_tec_cmd_m : 2; /* matrix A columns */ - l_tec_cmd_n_t l_tec_cmd_n : 2; /* matrix B columns */ - l_tec_cmd_i_t l_tec_cmd_i11 : 1; /* identity diagonal sign */ - l_tec_cmd_i_t l_tec_cmd_i22 : 1; /* identity diagonal sign */ - l_tec_cmd_i_t l_tec_cmd_i33 : 1; /* identity diagonal sign */ - l_tec_cmd_i_t l_tec_cmd_i44 : 1; /* identity diagonal sign */ - l_tec_unused_t l_tec_cmd_unused1 : 2; /* NOT USED */ - uint32_t l_tec_cmd_Aindex : 6; /* A matrix start data reg. */ - l_tec_unused_t l_tec_cmd_unused2 : 2; /* NOT USED */ - uint32_t l_tec_cmd_Bindex : 6; /* B matrix start data reg. */ - l_tec_unused_t l_tec_cmd_unused3 : 2; /* NOT USED */ - uint32_t l_tec_cmd_Cindex : 6; /* C matrix start data reg. */ -} l_tec_cmd_t; - -/* - * TEC registers defined as a structure. - */ -struct tec { -#ifdef structures - struct l_tec_mv l_tec_mv; /* 0 */ - struct l_tec_clip l_tec_clip; /* 1 */ - struct l_tec_vdc l_tec_vdc; /* 2 */ - uint32_t l_tec_pad_3[4-3]; - struct l_tec_cmd l_tec_command1; /* 4 */ - struct l_tec_cmd l_tec_command2; /* 5 */ - struct l_tec_cmd l_tec_command3; /* 6 */ - struct l_tec_cmd l_tec_command4; /* 7 */ -#else - uint32_t l_tec_mv; /* 0 */ - uint32_t l_tec_clip; /* 1 */ - uint32_t l_tec_vdc; /* 2 */ - uint32_t l_tec_pad_3[4-3]; - uint32_t l_tec_command1; /* 4 */ - uint32_t l_tec_command2; /* 5 */ - uint32_t l_tec_command3; /* 6 */ - uint32_t l_tec_command4; /* 7 */ -#endif - uint32_t l_tec_pad_8[64-8]; - uint32_t l_tec_data00; /* 64 */ - uint32_t l_tec_data01; /* 65 */ - uint32_t l_tec_data02; /* 66 */ - uint32_t l_tec_data03; /* 67 */ - uint32_t l_tec_data04; /* 68 */ - uint32_t l_tec_data05; /* 69 */ - uint32_t l_tec_data06; /* 70 */ - uint32_t l_tec_data07; /* 71 */ - uint32_t l_tec_data08; /* 72 */ - uint32_t l_tec_data09; /* 73 */ - uint32_t l_tec_data10; /* 74 */ - uint32_t l_tec_data11; /* 75 */ - uint32_t l_tec_data12; /* 76 */ - uint32_t l_tec_data13; /* 77 */ - uint32_t l_tec_data14; /* 78 */ - uint32_t l_tec_data15; /* 79 */ - uint32_t l_tec_data16; /* 80 */ - uint32_t l_tec_data17; /* 81 */ - uint32_t l_tec_data18; /* 82 */ - uint32_t l_tec_data19; /* 83 */ - uint32_t l_tec_data20; /* 84 */ - uint32_t l_tec_data21; /* 85 */ - uint32_t l_tec_data22; /* 86 */ - uint32_t l_tec_data23; /* 87 */ - uint32_t l_tec_data24; /* 88 */ - uint32_t l_tec_data25; /* 89 */ - uint32_t l_tec_data26; /* 90 */ - uint32_t l_tec_data27; /* 91 */ - uint32_t l_tec_data28; /* 92 */ - uint32_t l_tec_data29; /* 93 */ - uint32_t l_tec_data30; /* 94 */ - uint32_t l_tec_data31; /* 95 */ - uint32_t l_tec_data32; /* 96 */ - uint32_t l_tec_data33; /* 97 */ - uint32_t l_tec_data34; /* 98 */ - uint32_t l_tec_data35; /* 99 */ - uint32_t l_tec_data36; /* 100 */ - uint32_t l_tec_data37; /* 101 */ - uint32_t l_tec_data38; /* 102 */ - uint32_t l_tec_data39; /* 103 */ - uint32_t l_tec_data40; /* 104 */ - uint32_t l_tec_data41; /* 105 */ - uint32_t l_tec_data42; /* 106 */ - uint32_t l_tec_data43; /* 107 */ - uint32_t l_tec_data44; /* 108 */ - uint32_t l_tec_data45; /* 109 */ - uint32_t l_tec_data46; /* 110 */ - uint32_t l_tec_data47; /* 111 */ - uint32_t l_tec_data48; /* 112 */ - uint32_t l_tec_data49; /* 113 */ - uint32_t l_tec_data50; /* 114 */ - uint32_t l_tec_data51; /* 115 */ - uint32_t l_tec_data52; /* 116 */ - uint32_t l_tec_data53; /* 117 */ - uint32_t l_tec_data54; /* 118 */ - uint32_t l_tec_data55; /* 119 */ - uint32_t l_tec_data56; /* 120 */ - uint32_t l_tec_data57; /* 121 */ - uint32_t l_tec_data58; /* 122 */ - uint32_t l_tec_data59; /* 123 */ - uint32_t l_tec_data60; /* 124 */ - uint32_t l_tec_data61; /* 125 */ - uint32_t l_tec_data62; /* 126 */ - uint32_t l_tec_data63; /* 127 */ - uint32_t l_tec_pad_128[512-128]; - uint32_t l_tec_ipointabsx; /* 512 */ - uint32_t l_tec_ipointabsy; /* 513 */ - uint32_t l_tec_ipointabsz; /* 514 */ - uint32_t l_tec_ipointabsw; /* 515 */ - uint32_t l_tec_ipointrelx; /* 516 */ - uint32_t l_tec_ipointrely; /* 517 */ - uint32_t l_tec_ipointrelz; /* 518 */ - uint32_t l_tec_ipointrelw; /* 519 */ - uint32_t l_tec_pad_520[528-520]; - uint32_t l_tec_ilineabsx; /* 528 */ - uint32_t l_tec_ilineabsy; /* 529 */ - uint32_t l_tec_ilineabsz; /* 530 */ - uint32_t l_tec_ilineabsw; /* 531 */ - uint32_t l_tec_ilinerelx; /* 532 */ - uint32_t l_tec_ilinerely; /* 533 */ - uint32_t l_tec_ilinerelz; /* 534 */ - uint32_t l_tec_ilinerelw; /* 535 */ - uint32_t l_tec_pad_536[544-536]; - uint32_t l_tec_itriabsx; /* 544 */ - uint32_t l_tec_itriabsy; /* 545 */ - uint32_t l_tec_itriabsz; /* 546 */ - uint32_t l_tec_itriabsw; /* 547 */ - uint32_t l_tec_itrirelx; /* 548 */ - uint32_t l_tec_itrirely; /* 549 */ - uint32_t l_tec_itrirelz; /* 550 */ - uint32_t l_tec_itrirelw; /* 551 */ - uint32_t l_tec_pad_552[560-552]; - uint32_t l_tec_iquadabsx; /* 560 */ - uint32_t l_tec_iquadabsy; /* 561 */ - uint32_t l_tec_iquadabsz; /* 562 */ - uint32_t l_tec_iquadabsw; /* 563 */ - uint32_t l_tec_iquadrelx; /* 564 */ - uint32_t l_tec_iquadrely; /* 565 */ - uint32_t l_tec_iquadrelz; /* 566 */ - uint32_t l_tec_iquadrelw; /* 567 */ - uint32_t l_tec_pad_568[576-568]; - uint32_t l_tec_irectabsx; /* 576 */ - uint32_t l_tec_irectabsy; /* 577 */ - uint32_t l_tec_irectabsz; /* 578 */ - uint32_t l_tec_irectabsw; /* 579 */ - uint32_t l_tec_irectrelx; /* 580 */ - uint32_t l_tec_irectrely; /* 581 */ - uint32_t l_tec_irectrelz; /* 582 */ - uint32_t l_tec_irectrelw; /* 583 */ - uint32_t l_tec_pad_584[640-584]; - uint32_t l_tec_bpointabsx; /* 640 */ - uint32_t l_tec_bpointabsy; /* 641 */ - uint32_t l_tec_bpointabsz; /* 642 */ - uint32_t l_tec_bpointabsw; /* 643 */ - uint32_t l_tec_bpointrelx; /* 644 */ - uint32_t l_tec_bpointrely; /* 645 */ - uint32_t l_tec_bpointrelz; /* 646 */ - uint32_t l_tec_bpointrelw; /* 647 */ - uint32_t l_tec_pad_648[656-648]; - uint32_t l_tec_blineabsx; /* 656 */ - uint32_t l_tec_blineabsy; /* 657 */ - uint32_t l_tec_blineabsz; /* 658 */ - uint32_t l_tec_blineabsw; /* 659 */ - uint32_t l_tec_blinerelx; /* 660 */ - uint32_t l_tec_blinerely; /* 661 */ - uint32_t l_tec_blinerelz; /* 662 */ - uint32_t l_tec_blinerelw; /* 663 */ - uint32_t l_tec_pad_664[672-664]; - uint32_t l_tec_btriabsx; /* 672 */ - uint32_t l_tec_btriabsy; /* 673 */ - uint32_t l_tec_btriabsz; /* 674 */ - uint32_t l_tec_btriabsw; /* 675 */ - uint32_t l_tec_btrirelx; /* 676 */ - uint32_t l_tec_btrirely; /* 677 */ - uint32_t l_tec_btrirelz; /* 678 */ - uint32_t l_tec_btrirelw; /* 679 */ - uint32_t l_tec_pad_680[688-680]; - uint32_t l_tec_bquadabsx; /* 688 */ - uint32_t l_tec_bquadabsy; /* 689 */ - uint32_t l_tec_bquadabsz; /* 690 */ - uint32_t l_tec_bquadabsw; /* 691 */ - uint32_t l_tec_bquadrelx; /* 692 */ - uint32_t l_tec_bquadrely; /* 693 */ - uint32_t l_tec_bquadrelz; /* 694 */ - uint32_t l_tec_bquadrelw; /* 695 */ - uint32_t l_tec_pad_696[704-696]; - uint32_t l_tec_brectabsx; /* 704 */ - uint32_t l_tec_brectabsy; /* 705 */ - uint32_t l_tec_brectabsz; /* 706 */ - uint32_t l_tec_brectabsw; /* 707 */ - uint32_t l_tec_brectrelx; /* 708 */ - uint32_t l_tec_brectrely; /* 709 */ - uint32_t l_tec_brectrelz; /* 710 */ - uint32_t l_tec_brectrelw; /* 711 */ - uint32_t l_tec_pad_712[768-712]; - uint32_t l_tec_fpointabsx; /* 768 */ - uint32_t l_tec_fpointabsy; /* 769 */ - uint32_t l_tec_fpointabsz; /* 770 */ - uint32_t l_tec_fpointabsw; /* 771 */ - uint32_t l_tec_fpointrelx; /* 772 */ - uint32_t l_tec_fpointrely; /* 773 */ - uint32_t l_tec_fpointrelz; /* 774 */ - uint32_t l_tec_fpointrelw; /* 775 */ - uint32_t l_tec_pad_776[784-776]; - uint32_t l_tec_flineabsx; /* 784 */ - uint32_t l_tec_flineabsy; /* 785 */ - uint32_t l_tec_flineabsz; /* 786 */ - uint32_t l_tec_flineabsw; /* 787 */ - uint32_t l_tec_flinerelx; /* 788 */ - uint32_t l_tec_flinerely; /* 789 */ - uint32_t l_tec_flinerelz; /* 790 */ - uint32_t l_tec_flinerelw; /* 791 */ - uint32_t l_tec_pad_792[800-792]; - uint32_t l_tec_ftriabsx; /* 800 */ - uint32_t l_tec_ftriabsy; /* 801 */ - uint32_t l_tec_ftriabsz; /* 802 */ - uint32_t l_tec_ftriabsw; /* 803 */ - uint32_t l_tec_ftrirelx; /* 804 */ - uint32_t l_tec_ftrirely; /* 805 */ - uint32_t l_tec_ftrirelz; /* 806 */ - uint32_t l_tec_ftrirelw; /* 807 */ - uint32_t l_tec_pad_808[816-808]; - uint32_t l_tec_fquadabsx; /* 816 */ - uint32_t l_tec_fquadabsy; /* 817 */ - uint32_t l_tec_fquadabsz; /* 818 */ - uint32_t l_tec_fquadabsw; /* 819 */ - uint32_t l_tec_fquadrelx; /* 820 */ - uint32_t l_tec_fquadrely; /* 821 */ - uint32_t l_tec_fquadrelz; /* 822 */ - uint32_t l_tec_fquadrelw; /* 823 */ - uint32_t l_tec_pad_824[832-824]; - uint32_t l_tec_frectabsx; /* 832 */ - uint32_t l_tec_frectabsy; /* 833 */ - uint32_t l_tec_frectabsz; /* 834 */ - uint32_t l_tec_frectabsw; /* 835 */ - uint32_t l_tec_frectrelx; /* 836 */ - uint32_t l_tec_frectrely; /* 837 */ - uint32_t l_tec_frectrelz; /* 838 */ - uint32_t l_tec_frectrelw; /* 839 */ -}; - -#define NUM_TEC_REGS (sizeof (struct l_tec)/sizeof (uint_t)) - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_CG6TEC_H */ diff --git a/usr/src/uts/sun/sys/cg6thc.h b/usr/src/uts/sun/sys/cg6thc.h deleted file mode 100644 index cb8be0b158..0000000000 --- a/usr/src/uts/sun/sys/cg6thc.h +++ /dev/null @@ -1,334 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989, Sun Microsystems, Inc. - */ - -#ifndef _SYS_CG6THC_H -#define _SYS_CG6THC_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * TEC Hardware Configuration registers. - * - * Hardware register offsets from base address. These offsets are - * intended to be added to a pointer-to-integer whose value is the - * base address of the CG6 memory mapped register area. - */ - -/* hardware configuration registers */ - -#define L_THC_HCHS (0x800 / sizeof (uint32_t)) -#define L_THC_HCHSDVB (0x804 / sizeof (uint32_t)) -#define L_THC_HCHD (0x808 / sizeof (uint32_t)) -#define L_THC_HCVS (0x80C / sizeof (uint32_t)) -#define L_THC_HCVD (0x810 / sizeof (uint32_t)) -#define L_THC_HCREFRESH (0x814 / sizeof (uint32_t)) -#define L_THC_HCMISC (0x818 / sizeof (uint32_t)) - -#define THC_HCMISC_REV_SHIFT 16 -#define THC_HCMISC_REV_MASK 15 -#define THC_HCMISC_RESET 0x1000 -#define THC_HCMISC_VIDEO 0x0400 -#define THC_HCMISC_SYNC 0x0200 -#define THC_HCMISC_VSYNC 0x0100 -#define THC_HCMISC_SYNCEN 0x0080 -#define THC_HCMISC_CURSOR_RES 0x0040 -#define THC_HCMISC_INTEN 0x0020 -#define THC_HCMISC_INT 0x0010 - -#define THC_HCMISC_INIT 0x009f -#define THC_HCMISC_CLEAR_VBLANK_IRQ 0x008f - -#define thc_set_video(thc, on) \ - ((thc)->l_thc_hcmisc = \ - (thc)->l_thc_hcmisc & ~THC_HCMISC_VIDEO | \ - ((on) ? THC_HCMISC_VIDEO : 0)) - -#define thc_get_video(thc) \ - ((thc)->l_thc_hcmisc & THC_HCMISC_VIDEO) - -#define thc_int_enable(thc) \ - ((thc)->l_thc_hcmisc |= THC_HCMISC_INTEN) - -#define thc_int_disable(thc) \ - ((thc)->l_thc_hcmisc = \ - (thc)->l_thc_hcmisc & ~THC_HCMISC_INTEN | THC_HCMISC_INT) - -#define thc_int_pending(thc) \ - ((thc)->l_thc_hcmisc & THC_HCMISC_INT) - -/* cursor address register */ -#define L_THC_ADDRESS (0x8FC / sizeof (uint32_t)) - -/* cursor data registers, plane A */ -#define L_THC_CURSORA00 (0x900 / sizeof (uint32_t)) -#define L_THC_CURSORA01 (0x904 / sizeof (uint32_t)) -#define L_THC_CURSORA02 (0x908 / sizeof (uint32_t)) -#define L_THC_CURSORA03 (0x90C / sizeof (uint32_t)) -#define L_THC_CURSORA04 (0x910 / sizeof (uint32_t)) -#define L_THC_CURSORA05 (0x914 / sizeof (uint32_t)) -#define L_THC_CURSORA06 (0x918 / sizeof (uint32_t)) -#define L_THC_CURSORA07 (0x91C / sizeof (uint32_t)) -#define L_THC_CURSORA08 (0x920 / sizeof (uint32_t)) -#define L_THC_CURSORA09 (0x924 / sizeof (uint32_t)) -#define L_THC_CURSORA10 (0x928 / sizeof (uint32_t)) -#define L_THC_CURSORA11 (0x92C / sizeof (uint32_t)) -#define L_THC_CURSORA12 (0x930 / sizeof (uint32_t)) -#define L_THC_CURSORA13 (0x934 / sizeof (uint32_t)) -#define L_THC_CURSORA14 (0x938 / sizeof (uint32_t)) -#define L_THC_CURSORA15 (0x93C / sizeof (uint32_t)) -#define L_THC_CURSORA16 (0x940 / sizeof (uint32_t)) -#define L_THC_CURSORA17 (0x944 / sizeof (uint32_t)) -#define L_THC_CURSORA18 (0x948 / sizeof (uint32_t)) -#define L_THC_CURSORA19 (0x94C / sizeof (uint32_t)) -#define L_THC_CURSORA20 (0x950 / sizeof (uint32_t)) -#define L_THC_CURSORA21 (0x954 / sizeof (uint32_t)) -#define L_THC_CURSORA22 (0x958 / sizeof (uint32_t)) -#define L_THC_CURSORA23 (0x95C / sizeof (uint32_t)) -#define L_THC_CURSORA24 (0x960 / sizeof (uint32_t)) -#define L_THC_CURSORA25 (0x964 / sizeof (uint32_t)) -#define L_THC_CURSORA26 (0x968 / sizeof (uint32_t)) -#define L_THC_CURSORA27 (0x96C / sizeof (uint32_t)) -#define L_THC_CURSORA28 (0x970 / sizeof (uint32_t)) -#define L_THC_CURSORA29 (0x974 / sizeof (uint32_t)) -#define L_THC_CURSORA30 (0x978 / sizeof (uint32_t)) -#define L_THC_CURSORA31 (0x97C / sizeof (uint32_t)) - -/* cursor data registers, plane B */ -#define L_THC_CURSORB00 (0x980 / sizeof (uint32_t)) -#define L_THC_CURSORB01 (0x984 / sizeof (uint32_t)) -#define L_THC_CURSORB02 (0x988 / sizeof (uint32_t)) -#define L_THC_CURSORB03 (0x98C / sizeof (uint32_t)) -#define L_THC_CURSORB04 (0x990 / sizeof (uint32_t)) -#define L_THC_CURSORB05 (0x994 / sizeof (uint32_t)) -#define L_THC_CURSORB06 (0x998 / sizeof (uint32_t)) -#define L_THC_CURSORB07 (0x99C / sizeof (uint32_t)) -#define L_THC_CURSORB08 (0x9A0 / sizeof (uint32_t)) -#define L_THC_CURSORB09 (0x9A4 / sizeof (uint32_t)) -#define L_THC_CURSORB10 (0x9A8 / sizeof (uint32_t)) -#define L_THC_CURSORB11 (0x9AC / sizeof (uint32_t)) -#define L_THC_CURSORB12 (0x9B0 / sizeof (uint32_t)) -#define L_THC_CURSORB13 (0x9B4 / sizeof (uint32_t)) -#define L_THC_CURSORB14 (0x9B8 / sizeof (uint32_t)) -#define L_THC_CURSORB15 (0x9BC / sizeof (uint32_t)) -#define L_THC_CURSORB16 (0x9C0 / sizeof (uint32_t)) -#define L_THC_CURSORB17 (0x9C4 / sizeof (uint32_t)) -#define L_THC_CURSORB18 (0x9C8 / sizeof (uint32_t)) -#define L_THC_CURSORB19 (0x9CC / sizeof (uint32_t)) -#define L_THC_CURSORB20 (0x9D0 / sizeof (uint32_t)) -#define L_THC_CURSORB21 (0x9D4 / sizeof (uint32_t)) -#define L_THC_CURSORB22 (0x9D8 / sizeof (uint32_t)) -#define L_THC_CURSORB23 (0x9DC / sizeof (uint32_t)) -#define L_THC_CURSORB24 (0x9E0 / sizeof (uint32_t)) -#define L_THC_CURSORB25 (0x9E4 / sizeof (uint32_t)) -#define L_THC_CURSORB26 (0x9E8 / sizeof (uint32_t)) -#define L_THC_CURSORB27 (0x9EC / sizeof (uint32_t)) -#define L_THC_CURSORB28 (0x9F0 / sizeof (uint32_t)) -#define L_THC_CURSORB29 (0x9F4 / sizeof (uint32_t)) -#define L_THC_CURSORB30 (0x9F8 / sizeof (uint32_t)) -#define L_THC_CURSORB31 (0x9FC / sizeof (uint32_t)) - -/* - * THC Cursor ADDRESS register bits. - */ - -struct l_thc_cursor { - uint32_t l_thc_cursor_x : 16; /* X co-ordinate */ - uint32_t l_thc_cursor_y : 16; /* Y co-ordinate */ -}; - -/* - * THC Video Timing registers bits. - */ - -struct l_thc_hchs { - uint32_t : 9; /* not used */ - uint32_t l_thc_hchs_hss : 7; /* hor. sync start */ - uint32_t : 9; /* not used */ - uint32_t l_thc_hchs_hse : 7; /* hor. sync end */ -}; - -struct l_thc_hchsdvs { - uint32_t : 9; /* not used */ - uint32_t l_thc_hchsdvs_hss : 7; /* hor. sync end DVS */ - uint32_t : 5; /* not used */ - uint32_t l_thc_hchsdvs_hse : 11; /* current vert. line */ -}; - -struct l_thc_hchd { - uint32_t : 9; /* not used */ - uint32_t l_thc_hchd_hds : 7; /* hor. display start */ - uint32_t : 9; /* not used */ - uint32_t l_thc_hchd_hde : 7; /* hor. display end */ -}; - -struct l_thc_hcvs { - uint32_t : 5; /* not used */ - uint32_t l_thc_hcvs_vss : 11; /* vert. sync start */ - uint32_t : 5; /* not used */ - uint32_t l_thc_hcvs_hse : 11; /* vert. sync end */ -}; - -struct l_thc_hcvd { - uint32_t : 5; /* not used */ - uint32_t l_thc_hcvd_vds : 11; /* vert. display start */ - uint32_t : 5; /* not used */ - uint32_t l_thc_hcvd_hde : 11; /* vert. display end */ -}; - -struct l_thc_hcr { - uint32_t : 21; /* not used */ - uint32_t l_thc_hcr_clk : 11; /* refresh counter */ -}; - -/* - * THC HCMISC register bits. - */ - -typedef enum { - L_THC_HCMISC_VID_BLANK, L_THC_HCMISC_VID_DISPLAY -} l_thc_hcmisc_vid_t; - -typedef enum { - L_THC_HCMISC_INTR_IGNORE, L_THC_HCMISC_INTR_CLEAR, - L_THC_HCMISC_INTR_SET -} l_thc_hcmisc_intr_t; - -struct l_thc_hcmisc { - uint32_t : 12; /* unused */ - uint32_t l_thc_hcmisc_rev : 4; /* chip revision */ - uint32_t : 3; /* unused */ - uint32_t l_thc_hcmisc_reset : 1; /* reset */ - uint32_t : 1; /* unused */ - l_thc_hcmisc_vid_t l_thc_hcmisc_vid : 1; /* enable video */ - uint32_t l_thc_hcmisc_sync : 1; /* sync */ - uint32_t l_thc_hcmisc_vsync : 1; /* vsync */ - uint32_t l_thc_hcmisc_ensync : 1; /* enable sync */ - uint32_t l_thc_hcmisc_cures : 1; /* cursor resolution */ - l_thc_hcmisc_intr_t l_thc_hcmisc_intr : 2; /* enable interrupt */ - uint32_t l_thc_hcmisc_cycles : 4; /* cycles before xfer */ -}; - -/* - * define THC registers as a structure. - */ - -struct thc { - uint32_t l_thc_pad_0[512-0]; -#ifdef structures - struct l_thc_hchs l_thc_hchs; /* 512 */ - struct l_thc_hchsdvs l_thc_hchsdvs; /* 513 */ - struct l_thc_hchd l_thc_hchd; /* 514 */ - struct l_thc_hcvs l_thc_hcvs; /* 515 */ - struct l_thc_hcvd l_thc_hcvd; /* 516 */ - struct l_thc_hcr l_thc_hcr; /* 517 */ - struct l_thc_hcmisc l_thc_hcmisc; /* 518 */ - uint32_t l_thc_pad_519[575-519]; - struct l_thc_cursor l_thc_cursor; /* 575 */ -#else - uint32_t l_thc_hchs; /* 512 */ - uint32_t l_thc_hchsdvs; /* 513 */ - uint32_t l_thc_hchd; /* 514 */ - uint32_t l_thc_hcvs; /* 515 */ - uint32_t l_thc_hcvd; /* 516 */ - uint32_t l_thc_hcr; /* 517 */ - uint32_t l_thc_hcmisc; /* 518 */ - uint32_t l_thc_pad_519[575-519]; - uint32_t l_thc_cursor; /* 575 */ -#endif - uint32_t l_thc_cursora00; /* 576 */ - uint32_t l_thc_cursora01; /* 577 */ - uint32_t l_thc_cursora02; /* 578 */ - uint32_t l_thc_cursora03; /* 579 */ - uint32_t l_thc_cursora04; /* 580 */ - uint32_t l_thc_cursora05; /* 581 */ - uint32_t l_thc_cursora06; /* 582 */ - uint32_t l_thc_cursora07; /* 583 */ - uint32_t l_thc_cursora08; /* 584 */ - uint32_t l_thc_cursora09; /* 585 */ - uint32_t l_thc_cursora10; /* 586 */ - uint32_t l_thc_cursora11; /* 587 */ - uint32_t l_thc_cursora12; /* 588 */ - uint32_t l_thc_cursora13; /* 589 */ - uint32_t l_thc_cursora14; /* 590 */ - uint32_t l_thc_cursora15; /* 591 */ - uint32_t l_thc_cursora16; /* 592 */ - uint32_t l_thc_cursora17; /* 593 */ - uint32_t l_thc_cursora18; /* 594 */ - uint32_t l_thc_cursora19; /* 595 */ - uint32_t l_thc_cursora20; /* 596 */ - uint32_t l_thc_cursora21; /* 597 */ - uint32_t l_thc_cursora22; /* 598 */ - uint32_t l_thc_cursora23; /* 599 */ - uint32_t l_thc_cursora24; /* 600 */ - uint32_t l_thc_cursora25; /* 601 */ - uint32_t l_thc_cursora26; /* 602 */ - uint32_t l_thc_cursora27; /* 603 */ - uint32_t l_thc_cursora28; /* 604 */ - uint32_t l_thc_cursora29; /* 605 */ - uint32_t l_thc_cursora30; /* 606 */ - uint32_t l_thc_cursora31; /* 607 */ - uint32_t l_thc_cursorb00; /* 608 */ - uint32_t l_thc_cursorb01; /* 609 */ - uint32_t l_thc_cursorb02; /* 610 */ - uint32_t l_thc_cursorb03; /* 611 */ - uint32_t l_thc_cursorb04; /* 612 */ - uint32_t l_thc_cursorb05; /* 613 */ - uint32_t l_thc_cursorb06; /* 614 */ - uint32_t l_thc_cursorb07; /* 615 */ - uint32_t l_thc_cursorb08; /* 616 */ - uint32_t l_thc_cursorb09; /* 617 */ - uint32_t l_thc_cursorb10; /* 618 */ - uint32_t l_thc_cursorb11; /* 619 */ - uint32_t l_thc_cursorb12; /* 620 */ - uint32_t l_thc_cursorb13; /* 621 */ - uint32_t l_thc_cursorb14; /* 622 */ - uint32_t l_thc_cursorb15; /* 623 */ - uint32_t l_thc_cursorb16; /* 624 */ - uint32_t l_thc_cursorb17; /* 625 */ - uint32_t l_thc_cursorb18; /* 626 */ - uint32_t l_thc_cursorb19; /* 627 */ - uint32_t l_thc_cursorb20; /* 628 */ - uint32_t l_thc_cursorb21; /* 629 */ - uint32_t l_thc_cursorb22; /* 630 */ - uint32_t l_thc_cursorb23; /* 631 */ - uint32_t l_thc_cursorb24; /* 632 */ - uint32_t l_thc_cursorb25; /* 633 */ - uint32_t l_thc_cursorb26; /* 634 */ - uint32_t l_thc_cursorb27; /* 635 */ - uint32_t l_thc_cursorb28; /* 636 */ - uint32_t l_thc_cursorb29; /* 637 */ - uint32_t l_thc_cursorb30; /* 638 */ - uint32_t l_thc_cursorb31; /* 639 */ -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_CG6THC_H */ diff --git a/usr/src/uts/sun/sys/cg6var.h b/usr/src/uts/sun/sys/cg6var.h deleted file mode 100644 index 7bc3bd7c56..0000000000 --- a/usr/src/uts/sun/sys/cg6var.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1988-1989,1997-1998 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _SYS_CG6VAR_H -#define _SYS_CG6VAR_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS-4.1 1.8 */ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef FBC_REV0 -#define FBC_REV0 1 /* include FBC0 support if set */ -#endif - -#include <sys/cg6fbc.h> -#include <sys/cg6tec.h> -#include <sys/cg6thc.h> - -#define CG6_DEPTH 8 - -#include <sys/memvar.h> -#include <sys/pr_impl_util.h> - -/* FBIOSATTR device specific array indices */ -#define FB_ATTR_CG6_SETOWNER_CMD 0 -#define FB_ATTR_CG6_SETOWNER_PID 1 - -#ifndef _KERNEL - -/* pixrect private data */ -struct cg6pr { - struct mprp_data mprp; /* memory pixrect simulator */ - int fd; /* device file descriptor */ - struct pr_size cg6_size; /* screen size */ - struct fbc *cg6_fbc; /* FBC base */ - struct tec *cg6_tec; /* TEC base */ -}; - -/* pixrect ops vector */ -extern struct pixrectops cg6_ops; - -Pixrect *cg6_make(); - -/* int cg6_rop(); */ -int cg6_stencil(); -int cg6_batchrop(); -int cg6_destroy(); -int cg6_get(); -int cg6_put(); -int cg6_vector(); -Pixrect *cg6_region(); -/* int cg6_putcolormap(); */ -int cg6_getcolormap(); -int cg6_putattributes(); -int cg6_getattributes(); - -/* macros */ - -#define cg6_d(pr) ((struct cg6pr *)(pr)->pr_data) - - - -#define cg6_waitidle(fbc) \ - do {; } while ((fbc)->l_fbc_status & L_FBC_BUSY) - -#define cg6_setfontxy(fbc, x0, x1, y) \ - ((fbc)->l_fbc_x0 = (x0), \ - (fbc)->l_fbc_x1 = (x1), \ - (fbc)->l_fbc_y0 = (y)) - -#define cg6_setinx(fbc, x, y) \ - ((fbc)->l_fbc_autoincx = (x), \ - (fbc)->l_fbc_autoincy = (y)) - -/* - * return draw status, if full loop until registers available before returning. - */ -#define cg6_draw_done(fbc, r) \ - do \ - (r) = (int)(fbc)->l_fbc_drawstatus; \ - while ((int)(r) < 0 && (r & L_FBC_FULL)) - -/* - * set clip area. - */ -#define cg6_clip(fbc, x_min, y_min, x_max, y_max) \ - ((fbc)->l_fbc_clipminx = (x_min), \ - (fbc)->l_fbc_clipminy = (y_min), \ - (fbc)->l_fbc_clipmaxx = (x_max), \ - (fbc)->l_fbc_clipmaxy = (y_max)) - -#define cg6_color_mode(fbc, mode) \ - (* ((uint32_t *)&(fbc)->l_fbc_misc) = \ - (uint32_t)L_FBC_MISC_BLIT_NOSRC << 20 | \ - ((uint32_t)(mode) & 3) << 17 | /* data */ \ - (uint32_t)L_FBC_MISC_DRAW_RENDER << 15) - -extern uint_t cg6_rop_table[]; - -#define cg6_setregs(fbc, x, y, rop, planemask, fcolor, patt, polyg) _STMT(\ - (fbc)->l_fbc_rasteroffx = (x); \ - (fbc)->l_fbc_rasteroffy = (y); \ - (fbc)->l_fbc_fcolor = (fcolor); \ - cg6_waitidle(fbc); \ - (fbc)->l_fbc_status = 0; \ - * ((uint32_t *)&(fbc)->l_fbc_rasterop) = \ - ((uint32_t)(patt) & 3) << 26 | \ - ((uint32_t)(polyg) & 3) << 24 | \ - (uint32_t)L_FBC_RASTEROP_ATTR_SUPP << 22 | \ - (uint32_t)L_FBC_RASTEROP_RAST_BOOL << 17 | \ - (uint32_t)cg6_rop_table[(rop)]; \ - (fbc)->l_fbc_planemask = (planemask); \ - /* can set this before idle in FBC1 */ \ - (fbc)->l_fbc_clipcheck = 0; \ -) - -/* - * FBC0 workarounds - */ -#if FBC_REV0 -int cg6_vector0(); - -#define fbc_rev0(fbc) ((((char *)(fbc))[1] & 0xf0) == 0) - -#define cg6_draw_done0(fbc, x0, x1, r) \ - if (((fbc)->l_fbc_status & L_FBC_DRAW_INTERSECT) && \ - ((x0) < 0 || (x1) < 0)) \ - (r) = L_FBC_DRAW_EXCEPTION; \ - else cg6_draw_done((fbc), (r)) -#else /* FBC_REV0 */ -#define fbc_rev0(fbc) (0) -#define cg6_draw_done0(fbc, x0, x1, r) \ - cg6_draw_done((fbc), (r)) -#endif /* FBC_REV0 */ - -#endif /* _KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_CG6VAR_H */ diff --git a/usr/src/uts/sun/sys/memvar.h b/usr/src/uts/sun/sys/memvar.h deleted file mode 100644 index 5ee93c6811..0000000000 --- a/usr/src/uts/sun/sys/memvar.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1986-2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_MEMVAR_H -#define _SYS_MEMVAR_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.1.2 1.45 */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * A memory pixrect is a special type of pixrect. Its image resides in - * memory, in a publicly known format permitting more direct access to the - * image than possible with the general pixrectops. - * - * In the memory pixrect the image is stored in consecutive memory locations, - * across the row from left to right, and then from top to bottom. Each row - * is padded to a 16-bit or 32-bit boundary (for details refer to the Pixrect - * Reference Manual). - * - * The depth of a pixel is the number of bits required to represent it. - * Pixels are placed in consecutive fields of width the depth of each pixel, - * with placement being independent of word or byte boundaries. - */ -struct mpr_data { - int md_linebytes; /* number of bytes from one line to next */ - short *md_image; /* word address */ - struct pr_pos md_offset; - short md_primary; - short md_flags; /* Flag bits, see below */ -}; - -/* pixrect data for memory pixrect with plane mask (MP_PLANEMASK set) */ -struct mprp_data { - struct mpr_data mpr; - int planes; -}; - -#define mpr_d(pr) ((struct mpr_data *)(pr)->pr_data) -#define mprp_d(pr) ((struct mprp_data *)(pr)->pr_data) - -/* md_flags bits definitions */ - -#define MP_REVERSEVIDEO 1 /* Pixrect is reverse video */ - /* (should only be set if pr_depth = 1) */ -#define MP_DISPLAY 2 /* Pixrect is a frame buffer device */ -#define MP_PLANEMASK 4 /* Pixrect has a plane mask */ - /* (should only be set if pr_depth > 1) */ -#if defined(__i386) -#define MP_I386 8 /* Pixrect is for 386 architecture */ -#define MP_STATIC 16 /* Pixrect is a static pixrect */ -#endif -#define MP_FONT 32 /* Pixrect is a part of a Pixfont */ - /* (hint to pr_batchrop) */ - -/* - * Each line (row) of the pixrect is padded to be a multiple - * of this many bits - */ -#define MPR_LINEBITPAD 16 - -#define mpr_linebytes(x, depth) \ - (((pr_product(x, depth) + (MPR_LINEBITPAD-1)) >> 3) &~ 1) -#define mpr_prlinebytes(mpr) \ - mpr_linebytes((mpr)->pr_size.x, (mpr)->pr_depth) -#define mpr_mdlinebytes(mpr) \ - (mpr_d(mpr)->md_linebytes) - -#define mprd_addr(mprd, xo, yo) \ - ((short *)(\ - (int)(mprd)->md_image \ - + pr_product((mprd)->md_linebytes, (mprd)->md_offset.y+(yo)) \ - + (((mprd)->md_offset.x+(xo)) >> 3) &~ 1)) - -#define mprd8_addr(mprd, xo, yo, d) \ - ((uchar_t *)(\ - (int)(mprd)->md_image \ - + pr_product((mprd)->md_linebytes, (mprd)->md_offset.y+(yo)) \ - + (pr_product((mprd)->md_offset.x+(xo), (d)) >> 3))) - -#define mprd_skew(mprd, xo, yo) \ - (((mprd)->md_offset.x + (xo)) & 15) - -#define mprs_addr(mprs) _mprs_addr((struct pr_prpos *)&(mprs)) -#define mprs8_addr(mprs) _mprs8_addr((struct pr_prpos *)&(mprs)) -#define mprs_skew(mprs) _mprs_skew((struct pr_prpos *)&(mprs)) - -#if !defined __lint || !defined _KERNEL || defined(sun2) -short *_mprs_addr(); -uchar_t *_mprs8_addr(); -int _mprs_skew(); -#endif - -/* - * Static pixrects. A pixrect may be created at compile time using the - * mpr_static macro as part of the static declarations of a program. Thus - * mpr_static(cursor, 16, 16, 1, rawcursordata); - * will declare and initialize (using rawcursordata) the storage needed - * for a pixrect that may be referred to as 'cursor' subsequently in the - * same file, or as &cursor if a pointer to that pixrect is called for rather - * than the pixrect itself. - */ - -/* - * First a pair of utility macros that allow concatenation in a fashion that - * won't annoy lint (These belong in a standard header file!): - */ -#if defined(__STDC__) && !defined(__LIBCPP__) - -#ifndef CAT -#define CAT(a, b) a##b -#endif - -#else /* __STDC__ */ - -#ifndef CAT -#undef IDENT -#define IDENT(x) x -#define CAT(a, b) IDENT(a)b -#endif - -#endif /* __STDC__ */ - -#define mpr_static(name, w, h, d, image) \ - struct mpr_data CAT(name, _data) = \ - {mpr_linebytes(w, d), (short *)(image), {0, 0}, 0, 0}; \ - Pixrect name = {&mem_ops, w, h, d, (caddr_t)&CAT(name, _data)} - -/* static pixrect with variables declared "static" */ -#define mpr_static_static(name, w, h, d, image) \ - static struct mpr_data CAT(name, _data) = \ - {mpr_linebytes(w, d), (short *)(image), {0, 0}, 0, 0}; \ - static Pixrect name = {&mem_ops, w, h, d, (caddr_t)&CAT(name, _data)} - -/* - * During rop calls need to determine if dst/src is something that - * mem_rop() can handle. Use the following macro to find out. - */ -#define MP_NOTMPR(pr) ((pr)->pr_ops->pro_rop != mem_rop) - -extern struct pixrectops mem_ops; - -int mem_rop(); -#ifndef _KERNEL -int mem_stencil(); -int mem_batchrop(); -Pixrect *mem_create(); /* General mpr create routine */ -Pixrect *mem_point(); /* Even more general mpr create */ -int mem_destroy(); -int mem_get(); -int mem_put(); -int mem_vector(); -Pixrect *mem_region(); -#endif /* _KERNEL */ -int mem_putcolormap(); -int mem_putattributes(); -#ifndef _KERNEL -int mem_getcolormap(); -int mem_getattributes(); -#endif /* _KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_MEMVAR_H */ diff --git a/usr/src/uts/sun/sys/pr_impl_util.h b/usr/src/uts/sun/sys/pr_impl_util.h deleted file mode 100644 index 95609772df..0000000000 --- a/usr/src/uts/sun/sys/pr_impl_util.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Pixrect implementation utilities - */ - -#ifndef _SYS_PR_IMPL_UTIL_H -#define _SYS_PR_IMPL_UTIL_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS 1.10 */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Reiser cpp concatenation macros (which don't work in ANSI-C) */ -#if defined(__STDC__) && !defined(__LIBCPP__) - -#ifndef _CAT -#define _CAT(a, b) a##b -#endif - -#else /* __STDC__ */ - -#ifndef _CAT -#undef _IDENT -#define _IDENT(x) x -#define _CAT(a, b) _IDENT(a)b -#endif - -#endif /* __STDC__ */ - -/* code selection macros */ -#define IFTRUE(a, b) a -#define IFFALSE(a, b) b - -/* and together multiple options */ -#define IFAND IFAND2 -#define IFAND2(opt1, opt2, a, b) opt1(opt2(a, b), b) -#define IFAND3(opt1, opt2, opt3, a, b) opt1(opt2(opt3(a, b), b), b) -#define IFAND4(opt1, opt2, opt3, opt4, a, b) \ - opt1(opt2(opt3(opt4(a, b), b), b), b) -#define IFAND5(opt1, opt2, opt3, opt4, opt5, a, b) \ - opt1(opt2(opt3(opt4(opt5(a, b), b), b), b), b) -#define IFAND6(opt1, opt2, opt3, opt4, opt5, opt6, a, b) \ - opt1(opt2(opt3(opt4(opt5(opt6(a, b), b), b), b), b), b) - -#ifdef _KERNEL -#define IFKERNEL IFTRUE -#else -#define IFKERNEL IFFALSE -#endif - -/* lint */ -#ifdef __lint - -#define IFLINT IFTRUE - -int _ZERO_; /* "constant in conditional context" workaround */ -#define _ONE_ (!_ZERO_) -int _loop; /* "_loop redefinition hides earlier one" */ - -#else /* __lint */ - -#define IFLINT IFFALSE - -#define _ZERO_ 0 -#define _ONE_ 1 - -#endif /* __lint */ - -/* portability aids */ -#ifdef mc68000 - -#define IF68000 IFTRUE - -typedef caddr_t INT_T; /* pseudo-integer type (address register) */ -typedef ulong_t PTR_T; /* pseudo-pointer type (data register) */ -typedef short LOOP_T; /* loop variable (for dbra loops) */ - -#define LOOP_DECR(var) (--(var) != -1) - -#else /* mc68000 */ - -#define IF68000 IFFALSE - -typedef int INT_T; -typedef caddr_t PTR_T; -typedef int LOOP_T; - -#define LOOP_DECR(var) (--(var) >= 0) - -#endif /* mc68000 */ - -#if defined(__sparc) -#define IFSPARC IFTRUE -#else -#define IFSPARC IFFALSE -#endif - -/* true if we can make 32 bit accesses on 16 bit boundaries */ -#ifndef SHORT_ALIGN -#define SHORT_ALIGN (!defined(__sparc)) -#endif - -#if SHORT_ALIGN -#define IFSHORT_ALIGN IFTRUE -#else -#define IFSHORT_ALIGN IFFALSE -#endif - - -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN (defined(__i386) || defined(__amd64)) -#endif - -#if LITTLE_ENDIAN -#define ENDIAN IFTRUE -#else -#define ENDIAN IFFALSE -#endif - -/* - * SunOS release number - * warning: these tests are fragile - */ -#if defined(__sun) && !defined(SUNOS) -#ifdef _sys_types_h -#define SUNOS 41 -#else /* _sys_types_h */ -#ifdef NFDBITS -#define SUNOS 40 -#else /* NFDBITS */ -#define SUNOS 35 -#endif /* NFDBITS */ -#endif /* _sys_types_h */ -#endif - -#if SUNOS >= 40 -#define IFSUNOS4 IFTRUE -#else -#define IFSUNOS4 IFFALSE -#endif - -#if SUNOS >= 41 -#define IFSUNOS41 IFTRUE -#else -#define IFSUNOS41 IFFALSE -#endif - - -/* - * misc. macros - */ - -/* statement macro */ -#define _STMT(op) do { op } while (_ZERO_) - -/* loop macros */ -#define PR_LOOPVP(var, op) do { op; } while (LOOP_DECR(var)) -#define PR_LOOPV(var, op) _STMT(while (LOOP_DECR(var)) { op; }) -#define PR_LOOPP(count, op) _STMT(\ - IFLINT(, register LOOP_T) _loop = (count); PR_LOOPVP(_loop, op); \ -) -#define PR_LOOP(count, op) _STMT(\ - IFLINT(, register LOOP_T) _loop = (count); PR_LOOPV(_loop, op); \ -) - -/* pointer manipulation */ -#define PTR_ADD(p, incr) ((caddr_t)(p) + (incr)) -#define PTR_INCR(type, p, incr) (p = (type) ((caddr_t)(p) + (incr))) - -/* unshifted pixrect op codes */ -#define PIX_OPSRC (12) -#define PIX_OPDST (10) -#define PIX_OPNOT(op) ((op) ^ 15) -#define PIX_OPCLR (0) -#define PIX_OPSET (15) - -/* extract color and op code fields */ -#define PIXOP_COLOR(op) ((op) >> 5) -#define PIXOP_OP(op) ((op) >> 1 & 15) - -/* reverse video src or dst */ -#define PIX_OP_REVERSESRC(op) (((op) & 3) << 2 | (op) >> 2 & 3) -#define PIX_OP_REVERSEDST(op) ((~(op) & 5) << 1 | ~(op) >> 1 & 0x5) - -/* determine if op needs src or dst */ -#define PIX_OP_NEEDS_SRC(op) (((op) >> 2 ^ (op)) & 3) -#define PIX_OP_NEEDS_DST(op) (((op) >> 1 ^ (op)) & 5) - -/* misc. data types */ -typedef short MPR_T; /* type used for memory pixrect data */ -typedef ushort_t UMPR_T; /* unsigned equivalent of MPR_T */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_PR_IMPL_UTIL_H */ diff --git a/usr/src/uts/sun/sys/pr_planegroups.h b/usr/src/uts/sun/sys/pr_planegroups.h deleted file mode 100644 index 1af243fc34..0000000000 --- a/usr/src/uts/sun/sys/pr_planegroups.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1986, by Sun Microsystems, Inc. - */ - -#ifndef _SYS_PR_PLANEGROUPS_H -#define _SYS_PR_PLANEGROUPS_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS 1.13 */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Masks for frame buffer planes and plane group number */ -#define PIX_ALL_PLANES 0x00FFFFFF -#define PIX_GROUP_MASK 0x7F - -/* Macros to encode or extract group into or from attribute word */ -#define PIX_GROUP(g) ((g) << 25) -#define PIX_ATTRGROUP(attr) ((unsigned)(attr) >> 25) - -/* Flag bit which inhibits plane mask setting (for setting group only) */ -#define PIX_DONT_SET_PLANES (1 << 24) - -/* Plane groups definitions */ -/* !!! NOTE: Be sure to increment LAST_PLUS_ONE as new groups are added !!! */ - -#define PIXPG_CURRENT 0 -#define PIXPG_MONO 1 -#define PIXPG_8BIT_COLOR 2 -#define PIXPG_OVERLAY_ENABLE 3 -#define PIXPG_OVERLAY 4 -#define PIXPG_24BIT_COLOR 5 -#define PIXPG_VIDEO 6 -#define PIXPG_VIDEO_ENABLE 7 -#define PIXPG_TRANSPARENT_OVERLAY 8 -#define PIXPG_WID 9 /* Window Id */ -#define PIXPG_ZBUF 10 /* Z (depth) buffer */ -#define PIXPG_CURSOR_ENABLE 11 -#define PIXPG_CURSOR 12 -#define PIXPG_LAST_PLUS_ONE 13 /* array decls and loop termination */ -#define PIXPG_4BIT_OVERLAY 123 -#define PIXPG_ALT_COLOR 124 -#define PIXPG_A12BIT_COLOR 125 -#define PIXPG_B12BIT_COLOR 126 -#define PIXPG_INVALID 127 - -#define MAKEPLNGRP(pg) (1 << (pg)) - -/* Plane groups functions */ -extern int pr_available_plane_groups(); -extern int pr_get_plane_group(); -extern void pr_set_plane_group(); -extern void pr_set_planes(); - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_PR_PLANEGROUPS_H */ diff --git a/usr/src/uts/sun/sys/ramdac.h b/usr/src/uts/sun/sys/ramdac.h deleted file mode 100644 index 5bee804915..0000000000 --- a/usr/src/uts/sun/sys/ramdac.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1991, by Sun Microsystems, Inc. - */ - -#ifndef _SYS_RAMDAC_H -#define _SYS_RAMDAC_H - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS-4.1 1.2 */ - -#include <sys/pixrect.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define RAMDAC_READMASK 04 -#define RAMDAC_BLINKMASK 05 -#define RAMDAC_COMMAND 06 -#define RAMDAC_CTRLTEST 07 - -/* 3 Brooktree ramdac 457 or 458 packed in a 32-bit register */ -/* fbunit defined in <pixrect/pixrect.h> */ -struct ramdac { - union fbunit addr_reg, /* address register */ - lut_data, /* lut data port */ - command, /* command/control port */ - overlay; /* overlay lut port */ -}; - -#define ASSIGN_LUT(lut, value) (lut).packed = (value & 0xff) | \ - ((value & 0xff) << 8) | ((value & 0xff) << 16) -/* - * when "ctrl/test" is selected, the least significant 3 bits control - * which channel this ramdac is controlling. - * - * select 4:1 multiplexing to make enable/overlay possible, also makes - * the overlay transparent and display the overlay plane only. - * - * enable read and write to all planes - * - * no blinking - */ - -#define INIT_BT458(lut) { \ - ASSIGN_LUT((lut)->addr_reg, 0); \ - ASSIGN_LUT((lut)->addr_reg, RAMDAC_CTRLTEST); \ - ASSIGN_LUT((lut)->command, 04); \ - ASSIGN_LUT((lut)->addr_reg, RAMDAC_COMMAND); \ - ASSIGN_LUT((lut)->command, 0x43); \ - ASSIGN_LUT((lut)->addr_reg, RAMDAC_READMASK); \ - ASSIGN_LUT((lut)->command, 0xff); \ - ASSIGN_LUT((lut)->addr_reg, RAMDAC_BLINKMASK); \ - ASSIGN_LUT((lut)->command, 0); \ - } - -#define INIT_OCMAP(omap) { \ - (omap)[0].packed = 0x000000; \ - (omap)[1].packed = 0xffffff; \ - (omap)[2].packed = 0x00ff00; \ - (omap)[3].packed = 0x000000; \ - } - -#define INIT_CMAP(cmap, size) { \ - register int idx; \ - for (idx = 0; idx < size; idx++) \ - ASSIGN_LUT((cmap)[idx], idx); \ - } - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_RAMDAC_H */ |