Home | History | Annotate | Line # | Download | only in dev
crmfbreg.h revision 1.1
      1  1.1  macallan /* $NetBSD: crmfbreg.h,v 1.1 2007/07/26 02:25:14 macallan Exp $ */
      2  1.1  macallan 
      3  1.1  macallan /*-
      4  1.1  macallan  * Copyright (c) 2007 Jared D. McNeill <jmcneill (at) invisible.ca>
      5  1.1  macallan  * All rights reserved.
      6  1.1  macallan  *
      7  1.1  macallan  * Redistribution and use in source and binary forms, with or without
      8  1.1  macallan  * modification, are permitted provided that the following conditions
      9  1.1  macallan  * are met:
     10  1.1  macallan  * 1. Redistributions of source code must retain the above copyright
     11  1.1  macallan  *    notice, this list of conditions and the following disclaimer.
     12  1.1  macallan  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  macallan  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  macallan  *    documentation and/or other materials provided with the distribution.
     15  1.1  macallan  * 3. All advertising materials mentioning features or use of this software
     16  1.1  macallan  *    must display the following acknowledgement:
     17  1.1  macallan  *        This product includes software developed by Jared D. McNeill.
     18  1.1  macallan  * 4. Neither the name of The NetBSD Foundation nor the names of its
     19  1.1  macallan  *    contributors may be used to endorse or promote products derived
     20  1.1  macallan  *    from this software without specific prior written permission.
     21  1.1  macallan  *
     22  1.1  macallan  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     23  1.1  macallan  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     24  1.1  macallan  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     25  1.1  macallan  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     26  1.1  macallan  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     27  1.1  macallan  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     28  1.1  macallan  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     29  1.1  macallan  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     30  1.1  macallan  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     31  1.1  macallan  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     32  1.1  macallan  * POSSIBILITY OF SUCH DAMAGE.
     33  1.1  macallan  */
     34  1.1  macallan 
     35  1.1  macallan /*
     36  1.1  macallan  * SGI-CRM (O2) Framebuffer driver, register definitions
     37  1.1  macallan  */
     38  1.1  macallan 
     39  1.1  macallan #ifndef CRMFBREG_H
     40  1.1  macallan #define CRMFBREG_H
     41  1.1  macallan 
     42  1.1  macallan #define CRMFB_DOTCLOCK		0x00000004
     43  1.1  macallan #define		CRMFB_DOTCLOCK_CLKRUN_SHIFT	20
     44  1.1  macallan #define CRMFB_VT_XY		0x00010000
     45  1.1  macallan #define		CRMFB_VT_XY_FREEZE_SHIFT	31
     46  1.1  macallan #define CRMFB_VT_INTR01		0x00010020
     47  1.1  macallan #define		CRMFB_VT_INTR01_EN		0xffffffff
     48  1.1  macallan #define CRMFB_VT_INTR23		0x00010024
     49  1.1  macallan #define		CRMFB_VT_INTR23_EN		0xffffffff
     50  1.1  macallan #define CRMFB_VT_VPIX_EN	0x00010038
     51  1.1  macallan #define		CRMFB_VT_VPIX_EN_OFF_SHIFT	0
     52  1.1  macallan #define CRMFB_VT_VCMAP		0x0001003c
     53  1.1  macallan #define		CRMFB_VT_VCMAP_ON_SHIFT		12
     54  1.1  macallan #define CRMFB_VT_HCMAP		0x00010040
     55  1.1  macallan #define		CRMFB_VT_HCMAP_ON_SHIFT		12
     56  1.1  macallan #define CRMFB_OVR_WIDTH_TILE	0x00020000
     57  1.1  macallan #define CRMFB_OVR_CONTROL	0x00020008
     58  1.1  macallan #define		CRMFB_OVR_CONTROL_DMAEN_SHIFT	0
     59  1.1  macallan #define CRMFB_FRM_TILESIZE	0x00030000
     60  1.1  macallan #define		CRMFB_FRM_TILESIZE_RHS_SHIFT	0
     61  1.1  macallan #define		CRMFB_FRM_TILESIZE_WIDTH_SHIFT	5
     62  1.1  macallan #define		CRMFB_FRM_TILESIZE_DEPTH_SHIFT	13
     63  1.1  macallan #define			CRMFB_FRM_TILESIZE_DEPTH_8	0
     64  1.1  macallan #define			CRMFB_FRM_TILESIZE_DEPTH_16	1
     65  1.1  macallan #define			CRMFB_FRM_TILESIZE_DEPTH_32	2
     66  1.1  macallan #define		CRMFB_FRM_TILESIZE_FIFOR_SHIFT	15
     67  1.1  macallan #define CRMFB_FRM_PIXSIZE	0x00030004
     68  1.1  macallan #define		CRMFB_FRM_PIXSIZE_HEIGHT_SHIFT	16
     69  1.1  macallan #define CRMFB_FRM_CONTROL	0x0003000c
     70  1.1  macallan #define		CRMFB_FRM_CONTROL_DMAEN_SHIFT	0
     71  1.1  macallan #define		CRMFB_FRM_CONTROL_LINEAR_SHIFT	1
     72  1.1  macallan #define		CRMFB_FRM_CONTROL_TILEPTR_SHIFT	9
     73  1.1  macallan #define CRMFB_DID_CONTROL	0x00040004
     74  1.1  macallan #define		CRMFB_DID_CONTROL_DMAEN_SHIFT	0
     75  1.1  macallan #define CRMFB_MODE		0x00048000
     76  1.1  macallan #define		CRMFB_MODE_TYP_SHIFT		2
     77  1.1  macallan #define			CRMFB_MODE_TYP_I8	0
     78  1.1  macallan #define			CRMFB_MODE_TYP_ARGB5	4
     79  1.1  macallan #define			CRMFB_MODE_TYP_RGB8	5
     80  1.1  macallan #define		CRMFB_MODE_BUF_SHIFT		0
     81  1.1  macallan #define			CRMFB_MODE_BUF_BOTH	3
     82  1.1  macallan #define CRMFB_CMAP		0x00050000
     83  1.1  macallan #define CRMFB_CMAP_FIFO		0x00058000
     84  1.1  macallan #define CRMFB_GMAP		0x00060000
     85  1.1  macallan #define CRMFB_CURSOR_POS	0x00070000
     86  1.1  macallan /*
     87  1.1  macallan  * upper 16 bit are Y, lower 16 bit are X - both signed so there's no need for
     88  1.1  macallan  * a hotspot register
     89  1.1  macallan  */
     90  1.1  macallan #define CRMFB_CURSOR_CONTROL	0x00070004
     91  1.1  macallan 	#define CRMFB_CURSOR_ON		0x00000001
     92  1.1  macallan #define CRMFB_CURSOR_CMAP0	0x00070008
     93  1.1  macallan #define CRMFB_CURSOR_CMAP1	0x0007000c
     94  1.1  macallan #define CRMFB_CURSOR_CMAP2	0x00070010
     95  1.1  macallan #define CRMFB_CURSOR_BITMAP	0x00078000
     96  1.1  macallan /* two bit deep cursor image, zero is transparent */
     97  1.1  macallan 
     98  1.1  macallan /* rendering engine registers */
     99  1.1  macallan #define CRIME_RE_TLB_A		0x1000
    100  1.1  macallan #define CRIME_RE_TLB_B		0x1200
    101  1.1  macallan #define CRIME_RE_TLB_C		0x1400
    102  1.1  macallan #define CRIME_RE_TEX		0x1600
    103  1.1  macallan #define CRIME_RE_CLIP_IDS	0x16e0
    104  1.1  macallan #define CRIME_RE_LINEAR_A	0x1700
    105  1.1  macallan #define CRIME_RE_LINEAR_B	0x1780
    106  1.1  macallan 
    107  1.1  macallan /* memory transfer engine from 0x3000*/
    108  1.1  macallan #define CRIME_MTE_MODE		0x3000
    109  1.1  macallan #define CRIME_MTE_BYTEMASK	0x3008
    110  1.1  macallan #define CRIME_MTE_STIPPLEMASK	0x3010
    111  1.1  macallan #define CRIME_MTE_BG		0x3018
    112  1.1  macallan #define CROME_MTE_SOURCE0	0x3020
    113  1.1  macallan #define CRIME_MTE_SOURCE1	0x3028
    114  1.1  macallan #define CROME_MTE_DEST0		0x3030
    115  1.1  macallan #define CRIME_MTE_DEST1		0x3038
    116  1.1  macallan #define CRIME_MTE_SRC_STRIDE	0x3040
    117  1.1  macallan #define CRIME_MTE_DST_STRIDE	0x3048
    118  1.1  macallan #define CRIME_MTE_NULL		0x3070
    119  1.1  macallan #define CRIME_MTE_FLUSH		0x3078
    120  1.1  macallan 
    121  1.1  macallan #endif /* CRMFBREG_H */
    122