18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2016 Advanced Micro Devices, Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci#ifndef SI_ENUMS_H 248c2ecf20Sopenharmony_ci#define SI_ENUMS_H 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define VBLANK_INT_MASK (1 << 0) 278c2ecf20Sopenharmony_ci#define DC_HPDx_INT_EN (1 << 16) 288c2ecf20Sopenharmony_ci#define VBLANK_ACK (1 << 4) 298c2ecf20Sopenharmony_ci#define VLINE_ACK (1 << 4) 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define CURSOR_WIDTH 64 328c2ecf20Sopenharmony_ci#define CURSOR_HEIGHT 64 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#define VGA_VSTATUS_CNTL 0xFFFCFFFF 358c2ecf20Sopenharmony_ci#define PRIORITY_MARK_MASK 0x7fff 368c2ecf20Sopenharmony_ci#define PRIORITY_OFF (1 << 16) 378c2ecf20Sopenharmony_ci#define PRIORITY_ALWAYS_ON (1 << 20) 388c2ecf20Sopenharmony_ci#define INTERLEAVE_EN (1 << 0) 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define LATENCY_WATERMARK_MASK(x) ((x) << 16) 418c2ecf20Sopenharmony_ci#define DC_LB_MEMORY_CONFIG(x) ((x) << 20) 428c2ecf20Sopenharmony_ci#define ICON_DEGAMMA_MODE(x) (((x) & 0x3) << 8) 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#define GRPH_ENDIAN_SWAP(x) (((x) & 0x3) << 0) 458c2ecf20Sopenharmony_ci#define GRPH_ENDIAN_NONE 0 468c2ecf20Sopenharmony_ci#define GRPH_ENDIAN_8IN16 1 478c2ecf20Sopenharmony_ci#define GRPH_ENDIAN_8IN32 2 488c2ecf20Sopenharmony_ci#define GRPH_ENDIAN_8IN64 3 498c2ecf20Sopenharmony_ci#define GRPH_RED_CROSSBAR(x) (((x) & 0x3) << 4) 508c2ecf20Sopenharmony_ci#define GRPH_RED_SEL_R 0 518c2ecf20Sopenharmony_ci#define GRPH_RED_SEL_G 1 528c2ecf20Sopenharmony_ci#define GRPH_RED_SEL_B 2 538c2ecf20Sopenharmony_ci#define GRPH_RED_SEL_A 3 548c2ecf20Sopenharmony_ci#define GRPH_GREEN_CROSSBAR(x) (((x) & 0x3) << 6) 558c2ecf20Sopenharmony_ci#define GRPH_GREEN_SEL_G 0 568c2ecf20Sopenharmony_ci#define GRPH_GREEN_SEL_B 1 578c2ecf20Sopenharmony_ci#define GRPH_GREEN_SEL_A 2 588c2ecf20Sopenharmony_ci#define GRPH_GREEN_SEL_R 3 598c2ecf20Sopenharmony_ci#define GRPH_BLUE_CROSSBAR(x) (((x) & 0x3) << 8) 608c2ecf20Sopenharmony_ci#define GRPH_BLUE_SEL_B 0 618c2ecf20Sopenharmony_ci#define GRPH_BLUE_SEL_A 1 628c2ecf20Sopenharmony_ci#define GRPH_BLUE_SEL_R 2 638c2ecf20Sopenharmony_ci#define GRPH_BLUE_SEL_G 3 648c2ecf20Sopenharmony_ci#define GRPH_ALPHA_CROSSBAR(x) (((x) & 0x3) << 10) 658c2ecf20Sopenharmony_ci#define GRPH_ALPHA_SEL_A 0 668c2ecf20Sopenharmony_ci#define GRPH_ALPHA_SEL_R 1 678c2ecf20Sopenharmony_ci#define GRPH_ALPHA_SEL_G 2 688c2ecf20Sopenharmony_ci#define GRPH_ALPHA_SEL_B 3 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci#define GRPH_DEPTH(x) (((x) & 0x3) << 0) 718c2ecf20Sopenharmony_ci#define GRPH_DEPTH_8BPP 0 728c2ecf20Sopenharmony_ci#define GRPH_DEPTH_16BPP 1 738c2ecf20Sopenharmony_ci#define GRPH_DEPTH_32BPP 2 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define GRPH_FORMAT(x) (((x) & 0x7) << 8) 768c2ecf20Sopenharmony_ci#define GRPH_FORMAT_INDEXED 0 778c2ecf20Sopenharmony_ci#define GRPH_FORMAT_ARGB1555 0 788c2ecf20Sopenharmony_ci#define GRPH_FORMAT_ARGB565 1 798c2ecf20Sopenharmony_ci#define GRPH_FORMAT_ARGB4444 2 808c2ecf20Sopenharmony_ci#define GRPH_FORMAT_AI88 3 818c2ecf20Sopenharmony_ci#define GRPH_FORMAT_MONO16 4 828c2ecf20Sopenharmony_ci#define GRPH_FORMAT_BGRA5551 5 838c2ecf20Sopenharmony_ci#define GRPH_FORMAT_ARGB8888 0 848c2ecf20Sopenharmony_ci#define GRPH_FORMAT_ARGB2101010 1 858c2ecf20Sopenharmony_ci#define GRPH_FORMAT_32BPP_DIG 2 868c2ecf20Sopenharmony_ci#define GRPH_FORMAT_8B_ARGB2101010 3 878c2ecf20Sopenharmony_ci#define GRPH_FORMAT_BGRA1010102 4 888c2ecf20Sopenharmony_ci#define GRPH_FORMAT_8B_BGRA1010102 5 898c2ecf20Sopenharmony_ci#define GRPH_FORMAT_RGB111110 6 908c2ecf20Sopenharmony_ci#define GRPH_FORMAT_BGR101111 7 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define GRPH_NUM_BANKS(x) (((x) & 0x3) << 2) 938c2ecf20Sopenharmony_ci#define GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20) 948c2ecf20Sopenharmony_ci#define GRPH_ARRAY_LINEAR_GENERAL 0 958c2ecf20Sopenharmony_ci#define GRPH_ARRAY_LINEAR_ALIGNED 1 968c2ecf20Sopenharmony_ci#define GRPH_ARRAY_1D_TILED_THIN1 2 978c2ecf20Sopenharmony_ci#define GRPH_ARRAY_2D_TILED_THIN1 4 988c2ecf20Sopenharmony_ci#define GRPH_TILE_SPLIT(x) (((x) & 0x7) << 13) 998c2ecf20Sopenharmony_ci#define GRPH_BANK_WIDTH(x) (((x) & 0x3) << 6) 1008c2ecf20Sopenharmony_ci#define GRPH_BANK_HEIGHT(x) (((x) & 0x3) << 11) 1018c2ecf20Sopenharmony_ci#define GRPH_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 18) 1028c2ecf20Sopenharmony_ci#define GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20) 1038c2ecf20Sopenharmony_ci#define GRPH_PIPE_CONFIG(x) (((x) & 0x1f) << 24) 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci#define CURSOR_EN (1 << 0) 1068c2ecf20Sopenharmony_ci#define CURSOR_MODE(x) (((x) & 0x3) << 8) 1078c2ecf20Sopenharmony_ci#define CURSOR_MONO 0 1088c2ecf20Sopenharmony_ci#define CURSOR_24_1 1 1098c2ecf20Sopenharmony_ci#define CURSOR_24_8_PRE_MULT 2 1108c2ecf20Sopenharmony_ci#define CURSOR_24_8_UNPRE_MULT 3 1118c2ecf20Sopenharmony_ci#define CURSOR_2X_MAGNIFY (1 << 16) 1128c2ecf20Sopenharmony_ci#define CURSOR_FORCE_MC_ON (1 << 20) 1138c2ecf20Sopenharmony_ci#define CURSOR_URGENT_CONTROL(x) (((x) & 0x7) << 24) 1148c2ecf20Sopenharmony_ci#define CURSOR_URGENT_ALWAYS 0 1158c2ecf20Sopenharmony_ci#define CURSOR_URGENT_1_8 1 1168c2ecf20Sopenharmony_ci#define CURSOR_URGENT_1_4 2 1178c2ecf20Sopenharmony_ci#define CURSOR_URGENT_3_8 3 1188c2ecf20Sopenharmony_ci#define CURSOR_URGENT_1_2 4 1198c2ecf20Sopenharmony_ci#define CURSOR_UPDATE_PENDING (1 << 0) 1208c2ecf20Sopenharmony_ci#define CURSOR_UPDATE_TAKEN (1 << 1) 1218c2ecf20Sopenharmony_ci#define CURSOR_UPDATE_LOCK (1 << 16) 1228c2ecf20Sopenharmony_ci#define CURSOR_DISABLE_MULTIPLE_UPDATE (1 << 24) 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci#define SI_CRTC0_REGISTER_OFFSET 0 1258c2ecf20Sopenharmony_ci#define SI_CRTC1_REGISTER_OFFSET 0x300 1268c2ecf20Sopenharmony_ci#define SI_CRTC2_REGISTER_OFFSET 0x2600 1278c2ecf20Sopenharmony_ci#define SI_CRTC3_REGISTER_OFFSET 0x2900 1288c2ecf20Sopenharmony_ci#define SI_CRTC4_REGISTER_OFFSET 0x2c00 1298c2ecf20Sopenharmony_ci#define SI_CRTC5_REGISTER_OFFSET 0x2f00 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci#define DMA0_REGISTER_OFFSET 0x000 1328c2ecf20Sopenharmony_ci#define DMA1_REGISTER_OFFSET 0x200 1338c2ecf20Sopenharmony_ci#define ES_AND_GS_AUTO 3 1348c2ecf20Sopenharmony_ci#define RADEON_PACKET_TYPE3 3 1358c2ecf20Sopenharmony_ci#define CE_PARTITION_BASE 3 1368c2ecf20Sopenharmony_ci#define BUF_SWAP_32BIT (2 << 16) 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci#define GFX_POWER_STATUS (1 << 1) 1398c2ecf20Sopenharmony_ci#define GFX_CLOCK_STATUS (1 << 2) 1408c2ecf20Sopenharmony_ci#define GFX_LS_STATUS (1 << 3) 1418c2ecf20Sopenharmony_ci#define RLC_BUSY_STATUS (1 << 0) 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci#define RLC_PUD(x) ((x) << 0) 1448c2ecf20Sopenharmony_ci#define RLC_PUD_MASK (0xff << 0) 1458c2ecf20Sopenharmony_ci#define RLC_PDD(x) ((x) << 8) 1468c2ecf20Sopenharmony_ci#define RLC_PDD_MASK (0xff << 8) 1478c2ecf20Sopenharmony_ci#define RLC_TTPD(x) ((x) << 16) 1488c2ecf20Sopenharmony_ci#define RLC_TTPD_MASK (0xff << 16) 1498c2ecf20Sopenharmony_ci#define RLC_MSD(x) ((x) << 24) 1508c2ecf20Sopenharmony_ci#define RLC_MSD_MASK (0xff << 24) 1518c2ecf20Sopenharmony_ci#define WRITE_DATA_ENGINE_SEL(x) ((x) << 30) 1528c2ecf20Sopenharmony_ci#define WRITE_DATA_DST_SEL(x) ((x) << 8) 1538c2ecf20Sopenharmony_ci#define EVENT_TYPE(x) ((x) << 0) 1548c2ecf20Sopenharmony_ci#define EVENT_INDEX(x) ((x) << 8) 1558c2ecf20Sopenharmony_ci#define WAIT_REG_MEM_MEM_SPACE(x) ((x) << 4) 1568c2ecf20Sopenharmony_ci#define WAIT_REG_MEM_FUNCTION(x) ((x) << 0) 1578c2ecf20Sopenharmony_ci#define WAIT_REG_MEM_ENGINE(x) ((x) << 8) 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci#define GFX6_NUM_GFX_RINGS 1 1608c2ecf20Sopenharmony_ci#define GFX6_NUM_COMPUTE_RINGS 2 1618c2ecf20Sopenharmony_ci#define RLC_SAVE_AND_RESTORE_STARTING_OFFSET 0x90 1628c2ecf20Sopenharmony_ci#define RLC_CLEAR_STATE_DESCRIPTOR_OFFSET 0x3D 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci#define TAHITI_GB_ADDR_CONFIG_GOLDEN 0x12011003 1658c2ecf20Sopenharmony_ci#define VERDE_GB_ADDR_CONFIG_GOLDEN 0x02010002 1668c2ecf20Sopenharmony_ci#define HAINAN_GB_ADDR_CONFIG_GOLDEN 0x02011003 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci#define PACKET3(op, n) ((RADEON_PACKET_TYPE3 << 30) | \ 1698c2ecf20Sopenharmony_ci (((op) & 0xFF) << 8) | \ 1708c2ecf20Sopenharmony_ci ((n) & 0x3FFF) << 16) 1718c2ecf20Sopenharmony_ci#define PACKET3_COMPUTE(op, n) (PACKET3(op, n) | 1 << 1) 1728c2ecf20Sopenharmony_ci#define PACKET3_NOP 0x10 1738c2ecf20Sopenharmony_ci#define PACKET3_SET_BASE 0x11 1748c2ecf20Sopenharmony_ci#define PACKET3_BASE_INDEX(x) ((x) << 0) 1758c2ecf20Sopenharmony_ci#define PACKET3_CLEAR_STATE 0x12 1768c2ecf20Sopenharmony_ci#define PACKET3_INDEX_BUFFER_SIZE 0x13 1778c2ecf20Sopenharmony_ci#define PACKET3_DISPATCH_DIRECT 0x15 1788c2ecf20Sopenharmony_ci#define PACKET3_DISPATCH_INDIRECT 0x16 1798c2ecf20Sopenharmony_ci#define PACKET3_ALLOC_GDS 0x1B 1808c2ecf20Sopenharmony_ci#define PACKET3_WRITE_GDS_RAM 0x1C 1818c2ecf20Sopenharmony_ci#define PACKET3_ATOMIC_GDS 0x1D 1828c2ecf20Sopenharmony_ci#define PACKET3_ATOMIC 0x1E 1838c2ecf20Sopenharmony_ci#define PACKET3_OCCLUSION_QUERY 0x1F 1848c2ecf20Sopenharmony_ci#define PACKET3_SET_PREDICATION 0x20 1858c2ecf20Sopenharmony_ci#define PACKET3_REG_RMW 0x21 1868c2ecf20Sopenharmony_ci#define PACKET3_COND_EXEC 0x22 1878c2ecf20Sopenharmony_ci#define PACKET3_PRED_EXEC 0x23 1888c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDIRECT 0x24 1898c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_INDIRECT 0x25 1908c2ecf20Sopenharmony_ci#define PACKET3_INDEX_BASE 0x26 1918c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_2 0x27 1928c2ecf20Sopenharmony_ci#define PACKET3_CONTEXT_CONTROL 0x28 1938c2ecf20Sopenharmony_ci#define PACKET3_INDEX_TYPE 0x2A 1948c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDIRECT_MULTI 0x2C 1958c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_AUTO 0x2D 1968c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_IMMD 0x2E 1978c2ecf20Sopenharmony_ci#define PACKET3_NUM_INSTANCES 0x2F 1988c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_MULTI_AUTO 0x30 1998c2ecf20Sopenharmony_ci#define PACKET3_INDIRECT_BUFFER_CONST 0x31 2008c2ecf20Sopenharmony_ci#define PACKET3_INDIRECT_BUFFER 0x3F 2018c2ecf20Sopenharmony_ci#define PACKET3_STRMOUT_BUFFER_UPDATE 0x34 2028c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_OFFSET_2 0x35 2038c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_MULTI_ELEMENT 0x36 2048c2ecf20Sopenharmony_ci#define PACKET3_WRITE_DATA 0x37 2058c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_INDIRECT_MULTI 0x38 2068c2ecf20Sopenharmony_ci#define PACKET3_MEM_SEMAPHORE 0x39 2078c2ecf20Sopenharmony_ci#define PACKET3_MPEG_INDEX 0x3A 2088c2ecf20Sopenharmony_ci#define PACKET3_COPY_DW 0x3B 2098c2ecf20Sopenharmony_ci#define PACKET3_WAIT_REG_MEM 0x3C 2108c2ecf20Sopenharmony_ci#define PACKET3_MEM_WRITE 0x3D 2118c2ecf20Sopenharmony_ci#define PACKET3_COPY_DATA 0x40 2128c2ecf20Sopenharmony_ci#define PACKET3_CP_DMA 0x41 2138c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_DST_SEL(x) ((x) << 20) 2148c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_ENGINE(x) ((x) << 27) 2158c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_SRC_SEL(x) ((x) << 29) 2168c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CP_SYNC (1 << 31) 2178c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_DIS_WC (1 << 21) 2188c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22) 2198c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_DST_SWAP(x) ((x) << 24) 2208c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_SAS (1 << 26) 2218c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_DAS (1 << 27) 2228c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_SAIC (1 << 28) 2238c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_DAIC (1 << 29) 2248c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_RAW_WAIT (1 << 30) 2258c2ecf20Sopenharmony_ci#define PACKET3_PFP_SYNC_ME 0x42 2268c2ecf20Sopenharmony_ci#define PACKET3_SURFACE_SYNC 0x43 2278c2ecf20Sopenharmony_ci# define PACKET3_DEST_BASE_0_ENA (1 << 0) 2288c2ecf20Sopenharmony_ci# define PACKET3_DEST_BASE_1_ENA (1 << 1) 2298c2ecf20Sopenharmony_ci# define PACKET3_CB0_DEST_BASE_ENA (1 << 6) 2308c2ecf20Sopenharmony_ci# define PACKET3_CB1_DEST_BASE_ENA (1 << 7) 2318c2ecf20Sopenharmony_ci# define PACKET3_CB2_DEST_BASE_ENA (1 << 8) 2328c2ecf20Sopenharmony_ci# define PACKET3_CB3_DEST_BASE_ENA (1 << 9) 2338c2ecf20Sopenharmony_ci# define PACKET3_CB4_DEST_BASE_ENA (1 << 10) 2348c2ecf20Sopenharmony_ci# define PACKET3_CB5_DEST_BASE_ENA (1 << 11) 2358c2ecf20Sopenharmony_ci# define PACKET3_CB6_DEST_BASE_ENA (1 << 12) 2368c2ecf20Sopenharmony_ci# define PACKET3_CB7_DEST_BASE_ENA (1 << 13) 2378c2ecf20Sopenharmony_ci# define PACKET3_DB_DEST_BASE_ENA (1 << 14) 2388c2ecf20Sopenharmony_ci# define PACKET3_DEST_BASE_2_ENA (1 << 19) 2398c2ecf20Sopenharmony_ci# define PACKET3_DEST_BASE_3_ENA (1 << 21) 2408c2ecf20Sopenharmony_ci# define PACKET3_TCL1_ACTION_ENA (1 << 22) 2418c2ecf20Sopenharmony_ci# define PACKET3_TC_ACTION_ENA (1 << 23) 2428c2ecf20Sopenharmony_ci# define PACKET3_CB_ACTION_ENA (1 << 25) 2438c2ecf20Sopenharmony_ci# define PACKET3_DB_ACTION_ENA (1 << 26) 2448c2ecf20Sopenharmony_ci# define PACKET3_SH_KCACHE_ACTION_ENA (1 << 27) 2458c2ecf20Sopenharmony_ci# define PACKET3_SH_ICACHE_ACTION_ENA (1 << 29) 2468c2ecf20Sopenharmony_ci#define PACKET3_ME_INITIALIZE 0x44 2478c2ecf20Sopenharmony_ci#define PACKET3_ME_INITIALIZE_DEVICE_ID(x) ((x) << 16) 2488c2ecf20Sopenharmony_ci#define PACKET3_COND_WRITE 0x45 2498c2ecf20Sopenharmony_ci#define PACKET3_EVENT_WRITE 0x46 2508c2ecf20Sopenharmony_ci#define PACKET3_EVENT_WRITE_EOP 0x47 2518c2ecf20Sopenharmony_ci#define PACKET3_EVENT_WRITE_EOS 0x48 2528c2ecf20Sopenharmony_ci#define PACKET3_PREAMBLE_CNTL 0x4A 2538c2ecf20Sopenharmony_ci# define PACKET3_PREAMBLE_BEGIN_CLEAR_STATE (2 << 28) 2548c2ecf20Sopenharmony_ci# define PACKET3_PREAMBLE_END_CLEAR_STATE (3 << 28) 2558c2ecf20Sopenharmony_ci#define PACKET3_ONE_REG_WRITE 0x57 2568c2ecf20Sopenharmony_ci#define PACKET3_LOAD_CONFIG_REG 0x5F 2578c2ecf20Sopenharmony_ci#define PACKET3_LOAD_CONTEXT_REG 0x60 2588c2ecf20Sopenharmony_ci#define PACKET3_LOAD_SH_REG 0x61 2598c2ecf20Sopenharmony_ci#define PACKET3_SET_CONFIG_REG 0x68 2608c2ecf20Sopenharmony_ci#define PACKET3_SET_CONFIG_REG_START 0x00002000 2618c2ecf20Sopenharmony_ci#define PACKET3_SET_CONFIG_REG_END 0x00002c00 2628c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG 0x69 2638c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG_START 0x000a000 2648c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG_END 0x000a400 2658c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG_INDIRECT 0x73 2668c2ecf20Sopenharmony_ci#define PACKET3_SET_RESOURCE_INDIRECT 0x74 2678c2ecf20Sopenharmony_ci#define PACKET3_SET_SH_REG 0x76 2688c2ecf20Sopenharmony_ci#define PACKET3_SET_SH_REG_START 0x00002c00 2698c2ecf20Sopenharmony_ci#define PACKET3_SET_SH_REG_END 0x00003000 2708c2ecf20Sopenharmony_ci#define PACKET3_SET_SH_REG_OFFSET 0x77 2718c2ecf20Sopenharmony_ci#define PACKET3_ME_WRITE 0x7A 2728c2ecf20Sopenharmony_ci#define PACKET3_SCRATCH_RAM_WRITE 0x7D 2738c2ecf20Sopenharmony_ci#define PACKET3_SCRATCH_RAM_READ 0x7E 2748c2ecf20Sopenharmony_ci#define PACKET3_CE_WRITE 0x7F 2758c2ecf20Sopenharmony_ci#define PACKET3_LOAD_CONST_RAM 0x80 2768c2ecf20Sopenharmony_ci#define PACKET3_WRITE_CONST_RAM 0x81 2778c2ecf20Sopenharmony_ci#define PACKET3_WRITE_CONST_RAM_OFFSET 0x82 2788c2ecf20Sopenharmony_ci#define PACKET3_DUMP_CONST_RAM 0x83 2798c2ecf20Sopenharmony_ci#define PACKET3_INCREMENT_CE_COUNTER 0x84 2808c2ecf20Sopenharmony_ci#define PACKET3_INCREMENT_DE_COUNTER 0x85 2818c2ecf20Sopenharmony_ci#define PACKET3_WAIT_ON_CE_COUNTER 0x86 2828c2ecf20Sopenharmony_ci#define PACKET3_WAIT_ON_DE_COUNTER 0x87 2838c2ecf20Sopenharmony_ci#define PACKET3_WAIT_ON_DE_COUNTER_DIFF 0x88 2848c2ecf20Sopenharmony_ci#define PACKET3_SET_CE_DE_COUNTERS 0x89 2858c2ecf20Sopenharmony_ci#define PACKET3_WAIT_ON_AVAIL_BUFFER 0x8A 2868c2ecf20Sopenharmony_ci#define PACKET3_SWITCH_BUFFER 0x8B 2878c2ecf20Sopenharmony_ci#define PACKET3_SEM_WAIT_ON_SIGNAL (0x1 << 12) 2888c2ecf20Sopenharmony_ci#define PACKET3_SEM_SEL_SIGNAL (0x6 << 29) 2898c2ecf20Sopenharmony_ci#define PACKET3_SEM_SEL_WAIT (0x7 << 29) 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci#endif 292