• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*******************************************************************************
2     Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
3 
4     Permission is hereby granted, free of charge, to any person obtaining a
5     copy of this software and associated documentation files (the "Software"),
6     to deal in the Software without restriction, including without limitation
7     the rights to use, copy, modify, merge, publish, distribute, sublicense,
8     and/or sell copies of the Software, and to permit persons to whom the
9     Software is furnished to do so, subject to the following conditions:
10 
11     The above copyright notice and this permission notice shall be included in
12     all copies or substantial portions of the Software.
13 
14     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20     DEALINGS IN THE SOFTWARE.
21 
22 *******************************************************************************/
23 
24 #ifndef _cl0066_h_
25 #define _cl0066_h_
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include "nvtypes.h"
32 
33 #define  NV05_STRETCHED_IMAGE_FROM_CPU                             (0x00000066)
34 /* NvNotification[] elements */
35 #define NV066_NOTIFIERS_NOTIFY                                     (0)
36 #define NV066_NOTIFIERS_MAXCOUNT								   (1)
37 /* NvNotification[] fields and values */
38 #define NV066_NOTIFICATION_STATUS_IN_PROGRESS                      (0x8000)
39 #define NV066_NOTIFICATION_STATUS_ERROR_PROTECTION_FAULT           (0x4000)
40 #define NV066_NOTIFICATION_STATUS_ERROR_BAD_ARGUMENT               (0x2000)
41 #define NV066_NOTIFICATION_STATUS_ERROR_INVALID_STATE              (0x1000)
42 #define NV066_NOTIFICATION_STATUS_ERROR_STATE_IN_USE               (0x0800)
43 #define NV066_NOTIFICATION_STATUS_DONE_SUCCESS                     (0x0000)
44 /* pio method data structure */
45 /* MSVC71 bug: cannot compile this typedef as C++ without a struct tag */
46 /*             fixed in MSVC8 and later */
47 #define TAGHACK
48 #if defined(NV_WINDOWS)
49 #undef  TAGHACK
50 #define TAGHACK tagHack
51 #endif
52 typedef volatile struct TAGHACK {
53 #undef TAGHACK
54  NvV32 NoOperation;             /* ignored                          0100-0103*/
55  NvV32 Notify;                  /* NV066_NOTIFY_*                   0104-0107*/
56  NvV32 Reserved00[0x01e];
57  NvV32 SetContextDmaNotifies;   /* NV01_CONTEXT_DMA                 0180-0183*/
58  NvV32 SetContextColorKey;      /* NV04_CONTEXT_COLOR_KEY           0184-0187*/
59  NvV32 SetContextPattern;       /* NV04_CONTEXT_PATTERN             0188-018b*/
60  NvV32 SetContextRop;           /* NV03_CONTEXT_ROP                 018c-018f*/
61  NvV32 SetContextBeta1;         /* NV01_CONTEXT_BETA                0190-0193*/
62  NvV32 SetContextBeta4;         /* NV04_CONTEXT_BETA                0194-0197*/
63  NvV32 SetContextSurface;       /* NV04_CONTEXT_SURFACES_2D         0198-019b*/
64  NvV32 Reserved01[0x057];
65  NvV32 SetColorConversion;      /* NV066_SET_COLOR_CONVERSION_*     02f8-02fb*/
66  NvV32 SetOperation;            /* NV066_SET_OPERATION_*            02fc-02ff*/
67  NvV32 SetColorFormat;          /* NV066_SET_COLOR_FORMAT_*         0300-0303*/
68  NvV32 SizeIn;                  /* height_width U16_U16 in texels   0304-0307*/
69  NvV32 DxDs;                    /* S12d20 dx/ds                     0308-030b*/
70  NvV32 DyDt;                    /* S12d20 dy/dt                     030c-030f*/
71  NvV32 ClipPoint;               /* y_x S16_S16                      0310-0313*/
72  NvV32 ClipSize;                /* height_width U16_U16             0314-0317*/
73  NvV32 Point12d4;               /* y_x S12d4_S12d4 in pixels        0318-031b*/
74  NvV32 Reserved02[0x039];
75  NvV32 Color[1792];             /* source colors (packed texels)    0400-1fff*/
76 } Nv066Typedef, Nv05StretchedImageFromCpu;
77 #define NV066_TYPEDEF                                 Nv05StretchedImageFromCpu
78 /* dma method offsets, fields, and values */
79 #define NV066_SET_OBJECT                                           (0x00000000)
80 #define NV066_NO_OPERATION                                         (0x00000100)
81 #define NV066_NOTIFY                                               (0x00000104)
82 #define NV066_NOTIFY_WRITE_ONLY                                    (0x00000000)
83 #define NV066_NOTIFY_WRITE_THEN_AWAKEN                             (0x00000001)
84 #define NV066_SET_CONTEXT_DMA_NOTIFIES                             (0x00000180)
85 #define NV066_SET_CONTEXT_COLOR_KEY                                (0x00000184)
86 #define NV066_SET_CONTEXT_PATTERN                                  (0x00000188)
87 #define NV066_SET_CONTEXT_ROP                                      (0x0000018C)
88 #define NV066_SET_CONTEXT_BETA1                                    (0x00000190)
89 #define NV066_SET_CONTEXT_BETA4                                    (0x00000194)
90 #define NV066_SET_CONTEXT_SURFACE                                  (0x00000198)
91 #define NV066_SET_COLOR_CONVERSION                                 (0x000002F8)
92 #define NV066_SET_COLOR_CONVERSION_DITHER                          (0x00000000)
93 #define NV066_SET_COLOR_CONVERSION_TRUNCATE                        (0x00000001)
94 #define NV066_SET_COLOR_CONVERSION_SUBTRACT_TRUNCATE               (0x00000002)
95 #define NV066_SET_OPERATION                                        (0x000002FC)
96 #define NV066_SET_OPERATION_SRCCOPY_AND                            (0x00000000)
97 #define NV066_SET_OPERATION_ROP_AND                                (0x00000001)
98 #define NV066_SET_OPERATION_BLEND_AND                              (0x00000002)
99 #define NV066_SET_OPERATION_SRCCOPY                                (0x00000003)
100 #define NV066_SET_OPERATION_SRCCOPY_PREMULT                        (0x00000004)
101 #define NV066_SET_OPERATION_BLEND_PREMULT                          (0x00000005)
102 #define NV066_SET_COLOR_FORMAT                                     (0x00000300)
103 #define NV066_SET_COLOR_FORMAT_LE_R5G6B5                           (0x00000001)
104 #define NV066_SET_COLOR_FORMAT_LE_A1R5G5B5                         (0x00000002)
105 #define NV066_SET_COLOR_FORMAT_LE_X1R5G5B5                         (0x00000003)
106 #define NV066_SET_COLOR_FORMAT_LE_A8R8G8B8                         (0x00000004)
107 #define NV066_SET_COLOR_FORMAT_LE_X8R8G8B8                         (0x00000005)
108 #define NV066_SIZE_IN                                              (0x00000304)
109 #define NV066_SIZE_IN_WIDTH                                        15:0
110 #define NV066_SIZE_IN_HEIGHT                                       31:16
111 #define NV066_DX_DS                                                (0x00000308)
112 #define NV066_DY_DT                                                (0x0000030C)
113 #define NV066_CLIP_POINT                                           (0x00000310)
114 #define NV066_CLIP_POINT_X                                         15:0
115 #define NV066_CLIP_POINT_Y                                         31:16
116 #define NV066_CLIP_SIZE                                            (0x00000314)
117 #define NV066_CLIP_SIZE_WIDTH                                      15:0
118 #define NV066_CLIP_SIZE_HEIGHT                                     31:16
119 #define NV066_POINT_12D4                                           (0x00000318)
120 #define NV066_POINT_12D4_X                                         15:0
121 #define NV066_POINT_12D4_Y                                         31:16
122 #define NV066_COLOR(a)                                             (0x00000400\
123                                                                    +(a)*0x0004)
124 #define NV066_COLOR__SIZE_1                                        1792
125 
126 #ifdef __cplusplus
127 };     /* extern "C" */
128 #endif
129 
130 #endif /* _cl0066_h_ */
131