2.2.0-final
[davej-history.git] / drivers / video / pm2fb.h
blob94f3464270c7e6d6542ee8ea01da1f002b889577
1 /*
2 * Permedia2 framebuffer driver definitions.
3 * Copyright (c) 1998-1999 Ilario Nardinocchi (nardinoc@CS.UniBO.IT)
4 * --------------------------------------------------------------------------
5 * $Id: pm2fb.h,v 1.1.2.1 1999/01/12 19:53:02 geert Exp $
6 * --------------------------------------------------------------------------
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file README.legal in the main directory of this archive
9 * for more details.
12 #ifndef PM2FB_H
13 #define PM2FB_H
15 #define PM2_REFERENCE_CLOCK 14318 /* in KHz */
16 #define PM2_MAX_PIXCLOCK 230000 /* in KHz */
17 #define PM2_REGS_SIZE 0x10000
19 #define PM2TAG(r) (unsigned long )(((r)-0x8000)>>3)
21 /*****************************************************************************
22 * Permedia2 registers used in the framebuffer
23 *****************************************************************************/
25 #define PM2R_RESET_STATUS 0x0000
26 #define PM2R_IN_FIFO_SPACE 0x0018
27 #define PM2R_OUT_FIFO_WORDS 0x0020
28 #define PM2R_APERTURE_ONE 0x0050
29 #define PM2R_APERTURE_TWO 0x0058
30 #define PM2R_FIFO_DISCON 0x0068
31 #define PM2R_CHIP_CONFIG 0x0070
33 #define PM2R_REBOOT 0x1000
34 #define PM2R_MEM_CONTROL 0x1040
35 #define PM2R_BOOT_ADDRESS 0x1080
36 #define PM2R_MEM_CONFIG 0x10c0
37 #define PM2R_BYPASS_WRITE_MASK 0x1100
38 #define PM2R_FRAMEBUFFER_WRITE_MASK 0x1140
40 #define PM2R_OUT_FIFO 0x2000
42 #define PM2R_SCREEN_BASE 0x3000
43 #define PM2R_SCREEN_STRIDE 0x3008
44 #define PM2R_H_TOTAL 0x3010
45 #define PM2R_HG_END 0x3018
46 #define PM2R_HB_END 0x3020
47 #define PM2R_HS_START 0x3028
48 #define PM2R_HS_END 0x3030
49 #define PM2R_V_TOTAL 0x3038
50 #define PM2R_VB_END 0x3040
51 #define PM2R_VS_START 0x3048
52 #define PM2R_VS_END 0x3050
53 #define PM2R_VIDEO_CONTROL 0x3058
54 #define PM2R_LINE_COUNT 0x3070
55 #define PM2R_FIFO_CONTROL 0x3078
57 #define PM2R_RD_PALETTE_WRITE_ADDRESS 0x4000
58 #define PM2R_RD_PALETTE_DATA 0x4008
59 #define PM2R_RD_PALETTE_READ_ADDRESS 0x4018
60 #define PM2R_RD_INDEXED_DATA 0x4050
62 #define PM2R_START_X_DOM 0x8000
63 #define PM2R_D_X_DOM 0x8008
64 #define PM2R_START_X_SUB 0x8010
65 #define PM2R_D_X_SUB 0x8018
66 #define PM2R_START_Y 0x8020
67 #define PM2R_D_Y 0x8028
68 #define PM2R_COUNT 0x8030
69 #define PM2R_RENDER 0x8038
70 #define PM2R_RECTANGLE_ORIGIN 0x80d0
71 #define PM2R_RECTANGLE_SIZE 0x80d8
72 #define PM2R_PACKED_DATA_LIMITS 0x8150
73 #define PM2R_SCISSOR_MODE 0x8180
74 #define PM2R_SCREEN_SIZE 0x8198
75 #define PM2R_AREA_STIPPLE_MODE 0x81a0
76 #define PM2R_WINDOW_ORIGIN 0x81c8
77 #define PM2R_TEXTURE_ADDRESS_MODE 0x8380
78 #define PM2R_TEXTURE_MAP_FORMAT 0x8588
79 #define PM2R_TEXTURE_DATA_FORMAT 0x8590
80 #define PM2R_TEXTURE_READ_MODE 0x8670
81 #define PM2R_TEXEL_LUT_MODE 0x8678
82 #define PM2R_TEXTURE_COLOR_MODE 0x8680
83 #define PM2R_FOG_MODE 0x8690
84 #define PM2R_COLOR_DDA_MODE 0x87e0
85 #define PM2R_ALPHA_BLEND_MODE 0x8810
86 #define PM2R_DITHER_MODE 0x8818
87 #define PM2R_FB_SOFT_WRITE_MASK 0x8820
88 #define PM2R_LOGICAL_OP_MODE 0x8828
89 #define PM2R_LB_READ_MODE 0x8880
90 #define PM2R_LB_READ_FORMAT 0x8888
91 #define PM2R_LB_SOURCE_OFFSET 0x8890
92 #define PM2R_LB_WINDOW_BASE 0x88b8
93 #define PM2R_LB_WRITE_FORMAT 0x88c8
94 #define PM2R_STENCIL_MODE 0x8988
95 #define PM2R_DEPTH_MODE 0x89a0
96 #define PM2R_FB_READ_MODE 0x8a80
97 #define PM2R_FB_SOURCE_OFFSET 0x8a88
98 #define PM2R_FB_PIXEL_OFFSET 0x8a90
99 #define PM2R_FB_WINDOW_BASE 0x8ab0
100 #define PM2R_FB_WRITE_MODE 0x8ab8
101 #define PM2R_FB_HARD_WRITE_MASK 0x8ac0
102 #define PM2R_FB_BLOCK_COLOR 0x8ac8
103 #define PM2R_FB_READ_PIXEL 0x8ad0
104 #define PM2R_FILTER_MODE 0x8c00
105 #define PM2R_SYNC 0x8c40
106 #define PM2R_YUV_MODE 0x8f00
107 #define PM2R_STATISTICS_MODE 0x8c08
108 #define PM2R_FB_SOURCE_DELTA 0x8d88
109 #define PM2R_CONFIG 0x8d90
111 /* Permedia2 RAMDAC indexed registers */
112 #define PM2I_RD_CURSOR_CONTROL 0x06
113 #define PM2I_RD_COLOR_MODE 0x18
114 #define PM2I_RD_MODE_CONTROL 0x19
115 #define PM2I_RD_MISC_CONTROL 0x1e
116 #define PM2I_RD_PIXEL_CLOCK_A1 0x20
117 #define PM2I_RD_PIXEL_CLOCK_A2 0x21
118 #define PM2I_RD_PIXEL_CLOCK_A3 0x22
119 #define PM2I_RD_PIXEL_CLOCK_STATUS 0x29
120 #define PM2I_RD_MEMORY_CLOCK_1 0x30
121 #define PM2I_RD_MEMORY_CLOCK_2 0x31
122 #define PM2I_RD_MEMORY_CLOCK_3 0x32
123 #define PM2I_RD_MEMORY_CLOCK_STATUS 0x33
124 #define PM2I_RD_COLOR_KEY_CONTROL 0x40
125 #define PM2I_RD_OVERLAY_KEY 0x41
126 #define PM2I_RD_RED_KEY 0x42
127 #define PM2I_RD_GREEN_KEY 0x43
128 #define PM2I_RD_BLUE_KEY 0x44
130 /* Fields and flags */
131 #define PM2F_RENDER_AREASTIPPLE (1<<0)
132 #define PM2F_RENDER_FASTFILL (1<<3)
133 #define PM2F_RENDER_PRIMITIVE_MASK (0x3<<6)
134 #define PM2F_RENDER_LINE 0
135 #define PM2F_RENDER_TRAPEZOID (1<<6)
136 #define PM2F_RENDER_POINT (2<<6)
137 #define PM2F_RENDER_RECTANGLE (3<<6)
138 #define PM2F_SYNCHRONIZATION (1<<10)
139 #define PM2F_PLL_LOCKED 0x10
140 #define PM2F_BEING_RESET (1<<31)
141 #define PM2F_DATATYPE_COLOR 0x8000
142 #define PM2F_VGA_ENABLE 0x02
143 #define PM2F_VGA_FIXED 0x04
144 #define PM2F_FB_WRITE_ENABLE 0x01
145 #define PM2F_FB_READ_SOURCE_ENABLE 0x0200
146 #define PM2F_RD_PALETTE_WIDTH_8 0x02
147 #define PM2F_PART_PROD_MASK 0x01ff
148 #define PM2F_SCREEN_SCISSOR_ENABLE 0x02
149 #define PM2F_DATA_64_ENABLE 0x00010000
150 #define PM2F_BLANK_LOW 0x02
151 #define PM2F_HSYNC_MASK 0x18
152 #define PM2F_VSYNC_MASK 0x60
153 #define PM2F_HSYNC_ACT_HIGH 0x08
154 #define PM2F_HSYNC_FORCED_LOW 0x10
155 #define PM2F_HSYNC_ACT_LOW 0x18
156 #define PM2F_VSYNC_ACT_HIGH 0x20
157 #define PM2F_VSYNC_FORCED_LOW 0x40
158 #define PM2F_VSYNC_ACT_LOW 0x60
159 #define PM2F_LINE_DOUBLE 0x04
160 #define PM2F_VIDEO_ENABLE 0x01
161 #define PM2F_RD_GUI_ACTIVE 0x10
162 #define PM2F_RD_COLOR_MODE_RGB 0x20
163 #define PM2F_RD_TRUECOLOR 0x80
164 #define PM2F_NO_ALPHA_BUFFER 0x10
165 #define PM2F_TEXTEL_SIZE_16 0x00080000
166 #define PM2F_TEXTEL_SIZE_32 0x00100000
167 #define PM2F_TEXTEL_SIZE_4 0x00180000
168 #define PM2F_TEXTEL_SIZE_24 0x00200000
169 #define PM2F_INCREASE_X (1<<21)
170 #define PM2F_INCREASE_Y (1<<22)
171 #define PM2F_CONFIG_FB_WRITE_ENABLE (1<<3)
172 #define PM2F_CONFIG_FB_PACKED_DATA (1<<2)
173 #define PM2F_CONFIG_FB_READ_DEST_ENABLE (1<<1)
174 #define PM2F_CONFIG_FB_READ_SOURCE_ENABLE (1<<0)
175 #define PM2F_COLOR_KEY_TEST_OFF (1<<4)
177 #endif /* PM2FB_H */
179 /*****************************************************************************
180 * That's all folks!
181 *****************************************************************************/