2 /***************************************************************************\
4 |* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
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. *|
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 *|
15 |* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
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. *|
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. *|
39 \***************************************************************************/
41 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v 1.4 2004/03/20 01:52:16 mvojkovi Exp $ */
45 #define NVDEBUG if (NV_DMA_DEBUG) ErrorF
47 #define NV_DMA_ACCES_RW 0
48 #define NV_DMA_ACCES_RO 1
49 #define NV_DMA_ACCES_WO 2
50 #define NV_DMA_TARGET_VIDMEM 0
52 #define NV_DMA_TARGET_VIDMEM_TILED 1
53 #define NV_DMA_TARGET_PCI 2
55 #define NV_DMA_TARGET_AGP 3
58 NvNullObject = 0x00000000,
59 NvContextSurfaces = 0x80000010,
61 NvImagePattern = 0x80000012,
62 NvClipRectangle = 0x80000013,
63 NvSolidLine = 0x80000014,
64 NvImageBlit = 0x80000015,
65 NvRectangle = 0x80000016,
66 NvScaledImage = 0x80000017,
67 NvMemFormat = 0x80000018,
69 NvImageFromCpu = 0x8000001A,
70 NvContextBeta1 = 0x8000001B,
71 NvContextBeta4 = 0x8000001C,
75 NvDmaNotifier0 = 0xD8000003,
77 /*XVideo notifiers need to have consecutive handles, be careful when remapping*/
78 NvDmaXvNotifier0 = 0xE8000000,
79 NvDmaXvNotifier1 = 0xE8000001,
80 NvDmaXvNotifier2 = 0xE8000002,
81 NvDmaXvNotifier3 = 0xE8000003,
82 NvDmaXvNotifier4 = 0xE8000004,
83 NvDmaXvNotifier5 = 0xE8000005,
86 extern void NVDmaStart(NVPtr pNv, uint32_t object, uint32_t tag, int size);
88 #define NVDmaNext(pNv, data) do { \
89 NVDEBUG("\tNVDmaNext: @0x%08x 0x%08x\n", (unsigned)((pNv)->dmaCurrent),(unsigned)(data)); \
90 (pNv)->dmaBase[(pNv)->dmaCurrent++] = (data); \
93 #define NVDmaFloat(pNv, data) do { \
99 NVDmaNext((pNv), c.u); \
102 #define SURFACE_FORMAT 0x00000300
103 #define SURFACE_FORMAT_Y8 0x00000001
104 #define SURFACE_FORMAT_X1R5G5B5 0x00000002
105 #define SURFACE_FORMAT_R5G6B5 0x00000004
106 #define SURFACE_FORMAT_X8R8G8B8 0x00000006
107 #define SURFACE_FORMAT_A8R8G8B8 0x0000000a
108 #define SURFACE_PITCH 0x00000304
109 #define SURFACE_PITCH_SRC 15:0
110 #define SURFACE_PITCH_DST 31:16
111 #define SURFACE_OFFSET_SRC 0x00000308
112 #define SURFACE_OFFSET_DST 0x0000030C
114 #define ROP_SET 0x00000300
116 #define PATTERN_FORMAT 0x00000300
117 #define PATTERN_FORMAT_DEPTH8 0x00000003
118 #define PATTERN_FORMAT_DEPTH16 0x00000001
119 #define PATTERN_FORMAT_DEPTH24 0x00000003
120 #define PATTERN_COLOR_0 0x00000310
121 #define PATTERN_COLOR_1 0x00000314
122 #define PATTERN_PATTERN_0 0x00000318
123 #define PATTERN_PATTERN_1 0x0000031C
125 #define CLIP_POINT 0x00000300
126 #define CLIP_POINT_X 15:0
127 #define CLIP_POINT_Y 31:16
128 #define CLIP_SIZE 0x00000304
129 #define CLIP_SIZE_WIDTH 15:0
130 #define CLIP_SIZE_HEIGHT 31:16
132 #define LINE_FORMAT 0x00000300
133 #define LINE_FORMAT_DEPTH8 0x00000003
134 #define LINE_FORMAT_DEPTH16 0x00000001
135 #define LINE_FORMAT_DEPTH24 0x00000003
136 #define LINE_COLOR 0x00000304
137 #define LINE_MAX_LINES 16
138 #define LINE_LINES(i) 0x00000400\
140 #define LINE_LINES_POINT0_X 15:0
141 #define LINE_LINES_POINT0_Y 31:16
142 #define LINE_LINES_POINT1_X 47:32
143 #define LINE_LINES_POINT1_Y 63:48
145 #define BLIT_POINT_SRC 0x00000300
146 #define BLIT_POINT_SRC_X 15:0
147 #define BLIT_POINT_SRC_Y 31:16
148 #define BLIT_POINT_DST 0x00000304
149 #define BLIT_POINT_DST_X 15:0
150 #define BLIT_POINT_DST_Y 31:16
151 #define BLIT_SIZE 0x00000308
152 #define BLIT_SIZE_WIDTH 15:0
153 #define BLIT_SIZE_HEIGHT 31:16
155 #define RECT_FORMAT 0x00000300
156 #define RECT_FORMAT_DEPTH8 0x00000003
157 #define RECT_FORMAT_DEPTH16 0x00000001
158 #define RECT_FORMAT_DEPTH24 0x00000003
159 #define RECT_SOLID_COLOR 0x000003FC
160 #define RECT_SOLID_RECTS_MAX_RECTS 32
161 #define RECT_SOLID_RECTS(i) 0x00000400\
163 #define RECT_SOLID_RECTS_Y 15:0
164 #define RECT_SOLID_RECTS_X 31:16
165 #define RECT_SOLID_RECTS_HEIGHT 47:32
166 #define RECT_SOLID_RECTS_WIDTH 63:48
168 #define RECT_EXPAND_ONE_COLOR_CLIP 0x000007EC
169 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_X 15:0
170 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_Y 31:16
171 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_X 47:32
172 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_Y 63:48
173 #define RECT_EXPAND_ONE_COLOR_COLOR 0x000007F4
174 #define RECT_EXPAND_ONE_COLOR_SIZE 0x000007F8
175 #define RECT_EXPAND_ONE_COLOR_SIZE_WIDTH 15:0
176 #define RECT_EXPAND_ONE_COLOR_SIZE_HEIGHT 31:16
177 #define RECT_EXPAND_ONE_COLOR_POINT 0x000007FC
178 #define RECT_EXPAND_ONE_COLOR_POINT_X 15:0
179 #define RECT_EXPAND_ONE_COLOR_POINT_Y 31:16
180 #define RECT_EXPAND_ONE_COLOR_DATA_MAX_DWORDS 128
181 #define RECT_EXPAND_ONE_COLOR_DATA(i) 0x00000800\
184 #define RECT_EXPAND_TWO_COLOR_CLIP 0x00000BE4
185 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_X 15:0
186 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_Y 31:16
187 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_X 47:32
188 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_Y 63:48
189 #define RECT_EXPAND_TWO_COLOR_COLOR_0 0x00000BEC
190 #define RECT_EXPAND_TWO_COLOR_COLOR_1 0x00000BF0
191 #define RECT_EXPAND_TWO_COLOR_SIZE_IN 0x00000BF4
192 #define RECT_EXPAND_TWO_COLOR_SIZE_IN_WIDTH 15:0
193 #define RECT_EXPAND_TWO_COLOR_SIZE_IN_HEIGHT 31:16
194 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT 0x00000BF8
195 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_WIDTH 15:0
196 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_HEIGHT 31:16
197 #define RECT_EXPAND_TWO_COLOR_POINT 0x00000BFC
198 #define RECT_EXPAND_TWO_COLOR_POINT_X 15:0
199 #define RECT_EXPAND_TWO_COLOR_POINT_Y 31:16
200 #define RECT_EXPAND_TWO_COLOR_DATA_MAX_DWORDS 128
201 #define RECT_EXPAND_TWO_COLOR_DATA(i) 0x00000C00\
204 #define STRETCH_BLIT_FORMAT 0x00000300
205 #define STRETCH_BLIT_FORMAT_DEPTH8 0x00000004
206 #define STRETCH_BLIT_FORMAT_DEPTH16 0x00000007
207 #define STRETCH_BLIT_FORMAT_DEPTH24 0x00000004
208 #define STRETCH_BLIT_FORMAT_A8R8G8B8 0x00000003
209 #define STRETCH_BLIT_FORMAT_X8R8G8B8 0x00000004
210 #define STRETCH_BLIT_FORMAT_YUYV 0x00000005
211 #define STRETCH_BLIT_FORMAT_UYVY 0x00000006
212 #define STRETCH_BLIT_OPERATION 0x00000304
213 #define STRETCH_BLIT_OPERATION_ROP 0x00000001
214 #define STRETCH_BLIT_OPERATION_COPY 0x00000003
215 #define STRETCH_BLIT_OPERATION_BLEND 0x00000002
216 #define STRETCH_BLIT_CLIP_POINT 0x00000308
217 #define STRETCH_BLIT_CLIP_POINT_X 15:0
218 #define STRETCH_BLIT_CLIP_POINT_Y 31:16
219 #define STRETCH_BLIT_CLIP_POINT 0x00000308
220 #define STRETCH_BLIT_CLIP_SIZE 0x0000030C
221 #define STRETCH_BLIT_CLIP_SIZE_WIDTH 15:0
222 #define STRETCH_BLIT_CLIP_SIZE_HEIGHT 31:16
223 #define STRETCH_BLIT_DST_POINT 0x00000310
224 #define STRETCH_BLIT_DST_POINT_X 15:0
225 #define STRETCH_BLIT_DST_POINT_Y 31:16
226 #define STRETCH_BLIT_DST_SIZE 0x00000314
227 #define STRETCH_BLIT_DST_SIZE_WIDTH 15:0
228 #define STRETCH_BLIT_DST_SIZE_HEIGHT 31:16
229 #define STRETCH_BLIT_DU_DX 0x00000318
230 #define STRETCH_BLIT_DV_DY 0x0000031C
231 #define STRETCH_BLIT_SRC_SIZE 0x00000400
232 #define STRETCH_BLIT_SRC_SIZE_WIDTH 15:0
233 #define STRETCH_BLIT_SRC_SIZE_HEIGHT 31:16
234 #define STRETCH_BLIT_SRC_FORMAT 0x00000404
235 #define STRETCH_BLIT_SRC_FORMAT_PITCH 15:0
236 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN 23:16
237 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CENTER 0x00000001
238 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CORNER 0x00000002
239 #define STRETCH_BLIT_SRC_FORMAT_FILTER 31:24
240 #define STRETCH_BLIT_SRC_FORMAT_FILTER_POINT_SAMPLE 0x00000000
241 #define STRETCH_BLIT_SRC_FORMAT_FILTER_BILINEAR 0x00000001
242 #define STRETCH_BLIT_SRC_OFFSET 0x00000408
243 #define STRETCH_BLIT_SRC_POINT 0x0000040C
244 #define STRETCH_BLIT_SRC_POINT_U 15:0
245 #define STRETCH_BLIT_SRC_POINT_V 31:16
248 #define MEMFORMAT_NOTIFY 0x00000104
249 #define MEMFORMAT_DMA_NOTIFY 0x00000180
250 #define MEMFORMAT_DMA_OBJECT_IN 0x00000184
251 #define MEMFORMAT_DMA_OBJECT_OUT 0x00000188
252 #define MEMFORMAT_OFFSET_IN 0x0000030C
253 #define MEMFORMAT_OFFSET_OUT 0x00000310
254 #define MEMFORMAT_PITCH_IN 0x00000314
255 #define MEMFORMAT_PITCH_OUT 0x00000318
256 #define MEMFORMAT_LINE_LENGTH_IN 0x0000031C
257 #define MEMFORMAT_LINE_COUNT 0x00000320
260 #endif /* NV_DMA_H */