| 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 _cl0065_h_ |
| 25 |
#define _cl0065_h_ |
| 26 |
|
| 27 |
#ifdef __cplusplus |
| 28 |
extern "C" { |
| 29 |
#endif |
| 30 |
|
| 31 |
#include "nvtypes.h" |
| 32 |
|
| 33 |
#define NV05_IMAGE_FROM_CPU (0x00000065) |
| 34 |
/* NvNotification[] elements */ |
| 35 |
#define NV065_NOTIFIERS_NOTIFY (0) |
| 36 |
#define NV065_NOTIFIERS_MAXCOUNT (1) |
| 37 |
|
| 38 |
/* NvNotification[] fields and values */ |
| 39 |
#define NV065_NOTIFICATION_STATUS_IN_PROGRESS (0x8000) |
| 40 |
#define NV065_NOTIFICATION_STATUS_ERROR_PROTECTION_FAULT (0x4000) |
| 41 |
#define NV065_NOTIFICATION_STATUS_ERROR_BAD_ARGUMENT (0x2000) |
| 42 |
#define NV065_NOTIFICATION_STATUS_ERROR_INVALID_STATE (0x1000) |
| 43 |
#define NV065_NOTIFICATION_STATUS_ERROR_STATE_IN_USE (0x0800) |
| 44 |
#define NV065_NOTIFICATION_STATUS_DONE_SUCCESS (0x0000) |
| 45 |
/* pio method data structure */ |
| 46 |
typedef volatile struct _cl0065_tag0 { |
| 47 |
NvV32 NoOperation; /* ignored 0100-0103*/ |
| 48 |
NvV32 Notify; /* NV065_NOTIFY_* 0104-0107*/ |
| 49 |
NvV32 Reserved00[0x01e]; |
| 50 |
NvV32 SetContextDmaNotifies; /* NV01_CONTEXT_DMA 0180-0183*/ |
| 51 |
NvV32 SetContextColorKey; /* NV04_CONTEXT_COLOR_KEY 0184-0187*/ |
| 52 |
NvV32 SetContextClipRectangle; /* NV01_CONTEXT_CLIP_RECTANGLE 0188-018b*/ |
| 53 |
NvV32 SetContextPattern; /* NV04_CONTEXT_PATTERN 018c-018f*/ |
| 54 |
NvV32 SetContextRop; /* NV03_CONTEXT_ROP 0190-0193*/ |
| 55 |
NvV32 SetContextBeta1; /* NV01_CONTEXT_BETA 0194-0197*/ |
| 56 |
NvV32 SetContextBeta4; /* NV04_CONTEXT_BETA 0198-019b*/ |
| 57 |
NvV32 SetContextSurface; /* NV04_CONTEXT_SURFACES_2D 019c-019f*/ |
| 58 |
NvV32 Reserved01[0x056]; |
| 59 |
NvV32 SetColorConversion; /* NV065_SET_COLOR_CONVERSION_* 02f8-02fb*/ |
| 60 |
NvV32 SetOperation; /* NV065_SET_OPERATION_* 02fc-02ff*/ |
| 61 |
NvV32 SetColorFormat; /* NV065_SET_COLOR_FORMAT_* 0300-0303*/ |
| 62 |
NvV32 Point; /* y_x S16_S16 in pixels 0304-0307*/ |
| 63 |
NvV32 SizeOut; /* height_width U16_U16, pixels 0308-030b*/ |
| 64 |
NvV32 SizeIn; /* height_width U16_U16, pixels 030c-030f*/ |
| 65 |
NvV32 Reserved02[0x03c]; |
| 66 |
NvV32 Color[1792]; /* source colors (packed texels) 0400-1fff*/ |
| 67 |
} Nv065Typedef, Nv05ImageFromCpu; |
| 68 |
#define NV065_TYPEDEF Nv05ImageFromCpu |
| 69 |
/* dma method offsets, fields, and values */ |
| 70 |
#define NV065_SET_OBJECT (0x00000000) |
| 71 |
#define NV065_NO_OPERATION (0x00000100) |
| 72 |
#define NV065_NOTIFY (0x00000104) |
| 73 |
#define NV065_NOTIFY_WRITE_ONLY (0x00000000) |
| 74 |
#define NV065_NOTIFY_WRITE_THEN_AWAKEN (0x00000001) |
| 75 |
#define NV065_SET_CONTEXT_DMA_NOTIFIES (0x00000180) |
| 76 |
#define NV065_SET_CONTEXT_COLOR_KEY (0x00000184) |
| 77 |
#define NV065_SET_CONTEXT_CLIP_RECTANGLE (0x00000188) |
| 78 |
#define NV065_SET_CONTEXT_PATTERN (0x0000018C) |
| 79 |
#define NV065_SET_CONTEXT_ROP (0x00000190) |
| 80 |
#define NV065_SET_CONTEXT_BETA1 (0x00000194) |
| 81 |
#define NV065_SET_CONTEXT_BETA4 (0x00000198) |
| 82 |
#define NV065_SET_CONTEXT_SURFACE (0x0000019C) |
| 83 |
#define NV065_SET_COLOR_CONVERSION (0x000002F8) |
| 84 |
#define NV065_SET_COLOR_CONVERSION_DITHER (0x00000000) |
| 85 |
#define NV065_SET_COLOR_CONVERSION_TRUNCATE (0x00000001) |
| 86 |
#define NV065_SET_COLOR_CONVERSION_SUBTRACT_TRUNCATE (0x00000002) |
| 87 |
#define NV065_SET_OPERATION (0x000002FC) |
| 88 |
#define NV065_SET_OPERATION_SRCCOPY_AND (0x00000000) |
| 89 |
#define NV065_SET_OPERATION_ROP_AND (0x00000001) |
| 90 |
#define NV065_SET_OPERATION_BLEND_AND (0x00000002) |
| 91 |
#define NV065_SET_OPERATION_SRCCOPY (0x00000003) |
| 92 |
#define NV065_SET_OPERATION_SRCCOPY_PREMULT (0x00000004) |
| 93 |
#define NV065_SET_OPERATION_BLEND_PREMULT (0x00000005) |
| 94 |
#define NV065_SET_COLOR_FORMAT (0x00000300) |
| 95 |
#define NV065_SET_COLOR_FORMAT_LE_R5G6B5 (0x00000001) |
| 96 |
#define NV065_SET_COLOR_FORMAT_LE_A1R5G5B5 (0x00000002) |
| 97 |
#define NV065_SET_COLOR_FORMAT_LE_X1R5G5B5 (0x00000003) |
| 98 |
#define NV065_SET_COLOR_FORMAT_LE_A8R8G8B8 (0x00000004) |
| 99 |
#define NV065_SET_COLOR_FORMAT_LE_X8R8G8B8 (0x00000005) |
| 100 |
#define NV065_POINT (0x00000304) |
| 101 |
#define NV065_POINT_X 15:0 |
| 102 |
#define NV065_POINT_Y 31:16 |
| 103 |
#define NV065_SIZE_OUT (0x00000308) |
| 104 |
#define NV065_SIZE_OUT_WIDTH 15:0 |
| 105 |
#define NV065_SIZE_OUT_HEIGHT 31:16 |
| 106 |
#define NV065_SIZE_IN (0x0000030C) |
| 107 |
#define NV065_SIZE_IN_WIDTH 15:0 |
| 108 |
#define NV065_SIZE_IN_HEIGHT 31:16 |
| 109 |
#define NV065_COLOR(a) (0x00000400\ |
| 110 |
+(a)*0x0004) |
| 111 |
#define NV065_COLOR__SIZE_1 1792 |
| 112 |
|
| 113 |
#ifdef __cplusplus |
| 114 |
}; /* extern "C" */ |
| 115 |
#endif |
| 116 |
|
| 117 |
#endif /* _cl0065_h_ */ |