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