Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nv_dma.h
Go to the documentation of this file.
1 
2  /***************************************************************************\
3 |* *|
4 |* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
5 |* *|
6 |* NOTICE TO USER: The source code is copyrighted under U.S. and *|
7 |* international laws. Users and possessors of this source code are *|
8 |* hereby granted a nonexclusive, royalty-free copyright license to *|
9 |* use this code in individual and commercial software. *|
10 |* *|
11 |* Any use of this source code must include, in the user documenta- *|
12 |* tion and internal comments to the code, notices to the end user *|
13 |* as follows: *|
14 |* *|
15 |* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
16 |* *|
17 |* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
18 |* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
19 |* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
20 |* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
21 |* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
22 |* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
23 |* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
24 |* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
25 |* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
26 |* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
27 |* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
28 |* *|
29 |* U.S. Government End Users. This source code is a "commercial *|
30 |* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
31 |* consisting of "commercial computer software" and "commercial *|
32 |* computer software documentation," as such terms are used in *|
33 |* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
34 |* ment only as a commercial end item. Consistent with 48 C.F.R. *|
35 |* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
36 |* all U.S. Government End Users acquire the source code with only *|
37 |* those rights set forth herein. *|
38 |* *|
39  \***************************************************************************/
40 
41 /*
42  * GPL Licensing Note - According to Mark Vojkovich, author of the Xorg/
43  * XFree86 'nv' driver, this source code is provided under MIT-style licensing
44  * where the source code is provided "as is" without warranty of any kind.
45  * The only usage restriction is for the copyright notices to be retained
46  * whenever code is used.
47  *
48  * Antonino Daplas <[email protected]> 2005-03-11
49  */
50 
51 #define SURFACE_FORMAT 0x00000300
52 #define SURFACE_FORMAT_DEPTH8 0x00000001
53 #define SURFACE_FORMAT_DEPTH15 0x00000002
54 #define SURFACE_FORMAT_DEPTH16 0x00000004
55 #define SURFACE_FORMAT_DEPTH24 0x00000006
56 #define SURFACE_PITCH 0x00000304
57 #define SURFACE_PITCH_SRC 15:0
58 #define SURFACE_PITCH_DST 31:16
59 #define SURFACE_OFFSET_SRC 0x00000308
60 #define SURFACE_OFFSET_DST 0x0000030C
61 
62 #define ROP_SET 0x00002300
63 
64 #define PATTERN_FORMAT 0x00004300
65 #define PATTERN_FORMAT_DEPTH8 0x00000003
66 #define PATTERN_FORMAT_DEPTH16 0x00000001
67 #define PATTERN_FORMAT_DEPTH24 0x00000003
68 #define PATTERN_COLOR_0 0x00004310
69 #define PATTERN_COLOR_1 0x00004314
70 #define PATTERN_PATTERN_0 0x00004318
71 #define PATTERN_PATTERN_1 0x0000431C
72 
73 #define CLIP_POINT 0x00006300
74 #define CLIP_POINT_X 15:0
75 #define CLIP_POINT_Y 31:16
76 #define CLIP_SIZE 0x00006304
77 #define CLIP_SIZE_WIDTH 15:0
78 #define CLIP_SIZE_HEIGHT 31:16
79 
80 #define LINE_FORMAT 0x00008300
81 #define LINE_FORMAT_DEPTH8 0x00000003
82 #define LINE_FORMAT_DEPTH16 0x00000001
83 #define LINE_FORMAT_DEPTH24 0x00000003
84 #define LINE_COLOR 0x00008304
85 #define LINE_MAX_LINES 16
86 #define LINE_LINES(i) 0x00008400\
87  +(i)*8
88 #define LINE_LINES_POINT0_X 15:0
89 #define LINE_LINES_POINT0_Y 31:16
90 #define LINE_LINES_POINT1_X 47:32
91 #define LINE_LINES_POINT1_Y 63:48
92 
93 #define BLIT_POINT_SRC 0x0000A300
94 #define BLIT_POINT_SRC_X 15:0
95 #define BLIT_POINT_SRC_Y 31:16
96 #define BLIT_POINT_DST 0x0000A304
97 #define BLIT_POINT_DST_X 15:0
98 #define BLIT_POINT_DST_Y 31:16
99 #define BLIT_SIZE 0x0000A308
100 #define BLIT_SIZE_WIDTH 15:0
101 #define BLIT_SIZE_HEIGHT 31:16
102 
103 #define RECT_FORMAT 0x0000C300
104 #define RECT_FORMAT_DEPTH8 0x00000003
105 #define RECT_FORMAT_DEPTH16 0x00000001
106 #define RECT_FORMAT_DEPTH24 0x00000003
107 #define RECT_SOLID_COLOR 0x0000C3FC
108 #define RECT_SOLID_RECTS_MAX_RECTS 32
109 #define RECT_SOLID_RECTS(i) 0x0000C400\
110  +(i)*8
111 #define RECT_SOLID_RECTS_Y 15:0
112 #define RECT_SOLID_RECTS_X 31:16
113 #define RECT_SOLID_RECTS_HEIGHT 47:32
114 #define RECT_SOLID_RECTS_WIDTH 63:48
115 
116 #define RECT_EXPAND_ONE_COLOR_CLIP 0x0000C7EC
117 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_X 15:0
118 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_Y 31:16
119 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_X 47:32
120 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_Y 63:48
121 #define RECT_EXPAND_ONE_COLOR_COLOR 0x0000C7F4
122 #define RECT_EXPAND_ONE_COLOR_SIZE 0x0000C7F8
123 #define RECT_EXPAND_ONE_COLOR_SIZE_WIDTH 15:0
124 #define RECT_EXPAND_ONE_COLOR_SIZE_HEIGHT 31:16
125 #define RECT_EXPAND_ONE_COLOR_POINT 0x0000C7FC
126 #define RECT_EXPAND_ONE_COLOR_POINT_X 15:0
127 #define RECT_EXPAND_ONE_COLOR_POINT_Y 31:16
128 #define RECT_EXPAND_ONE_COLOR_DATA_MAX_DWORDS 128
129 #define RECT_EXPAND_ONE_COLOR_DATA(i) 0x0000C800\
130  +(i)*4
131 
132 #define RECT_EXPAND_TWO_COLOR_CLIP 0x0000CBE4
133 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_X 15:0
134 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_Y 31:16
135 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_X 47:32
136 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_Y 63:48
137 #define RECT_EXPAND_TWO_COLOR_COLOR_0 0x0000CBEC
138 #define RECT_EXPAND_TWO_COLOR_COLOR_1 0x0000CBF0
139 #define RECT_EXPAND_TWO_COLOR_SIZE_IN 0x0000CBF4
140 #define RECT_EXPAND_TWO_COLOR_SIZE_IN_WIDTH 15:0
141 #define RECT_EXPAND_TWO_COLOR_SIZE_IN_HEIGHT 31:16
142 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT 0x0000CBF8
143 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_WIDTH 15:0
144 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_HEIGHT 31:16
145 #define RECT_EXPAND_TWO_COLOR_POINT 0x0000CBFC
146 #define RECT_EXPAND_TWO_COLOR_POINT_X 15:0
147 #define RECT_EXPAND_TWO_COLOR_POINT_Y 31:16
148 #define RECT_EXPAND_TWO_COLOR_DATA_MAX_DWORDS 128
149 #define RECT_EXPAND_TWO_COLOR_DATA(i) 0x0000CC00\
150  +(i)*4
151 
152 #define STRETCH_BLIT_FORMAT 0x0000E300
153 #define STRETCH_BLIT_FORMAT_DEPTH8 0x00000004
154 #define STRETCH_BLIT_FORMAT_DEPTH16 0x00000007
155 #define STRETCH_BLIT_FORMAT_DEPTH24 0x00000004
156 #define STRETCH_BLIT_FORMAT_X8R8G8B8 0x00000004
157 #define STRETCH_BLIT_FORMAT_YUYV 0x00000005
158 #define STRETCH_BLIT_FORMAT_UYVY 0x00000006
159 #define STRETCH_BLIT_CLIP_POINT 0x0000E308
160 #define STRETCH_BLIT_CLIP_POINT_X 15:0
161 #define STRETCH_BLIT_CLIP_POINT_Y 31:16
162 #define STRETCH_BLIT_CLIP_POINT 0x0000E308
163 #define STRETCH_BLIT_CLIP_SIZE 0x0000E30C
164 #define STRETCH_BLIT_CLIP_SIZE_WIDTH 15:0
165 #define STRETCH_BLIT_CLIP_SIZE_HEIGHT 31:16
166 #define STRETCH_BLIT_DST_POINT 0x0000E310
167 #define STRETCH_BLIT_DST_POINT_X 15:0
168 #define STRETCH_BLIT_DST_POINT_Y 31:16
169 #define STRETCH_BLIT_DST_SIZE 0x0000E314
170 #define STRETCH_BLIT_DST_SIZE_WIDTH 15:0
171 #define STRETCH_BLIT_DST_SIZE_HEIGHT 31:16
172 #define STRETCH_BLIT_DU_DX 0x0000E318
173 #define STRETCH_BLIT_DV_DY 0x0000E31C
174 #define STRETCH_BLIT_SRC_SIZE 0x0000E400
175 #define STRETCH_BLIT_SRC_SIZE_WIDTH 15:0
176 #define STRETCH_BLIT_SRC_SIZE_HEIGHT 31:16
177 #define STRETCH_BLIT_SRC_FORMAT 0x0000E404
178 #define STRETCH_BLIT_SRC_FORMAT_PITCH 15:0
179 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN 23:16
180 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CENTER 0x00000001
181 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CORNER 0x00000002
182 #define STRETCH_BLIT_SRC_FORMAT_FILTER 31:24
183 #define STRETCH_BLIT_SRC_FORMAT_FILTER_POINT_SAMPLE 0x00000000
184 #define STRETCH_BLIT_SRC_FORMAT_FILTER_BILINEAR 0x00000001
185 #define STRETCH_BLIT_SRC_OFFSET 0x0000E408
186 #define STRETCH_BLIT_SRC_POINT 0x0000E40C
187 #define STRETCH_BLIT_SRC_POINT_U 15:0
188 #define STRETCH_BLIT_SRC_POINT_V 31:16