1 /* 2 * Copyright (c) 2001-2001, 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 #ifndef _cl0039_h_ 24 #define _cl0039_h_ 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 #include "nvtypes.h" 31 32 #define NV03_MEMORY_TO_MEMORY_FORMAT (0x00000039) 33 /* NvNotification[] elements */ 34 #define NV039_NOTIFIERS_NOTIFY (0) 35 #define NV039_NOTIFIERS_BUFFER_NOTIFY (1) 36 #define NV039_NOTIFIERS_MAXCOUNT (2) 37 /* NvNotification[] fields and values */ 38 #define NV039_NOTIFICATION_STATUS_IN_PROGRESS (0x8000) 39 #define NV039_NOTIFICATION_STATUS_ERROR_PROTECTION_FAULT (0x4000) 40 #define NV039_NOTIFICATION_STATUS_ERROR_BAD_ARGUMENT (0x2000) 41 #define NV039_NOTIFICATION_STATUS_ERROR_INVALID_STATE (0x1000) 42 #define NV039_NOTIFICATION_STATUS_ERROR_STATE_IN_USE (0x0800) 43 #define NV039_NOTIFICATION_STATUS_DONE_SUCCESS (0x0000) 44 /* pio method data structure */ 45 typedef volatile struct _cl0039_tag0 { 46 NvV32 NoOperation; /* ignored 0100-0103*/ 47 NvV32 Notify; /* NV039_NOTIFY_* 0104-0107*/ 48 NvV32 Reserved00[0x01e]; 49 NvV32 SetContextDmaNotifies; /* NV01_CONTEXT_DMA 0180-0183*/ 50 NvV32 SetContextDmaBufferIn; /* NV01_CONTEXT_DMA 0184-0187*/ 51 NvV32 SetContextDmaBufferOut; /* NV01_CONTEXT_DMA 0188-018b*/ 52 NvV32 Reserved01[0x060]; 53 #ifdef NV_LDDM 54 NvU32 LDDMBuffer; /* Buffer Number 0300-0303*/ 55 NvU32 LDDMSetResource; /* Set Resource 0304-0307*/ 56 NvU32 LDDMSetResourceState; /* Set Resource State 0308-030B*/ 57 #endif 58 NvU32 OffsetIn; /* src offset in bytes 030c-030f*/ 59 NvU32 OffsetOut; /* dst offset in bytes 0310-0313*/ 60 NvS32 PitchIn; /* delta in bytes, vert pixel delta 0314-0317*/ 61 NvS32 PitchOut; /* delta in bytes, vert pixel delta 0318-031b*/ 62 NvU32 LineLengthIn; /* in bytes 031c-031f*/ 63 NvU32 LineCount; /* in lines 0320-0323*/ 64 NvV32 Format; /* out_in U24_U8 0324-0327*/ 65 NvV32 BufferNotify; /* NV039_BUFFER_NOTIFY_* 0328-032b*/ 66 NvV32 Reserved02[0x735]; 67 } Nv039Typedef, Nv03MemoryToMemoryFormat; 68 #define NV039_TYPEDEF Nv03MemoryToMemoryFormat 69 /* dma method offsets, fields, and values */ 70 #define NV039_SET_OBJECT (0x00000000) 71 #define NV039_NO_OPERATION (0x00000100) 72 #define NV039_NOTIFY (0x00000104) 73 #define NV039_NOTIFY_WRITE_ONLY (0x00000000) 74 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_1 (0x00000001) 75 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_2 (0x00000002) 76 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_3 (0x00000003) 77 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_4 (0x00000004) 78 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_5 (0x00000005) 79 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_6 (0x00000006) 80 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_7 (0x00000007) 81 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_8 (0x00000008) 82 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_9 (0x00000009) 83 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_A (0x0000000A) 84 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_B (0x0000000B) 85 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_C (0x0000000C) 86 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_D (0x0000000D) 87 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_E (0x0000000E) 88 #define NV039_NOTIFY_WRITE_THEN_AWAKEN_F (0x0000000F) 89 #define NV039_SET_CONTEXT_DMA_NOTIFIES (0x00000180) 90 #define NV039_SET_CONTEXT_DMA_BUFFER_IN (0x00000184) 91 #define NV039_SET_CONTEXT_DMA_BUFFER_OUT (0x00000188) 92 93 #ifdef NV_LDDM 94 // For 32 Bit Handles 95 #define NV039_LDDM_BIND_RESOURCE (0x00000200) 96 #define NV039_LDDM_UNBIND_RESOURCE (0x00000204) 97 #define NV039_LDDM_ENABLE_RESOURCE (0x00000208) 98 #define NV039_LDDM_UPDATE_OFFSET (0x0000020C) 99 #define NV039_LDDM_UPDATE_OFFSET_LOCATION 1:0 100 #define NV039_LDDM_UPDATE_OFFSET_LOCATION_VIDMEM 0x00000000 101 #define NV039_LDDM_UPDATE_OFFSET_LOCATION_PCI 0x00000001 102 #define NV039_LDDM_UPDATE_OFFSET_OFFSET 31:2 103 104 #define NV039_LDDM_DISABLE_RESOURCE (0x00000210) 105 #define NV039_LDDM_ENABLE_RESOURCE_IMMEDIATE (0x00000214) 106 107 108 #endif 109 110 #define NV039_SET_HRESOURCE (0x00000218) 111 #define NV039_SET_HDMA (0x0000021C) 112 #define NV039_SET_HDMA_CONTEXT (0x00000220) 113 #define NV039_SET_START_PAGE (0x00000224) 114 //#define NV039_SET_COUNT (0x00000228) 115 #define NV039_SET_HIGH_PTE_DATA (0x0000022C) 116 #define NV039_SET_LOW_PTE_DATA (0x00000230) 117 118 #define NV039_OFFSET_IN (0x0000030C) 119 #define NV039_OFFSET_OUT (0x00000310) 120 #define NV039_PITCH_IN (0x00000314) 121 #define NV039_PITCH_OUT (0x00000318) 122 #define NV039_LINE_LENGTH_IN (0x0000031C) 123 #define NV039_LINE_COUNT (0x00000320) 124 #define NV039_FORMAT (0x00000324) 125 #define NV039_FORMAT_IN 7:0 126 #define NV039_FORMAT_OUT 31:8 127 #define NV039_BUFFER_NOTIFY (0x00000328) 128 #define NV039_BUFFER_NOTIFY_WRITE_ONLY (0x00000000) 129 #define NV039_BUFFER_NOTIFY_WRITE_THEN_AWAKEN (0x00000001) 130 /* obsolete stuff */ 131 #define NV3_MEMORY_TO_MEMORY_FORMAT (0x00000039) 132 #define Nv3MemoryToMemoryFormat Nv03MemoryToMemoryFormat 133 #define nv3MemoryToMemoryFormat Nv03MemoryToMemoryFormat 134 #define nv03MemoryToMemoryFormat Nv03MemoryToMemoryFormat 135 136 #ifdef __cplusplus 137 }; /* extern "C" */ 138 #endif 139 140 #endif /* _cl0039_h_ */ 141