Debian Codegraph @

src/nouveau/headers/nvidia/classes/clca6f.h

raw
1 /*
2 * SPDX-FileCopyrightText: Copyright (c) 2003-2023 NVIDIA CORPORATION & AFFILIATES
3 * SPDX-License-Identifier: MIT
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23
24 #ifndef __gb202_clca6f_h__
25 #define __gb202_clca6f_h__
26
27 typedef volatile struct Nvca6fControl_struct {
28 NvU32 Ignored00[0x23]; /* 0000-008b*/
29 NvU32 GPPut; /* GP FIFO put offset 008c-008f*/
30 NvU32 Ignored01[0x5c];
31 } Nvca6fControl, BlackwellBControlGPFifo;
32
33 #define BLACKWELL_CHANNEL_GPFIFO_B (0x0000CA6F)
34
35 #define NVCA6F_SET_OBJECT (0x00000000)
36 #define NVCA6F_SEM_ADDR_LO (0x0000005c)
37 #define NVCA6F_SEM_ADDR_LO_OFFSET 31:2
38 #define NVCA6F_SEM_ADDR_HI (0x00000060)
39 #define NVCA6F_SEM_ADDR_HI_OFFSET 24:0
40 #define NVCA6F_SEM_PAYLOAD_LO (0x00000064)
41 #define NVCA6F_SEM_PAYLOAD_HI (0x00000068)
42 #define NVCA6F_SEM_EXECUTE (0x0000006c)
43 #define NVCA6F_SEM_EXECUTE_OPERATION 2:0
44 #define NVCA6F_SEM_EXECUTE_OPERATION_ACQUIRE 0x00000000
45 #define NVCA6F_SEM_EXECUTE_OPERATION_RELEASE 0x00000001
46 #define NVCA6F_SEM_EXECUTE_RELEASE_WFI 20:20
47 #define NVCA6F_SEM_EXECUTE_RELEASE_WFI_DIS 0x00000000
48 #define NVCA6F_SEM_EXECUTE_PAYLOAD_SIZE 24:24
49 #define NVCA6F_SEM_EXECUTE_PAYLOAD_SIZE_32BIT 0x00000000
50
51 /* GPFIFO entry format */
52 #define NVCA6F_GP_ENTRY__SIZE 8
53 #define NVCA6F_GP_ENTRY0_FETCH 0:0
54 #define NVCA6F_GP_ENTRY0_FETCH_UNCONDITIONAL 0x00000000
55 #define NVCA6F_GP_ENTRY0_FETCH_CONDITIONAL 0x00000001
56 #define NVCA6F_GP_ENTRY0_GET 31:2
57 #define NVCA6F_GP_ENTRY0_OPERAND 31:0
58 #define NVCA6F_GP_ENTRY0_PB_EXTENDED_BASE_OPERAND 24:8
59 #define NVCA6F_GP_ENTRY1_GET_HI 7:0
60 #define NVCA6F_GP_ENTRY1_LEVEL 9:9
61 #define NVCA6F_GP_ENTRY1_LEVEL_MAIN 0x00000000
62 #define NVCA6F_GP_ENTRY1_LEVEL_SUBROUTINE 0x00000001
63 #define NVCA6F_GP_ENTRY1_LENGTH 30:10
64 #define NVCA6F_GP_ENTRY1_SYNC 31:31
65 #define NVCA6F_GP_ENTRY1_SYNC_PROCEED 0x00000000
66 #define NVCA6F_GP_ENTRY1_SYNC_WAIT 0x00000001
67 #define NVCA6F_GP_ENTRY1_OPCODE 7:0
68 #define NVCA6F_GP_ENTRY1_OPCODE_NOP 0x00000000
69 #define NVCA6F_GP_ENTRY1_OPCODE_ILLEGAL 0x00000001
70 #define NVCA6F_GP_ENTRY1_OPCODE_GP_CRC 0x00000002
71 #define NVCA6F_GP_ENTRY1_OPCODE_PB_CRC 0x00000003
72 #define NVCA6F_GP_ENTRY1_OPCODE_SET_PB_SEGMENT_EXTENDED_BASE 0x00000004
73
74 #endif // __gb202_clca6f_h__