| 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 _cl0077_h_ |
| 25 |
#define _cl0077_h_ |
| 26 |
|
| 27 |
#ifdef __cplusplus |
| 28 |
extern "C" { |
| 29 |
#endif |
| 30 |
|
| 31 |
#include "nvtypes.h" |
| 32 |
|
| 33 |
#define NV04_SCALED_IMAGE_FROM_MEMORY (0x00000077) |
| 34 |
/* NvNotification[] elements */ |
| 35 |
#define NV077_NOTIFIERS_NOTIFY (0) |
| 36 |
#define NV077_NOTIFIERS_MAXCOUNT (1) |
| 37 |
/* NvNotification[] fields and values */ |
| 38 |
#define NV077_NOTIFICATION_STATUS_IN_PROGRESS (0x8000) |
| 39 |
#define NV077_NOTIFICATION_STATUS_ERROR_PROTECTION_FAULT (0x4000) |
| 40 |
#define NV077_NOTIFICATION_STATUS_ERROR_BAD_ARGUMENT (0x2000) |
| 41 |
#define NV077_NOTIFICATION_STATUS_ERROR_INVALID_STATE (0x1000) |
| 42 |
#define NV077_NOTIFICATION_STATUS_ERROR_STATE_IN_USE (0x0800) |
| 43 |
#define NV077_NOTIFICATION_STATUS_DONE_SUCCESS (0x0000) |
| 44 |
/* pio method data structure */ |
| 45 |
typedef volatile struct _cl0077_tag0 { |
| 46 |
NvV32 NoOperation; /* ignored 0100-0103*/ |
| 47 |
NvV32 Notify; /* NV077_NOTIFY_* 0104-0107*/ |
| 48 |
NvV32 Reserved00[0x01e]; |
| 49 |
NvV32 SetContextDmaNotifies; /* NV01_CONTEXT_DMA 0180-0183*/ |
| 50 |
NvV32 SetContextDmaImage; /* NV01_CONTEXT_DMA 0184-0187*/ |
| 51 |
NvV32 SetContextPattern; /* NV04_CONTEXT_PATTERN 0188-018b*/ |
| 52 |
NvV32 SetContextRop; /* NV03_CONTEXT_ROP 018c-018f*/ |
| 53 |
NvV32 SetContextBeta1; /* NV01_CONTEXT_BETA 0190-0193*/ |
| 54 |
NvV32 SetContextBeta4; /* NV04_CONTEXT_BETA 0194-0197*/ |
| 55 |
NvV32 SetContextSurface; /* NV04_CONTEXT_SURFACES_2D,SWIZZLE 0198-019b*/ |
| 56 |
NvV32 Reserved01[0x059]; |
| 57 |
NvV32 SetColorFormat; /* NV077_SET_COLOR_FORMAT_* 0300-0303*/ |
| 58 |
NvV32 SetOperation; /* NV077_SET_OPERATION_* 0304-0307*/ |
| 59 |
NvV32 ClipPoint; /* y_x S16_S16 0308-030b*/ |
| 60 |
NvV32 ClipSize; /* height_width U16_U16 030c-030f*/ |
| 61 |
NvV32 ImageOutPoint; /* y_x S16_S16 0310-0313*/ |
| 62 |
NvV32 ImageOutSize; /* height_width U16_U16 0314-0317*/ |
| 63 |
NvV32 DeltaDuDx; /* S12d20 ratio du/dx 0318-031b*/ |
| 64 |
NvV32 DeltaDvDy; /* S12d20 ratio dv/dy 031c-031f*/ |
| 65 |
NvV32 Reserved02[0x038]; |
| 66 |
NvV32 ImageInSize; /* height_width U16_U16 0400-0403*/ |
| 67 |
NvU32 ImageInFormat; /* interpolator_origin_pitch 0404-0407*/ |
| 68 |
NvU32 ImageInOffset; /* bytes 0408-040b*/ |
| 69 |
NvV32 ImageInPoint; /* v_u U12d4_U12d4 040c-040f*/ |
| 70 |
NvV32 Reserved03[0x6fc]; |
| 71 |
} Nv077Typedef, Nv04ScaledImageFromMemory; |
| 72 |
#define NV077_TYPEDEF Nv04ScaledImageFromMemory |
| 73 |
/* dma method offsets, fields, and values */ |
| 74 |
#define NV077_SET_OBJECT (0x00000000) |
| 75 |
#define NV077_NO_OPERATION (0x00000100) |
| 76 |
#define NV077_NOTIFY (0x00000104) |
| 77 |
#define NV077_NOTIFY_WRITE_ONLY (0x00000000) |
| 78 |
#define NV077_NOTIFY_WRITE_THEN_AWAKEN (0x00000001) |
| 79 |
#define NV077_SET_CONTEXT_DMA_NOTIFIES (0x00000180) |
| 80 |
#define NV077_SET_CONTEXT_DMA_IMAGE (0x00000184) |
| 81 |
#define NV077_SET_CONTEXT_PATTERN (0x00000188) |
| 82 |
#define NV077_SET_CONTEXT_ROP (0x0000018C) |
| 83 |
#define NV077_SET_CONTEXT_BETA1 (0x00000190) |
| 84 |
#define NV077_SET_CONTEXT_BETA4 (0x00000194) |
| 85 |
#define NV077_SET_CONTEXT_SURFACE (0x00000198) |
| 86 |
#define NV077_SET_COLOR_FORMAT (0x00000300) |
| 87 |
#define NV077_SET_COLOR_FORMAT_LE_A1R5G5B5 (0x00000001) |
| 88 |
#define NV077_SET_COLOR_FORMAT_LE_X1R5G5B5 (0x00000002) |
| 89 |
#define NV077_SET_COLOR_FORMAT_LE_A8R8G8B8 (0x00000003) |
| 90 |
#define NV077_SET_COLOR_FORMAT_LE_X8R8G8B8 (0x00000004) |
| 91 |
#define NV077_SET_COLOR_FORMAT_LE_V8YB8U8YA8 (0x00000005) |
| 92 |
#define NV077_SET_COLOR_FORMAT_LE_YB8V8YA8U8 (0x00000006) |
| 93 |
#define NV077_SET_COLOR_FORMAT_LE_R5G6B5 (0x00000007) |
| 94 |
#define NV077_SET_OPERATION (0x00000304) |
| 95 |
#define NV077_SET_OPERATION_SRCCOPY_AND (0x00000000) |
| 96 |
#define NV077_SET_OPERATION_ROP_AND (0x00000001) |
| 97 |
#define NV077_SET_OPERATION_BLEND_AND (0x00000002) |
| 98 |
#define NV077_SET_OPERATION_SRCCOPY (0x00000003) |
| 99 |
#define NV077_SET_OPERATION_SRCCOPY_PREMULT (0x00000004) |
| 100 |
#define NV077_SET_OPERATION_BLEND_PREMULT (0x00000005) |
| 101 |
#define NV077_CLIP_POINT (0x00000308) |
| 102 |
#define NV077_CLIP_POINT_X 15:0 |
| 103 |
#define NV077_CLIP_POINT_Y 31:16 |
| 104 |
#define NV077_CLIP_SIZE (0x0000030C) |
| 105 |
#define NV077_CLIP_SIZE_WIDTH 15:0 |
| 106 |
#define NV077_CLIP_SIZE_HEIGHT 31:16 |
| 107 |
#define NV077_IMAGE_OUT_POINT (0x00000310) |
| 108 |
#define NV077_IMAGE_OUT_POINT_X 15:0 |
| 109 |
#define NV077_IMAGE_OUT_POINT_Y 31:16 |
| 110 |
#define NV077_IMAGE_OUT_SIZE (0x00000314) |
| 111 |
#define NV077_IMAGE_OUT_SIZE_WIDTH 15:0 |
| 112 |
#define NV077_IMAGE_OUT_SIZE_HEIGHT 31:16 |
| 113 |
#define NV077_DELTA_DU_DX (0x00000318) |
| 114 |
#define NV077_DELTA_DV_DY (0x0000031C) |
| 115 |
#define NV077_IMAGE_IN_SIZE (0x00000400) |
| 116 |
#define NV077_IMAGE_IN_SIZE_WIDTH 15:0 |
| 117 |
#define NV077_IMAGE_IN_SIZE_HEIGHT 31:16 |
| 118 |
#define NV077_IMAGE_IN_FORMAT (0x00000404) |
| 119 |
#define NV077_IMAGE_IN_FORMAT_PITCH 15:0 |
| 120 |
#define NV077_IMAGE_IN_FORMAT_ORIGIN 23:16 |
| 121 |
#define NV077_IMAGE_IN_FORMAT_ORIGIN_CENTER (0x00000001) |
| 122 |
#define NV077_IMAGE_IN_FORMAT_ORIGIN_CORNER (0x00000002) |
| 123 |
#define NV077_IMAGE_IN_FORMAT_INTERPOLATOR 31:24 |
| 124 |
#define NV077_IMAGE_IN_FORMAT_INTERPOLATOR_ZOH (0x00000000) |
| 125 |
#define NV077_IMAGE_IN_FORMAT_INTERPOLATOR_FOH (0x00000001) |
| 126 |
#define NV077_IMAGE_IN_OFFSET (0x00000408) |
| 127 |
#define NV077_IMAGE_IN (0x0000040C) |
| 128 |
#define NV077_IMAGE_IN_POINT_U 15:0 |
| 129 |
#define NV077_IMAGE_IN_POINT_V 31:16 |
| 130 |
/* obsolete stuff */ |
| 131 |
#define NV4_SCALED_IMAGE_FROM_MEMORY (0x00000077) |
| 132 |
#define Nv4ScaledImageFromMemory Nv04ScaledImageFromMemory |
| 133 |
#define nv4ScaledImageFromMemory Nv04ScaledImageFromMemory |
| 134 |
#define nv04ScaledImageFromMemory Nv04ScaledImageFromMemory |
| 135 |
|
| 136 |
#ifdef __cplusplus |
| 137 |
}; /* extern "C" */ |
| 138 |
#endif |
| 139 |
|
| 140 |
#endif /* _cl0077_h_ */ |