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
48 NvNullObject = 0x00000000,
49 NvContextSurfaces = 0x80000010,
51 NvImagePattern = 0x80000012,
52 NvClipRectangle = 0x80000013,
53 NvSolidLine = 0x80000014,
54 NvImageBlit = 0x80000015,
55 NvRectangle = 0x80000016,
56 NvScaledImage = 0x80000017,
57 NvMemFormat = 0x80000018,
59 NvImageFromCpu = 0x8000001A,
60 NvContextBeta1 = 0x8000001B,
61 NvContextBeta4 = 0x8000001C,
65 NvDmaNotifier0 = 0xD8000003,
67 /*XVideo notifiers need to have consecutive handles, be careful when remapping*/
68 NvDmaXvNotifier0 = 0xE8000000,
69 NvDmaXvNotifier1 = 0xE8000001,
70 NvDmaXvNotifier2 = 0xE8000002,
71 NvDmaXvNotifier3 = 0xE8000003,
72 NvDmaXvNotifier4 = 0xE8000004,
73 NvDmaXvNotifier5 = 0xE8000005,
76 extern void NVDmaStartNNN(NVPtr pNv, uint32_t object, uint32_t tag, int size);
78 #define BEGIN_RING(obj,mthd,size) do { \
79 NVDmaStartNNN(pNv, (obj), (mthd), (size)); \
82 #define OUT_RING(data) do { \
83 NVDEBUG("\tOUT_RING : @0x%08x 0x%08x\n", \
84 (unsigned)(pNv->dmaCurrent), (unsigned)(data)); \
85 pNv->dmaBase[pNv->dmaCurrent++] = (data); \
88 #define OUT_RINGf(data) do { \
89 union { float v; uint32_t u; } c; \
94 #define WAIT_RING(size) do { \
95 NVDmaWaitNNN(pScrn, (size)); \
98 #define FIRE_RING() do { \
99 NVDmaKickoffNNN(pNv); \
102 #endif /* NV_DMA_H */