18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2010 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 * Authors: Alex Deucher 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci#ifndef EVERGREEND_H 258c2ecf20Sopenharmony_ci#define EVERGREEND_H 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_SH_GPRS 256 288c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_TEMP_GPRS 16 298c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_SH_THREADS 256 308c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_SH_STACK_ENTRIES 4096 318c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_FRC_EOV_CNT 16384 328c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_BACKENDS 8 338c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_BACKENDS_MASK 0xFF 348c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_SIMDS 16 358c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_SIMDS_MASK 0xFFFF 368c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_PIPES 8 378c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_PIPES_MASK 0xFF 388c2ecf20Sopenharmony_ci#define EVERGREEN_MAX_LDS_NUM 0xFFFF 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define CYPRESS_GB_ADDR_CONFIG_GOLDEN 0x02011003 418c2ecf20Sopenharmony_ci#define BARTS_GB_ADDR_CONFIG_GOLDEN 0x02011003 428c2ecf20Sopenharmony_ci#define CAYMAN_GB_ADDR_CONFIG_GOLDEN 0x02011003 438c2ecf20Sopenharmony_ci#define JUNIPER_GB_ADDR_CONFIG_GOLDEN 0x02010002 448c2ecf20Sopenharmony_ci#define REDWOOD_GB_ADDR_CONFIG_GOLDEN 0x02010002 458c2ecf20Sopenharmony_ci#define TURKS_GB_ADDR_CONFIG_GOLDEN 0x02010002 468c2ecf20Sopenharmony_ci#define CEDAR_GB_ADDR_CONFIG_GOLDEN 0x02010001 478c2ecf20Sopenharmony_ci#define CAICOS_GB_ADDR_CONFIG_GOLDEN 0x02010001 488c2ecf20Sopenharmony_ci#define SUMO_GB_ADDR_CONFIG_GOLDEN 0x02010002 498c2ecf20Sopenharmony_ci#define SUMO2_GB_ADDR_CONFIG_GOLDEN 0x02010002 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci/* pm registers */ 528c2ecf20Sopenharmony_ci#define SMC_MSG 0x20c 538c2ecf20Sopenharmony_ci#define HOST_SMC_MSG(x) ((x) << 0) 548c2ecf20Sopenharmony_ci#define HOST_SMC_MSG_MASK (0xff << 0) 558c2ecf20Sopenharmony_ci#define HOST_SMC_MSG_SHIFT 0 568c2ecf20Sopenharmony_ci#define HOST_SMC_RESP(x) ((x) << 8) 578c2ecf20Sopenharmony_ci#define HOST_SMC_RESP_MASK (0xff << 8) 588c2ecf20Sopenharmony_ci#define HOST_SMC_RESP_SHIFT 8 598c2ecf20Sopenharmony_ci#define SMC_HOST_MSG(x) ((x) << 16) 608c2ecf20Sopenharmony_ci#define SMC_HOST_MSG_MASK (0xff << 16) 618c2ecf20Sopenharmony_ci#define SMC_HOST_MSG_SHIFT 16 628c2ecf20Sopenharmony_ci#define SMC_HOST_RESP(x) ((x) << 24) 638c2ecf20Sopenharmony_ci#define SMC_HOST_RESP_MASK (0xff << 24) 648c2ecf20Sopenharmony_ci#define SMC_HOST_RESP_SHIFT 24 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define DCCG_DISP_SLOW_SELECT_REG 0x4fc 678c2ecf20Sopenharmony_ci#define DCCG_DISP1_SLOW_SELECT(x) ((x) << 0) 688c2ecf20Sopenharmony_ci#define DCCG_DISP1_SLOW_SELECT_MASK (7 << 0) 698c2ecf20Sopenharmony_ci#define DCCG_DISP1_SLOW_SELECT_SHIFT 0 708c2ecf20Sopenharmony_ci#define DCCG_DISP2_SLOW_SELECT(x) ((x) << 4) 718c2ecf20Sopenharmony_ci#define DCCG_DISP2_SLOW_SELECT_MASK (7 << 4) 728c2ecf20Sopenharmony_ci#define DCCG_DISP2_SLOW_SELECT_SHIFT 4 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#define CG_SPLL_FUNC_CNTL 0x600 758c2ecf20Sopenharmony_ci#define SPLL_RESET (1 << 0) 768c2ecf20Sopenharmony_ci#define SPLL_SLEEP (1 << 1) 778c2ecf20Sopenharmony_ci#define SPLL_BYPASS_EN (1 << 3) 788c2ecf20Sopenharmony_ci#define SPLL_REF_DIV(x) ((x) << 4) 798c2ecf20Sopenharmony_ci#define SPLL_REF_DIV_MASK (0x3f << 4) 808c2ecf20Sopenharmony_ci#define SPLL_PDIV_A(x) ((x) << 20) 818c2ecf20Sopenharmony_ci#define SPLL_PDIV_A_MASK (0x7f << 20) 828c2ecf20Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_2 0x604 838c2ecf20Sopenharmony_ci#define SCLK_MUX_SEL(x) ((x) << 0) 848c2ecf20Sopenharmony_ci#define SCLK_MUX_SEL_MASK (0x1ff << 0) 858c2ecf20Sopenharmony_ci#define SCLK_MUX_UPDATE (1 << 26) 868c2ecf20Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_3 0x608 878c2ecf20Sopenharmony_ci#define SPLL_FB_DIV(x) ((x) << 0) 888c2ecf20Sopenharmony_ci#define SPLL_FB_DIV_MASK (0x3ffffff << 0) 898c2ecf20Sopenharmony_ci#define SPLL_DITHEN (1 << 28) 908c2ecf20Sopenharmony_ci#define CG_SPLL_STATUS 0x60c 918c2ecf20Sopenharmony_ci#define SPLL_CHG_STATUS (1 << 1) 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#define MPLL_CNTL_MODE 0x61c 948c2ecf20Sopenharmony_ci# define MPLL_MCLK_SEL (1 << 11) 958c2ecf20Sopenharmony_ci# define SS_SSEN (1 << 24) 968c2ecf20Sopenharmony_ci# define SS_DSMODE_EN (1 << 25) 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci#define MPLL_AD_FUNC_CNTL 0x624 998c2ecf20Sopenharmony_ci#define CLKF(x) ((x) << 0) 1008c2ecf20Sopenharmony_ci#define CLKF_MASK (0x7f << 0) 1018c2ecf20Sopenharmony_ci#define CLKR(x) ((x) << 7) 1028c2ecf20Sopenharmony_ci#define CLKR_MASK (0x1f << 7) 1038c2ecf20Sopenharmony_ci#define CLKFRAC(x) ((x) << 12) 1048c2ecf20Sopenharmony_ci#define CLKFRAC_MASK (0x1f << 12) 1058c2ecf20Sopenharmony_ci#define YCLK_POST_DIV(x) ((x) << 17) 1068c2ecf20Sopenharmony_ci#define YCLK_POST_DIV_MASK (3 << 17) 1078c2ecf20Sopenharmony_ci#define IBIAS(x) ((x) << 20) 1088c2ecf20Sopenharmony_ci#define IBIAS_MASK (0x3ff << 20) 1098c2ecf20Sopenharmony_ci#define RESET (1 << 30) 1108c2ecf20Sopenharmony_ci#define PDNB (1 << 31) 1118c2ecf20Sopenharmony_ci#define MPLL_AD_FUNC_CNTL_2 0x628 1128c2ecf20Sopenharmony_ci#define BYPASS (1 << 19) 1138c2ecf20Sopenharmony_ci#define BIAS_GEN_PDNB (1 << 24) 1148c2ecf20Sopenharmony_ci#define RESET_EN (1 << 25) 1158c2ecf20Sopenharmony_ci#define VCO_MODE (1 << 29) 1168c2ecf20Sopenharmony_ci#define MPLL_DQ_FUNC_CNTL 0x62c 1178c2ecf20Sopenharmony_ci#define MPLL_DQ_FUNC_CNTL_2 0x630 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#define GENERAL_PWRMGT 0x63c 1208c2ecf20Sopenharmony_ci# define GLOBAL_PWRMGT_EN (1 << 0) 1218c2ecf20Sopenharmony_ci# define STATIC_PM_EN (1 << 1) 1228c2ecf20Sopenharmony_ci# define THERMAL_PROTECTION_DIS (1 << 2) 1238c2ecf20Sopenharmony_ci# define THERMAL_PROTECTION_TYPE (1 << 3) 1248c2ecf20Sopenharmony_ci# define ENABLE_GEN2PCIE (1 << 4) 1258c2ecf20Sopenharmony_ci# define ENABLE_GEN2XSP (1 << 5) 1268c2ecf20Sopenharmony_ci# define SW_SMIO_INDEX(x) ((x) << 6) 1278c2ecf20Sopenharmony_ci# define SW_SMIO_INDEX_MASK (3 << 6) 1288c2ecf20Sopenharmony_ci# define SW_SMIO_INDEX_SHIFT 6 1298c2ecf20Sopenharmony_ci# define LOW_VOLT_D2_ACPI (1 << 8) 1308c2ecf20Sopenharmony_ci# define LOW_VOLT_D3_ACPI (1 << 9) 1318c2ecf20Sopenharmony_ci# define VOLT_PWRMGT_EN (1 << 10) 1328c2ecf20Sopenharmony_ci# define BACKBIAS_PAD_EN (1 << 18) 1338c2ecf20Sopenharmony_ci# define BACKBIAS_VALUE (1 << 19) 1348c2ecf20Sopenharmony_ci# define DYN_SPREAD_SPECTRUM_EN (1 << 23) 1358c2ecf20Sopenharmony_ci# define AC_DC_SW (1 << 24) 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci#define SCLK_PWRMGT_CNTL 0x644 1388c2ecf20Sopenharmony_ci# define SCLK_PWRMGT_OFF (1 << 0) 1398c2ecf20Sopenharmony_ci# define SCLK_LOW_D1 (1 << 1) 1408c2ecf20Sopenharmony_ci# define FIR_RESET (1 << 4) 1418c2ecf20Sopenharmony_ci# define FIR_FORCE_TREND_SEL (1 << 5) 1428c2ecf20Sopenharmony_ci# define FIR_TREND_MODE (1 << 6) 1438c2ecf20Sopenharmony_ci# define DYN_GFX_CLK_OFF_EN (1 << 7) 1448c2ecf20Sopenharmony_ci# define GFX_CLK_FORCE_ON (1 << 8) 1458c2ecf20Sopenharmony_ci# define GFX_CLK_REQUEST_OFF (1 << 9) 1468c2ecf20Sopenharmony_ci# define GFX_CLK_FORCE_OFF (1 << 10) 1478c2ecf20Sopenharmony_ci# define GFX_CLK_OFF_ACPI_D1 (1 << 11) 1488c2ecf20Sopenharmony_ci# define GFX_CLK_OFF_ACPI_D2 (1 << 12) 1498c2ecf20Sopenharmony_ci# define GFX_CLK_OFF_ACPI_D3 (1 << 13) 1508c2ecf20Sopenharmony_ci# define DYN_LIGHT_SLEEP_EN (1 << 14) 1518c2ecf20Sopenharmony_ci#define MCLK_PWRMGT_CNTL 0x648 1528c2ecf20Sopenharmony_ci# define DLL_SPEED(x) ((x) << 0) 1538c2ecf20Sopenharmony_ci# define DLL_SPEED_MASK (0x1f << 0) 1548c2ecf20Sopenharmony_ci# define MPLL_PWRMGT_OFF (1 << 5) 1558c2ecf20Sopenharmony_ci# define DLL_READY (1 << 6) 1568c2ecf20Sopenharmony_ci# define MC_INT_CNTL (1 << 7) 1578c2ecf20Sopenharmony_ci# define MRDCKA0_PDNB (1 << 8) 1588c2ecf20Sopenharmony_ci# define MRDCKA1_PDNB (1 << 9) 1598c2ecf20Sopenharmony_ci# define MRDCKB0_PDNB (1 << 10) 1608c2ecf20Sopenharmony_ci# define MRDCKB1_PDNB (1 << 11) 1618c2ecf20Sopenharmony_ci# define MRDCKC0_PDNB (1 << 12) 1628c2ecf20Sopenharmony_ci# define MRDCKC1_PDNB (1 << 13) 1638c2ecf20Sopenharmony_ci# define MRDCKD0_PDNB (1 << 14) 1648c2ecf20Sopenharmony_ci# define MRDCKD1_PDNB (1 << 15) 1658c2ecf20Sopenharmony_ci# define MRDCKA0_RESET (1 << 16) 1668c2ecf20Sopenharmony_ci# define MRDCKA1_RESET (1 << 17) 1678c2ecf20Sopenharmony_ci# define MRDCKB0_RESET (1 << 18) 1688c2ecf20Sopenharmony_ci# define MRDCKB1_RESET (1 << 19) 1698c2ecf20Sopenharmony_ci# define MRDCKC0_RESET (1 << 20) 1708c2ecf20Sopenharmony_ci# define MRDCKC1_RESET (1 << 21) 1718c2ecf20Sopenharmony_ci# define MRDCKD0_RESET (1 << 22) 1728c2ecf20Sopenharmony_ci# define MRDCKD1_RESET (1 << 23) 1738c2ecf20Sopenharmony_ci# define DLL_READY_READ (1 << 24) 1748c2ecf20Sopenharmony_ci# define USE_DISPLAY_GAP (1 << 25) 1758c2ecf20Sopenharmony_ci# define USE_DISPLAY_URGENT_NORMAL (1 << 26) 1768c2ecf20Sopenharmony_ci# define MPLL_TURNOFF_D2 (1 << 28) 1778c2ecf20Sopenharmony_ci#define DLL_CNTL 0x64c 1788c2ecf20Sopenharmony_ci# define MRDCKA0_BYPASS (1 << 24) 1798c2ecf20Sopenharmony_ci# define MRDCKA1_BYPASS (1 << 25) 1808c2ecf20Sopenharmony_ci# define MRDCKB0_BYPASS (1 << 26) 1818c2ecf20Sopenharmony_ci# define MRDCKB1_BYPASS (1 << 27) 1828c2ecf20Sopenharmony_ci# define MRDCKC0_BYPASS (1 << 28) 1838c2ecf20Sopenharmony_ci# define MRDCKC1_BYPASS (1 << 29) 1848c2ecf20Sopenharmony_ci# define MRDCKD0_BYPASS (1 << 30) 1858c2ecf20Sopenharmony_ci# define MRDCKD1_BYPASS (1 << 31) 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ci#define CG_AT 0x6d4 1888c2ecf20Sopenharmony_ci# define CG_R(x) ((x) << 0) 1898c2ecf20Sopenharmony_ci# define CG_R_MASK (0xffff << 0) 1908c2ecf20Sopenharmony_ci# define CG_L(x) ((x) << 16) 1918c2ecf20Sopenharmony_ci# define CG_L_MASK (0xffff << 16) 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ci#define CG_DISPLAY_GAP_CNTL 0x714 1948c2ecf20Sopenharmony_ci# define DISP1_GAP(x) ((x) << 0) 1958c2ecf20Sopenharmony_ci# define DISP1_GAP_MASK (3 << 0) 1968c2ecf20Sopenharmony_ci# define DISP2_GAP(x) ((x) << 2) 1978c2ecf20Sopenharmony_ci# define DISP2_GAP_MASK (3 << 2) 1988c2ecf20Sopenharmony_ci# define VBI_TIMER_COUNT(x) ((x) << 4) 1998c2ecf20Sopenharmony_ci# define VBI_TIMER_COUNT_MASK (0x3fff << 4) 2008c2ecf20Sopenharmony_ci# define VBI_TIMER_UNIT(x) ((x) << 20) 2018c2ecf20Sopenharmony_ci# define VBI_TIMER_UNIT_MASK (7 << 20) 2028c2ecf20Sopenharmony_ci# define DISP1_GAP_MCHG(x) ((x) << 24) 2038c2ecf20Sopenharmony_ci# define DISP1_GAP_MCHG_MASK (3 << 24) 2048c2ecf20Sopenharmony_ci# define DISP2_GAP_MCHG(x) ((x) << 26) 2058c2ecf20Sopenharmony_ci# define DISP2_GAP_MCHG_MASK (3 << 26) 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci#define CG_BIF_REQ_AND_RSP 0x7f4 2088c2ecf20Sopenharmony_ci#define CG_CLIENT_REQ(x) ((x) << 0) 2098c2ecf20Sopenharmony_ci#define CG_CLIENT_REQ_MASK (0xff << 0) 2108c2ecf20Sopenharmony_ci#define CG_CLIENT_REQ_SHIFT 0 2118c2ecf20Sopenharmony_ci#define CG_CLIENT_RESP(x) ((x) << 8) 2128c2ecf20Sopenharmony_ci#define CG_CLIENT_RESP_MASK (0xff << 8) 2138c2ecf20Sopenharmony_ci#define CG_CLIENT_RESP_SHIFT 8 2148c2ecf20Sopenharmony_ci#define CLIENT_CG_REQ(x) ((x) << 16) 2158c2ecf20Sopenharmony_ci#define CLIENT_CG_REQ_MASK (0xff << 16) 2168c2ecf20Sopenharmony_ci#define CLIENT_CG_REQ_SHIFT 16 2178c2ecf20Sopenharmony_ci#define CLIENT_CG_RESP(x) ((x) << 24) 2188c2ecf20Sopenharmony_ci#define CLIENT_CG_RESP_MASK (0xff << 24) 2198c2ecf20Sopenharmony_ci#define CLIENT_CG_RESP_SHIFT 24 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM 0x790 2228c2ecf20Sopenharmony_ci#define SSEN (1 << 0) 2238c2ecf20Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM_2 0x794 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci#define MPLL_SS1 0x85c 2268c2ecf20Sopenharmony_ci#define CLKV(x) ((x) << 0) 2278c2ecf20Sopenharmony_ci#define CLKV_MASK (0x3ffffff << 0) 2288c2ecf20Sopenharmony_ci#define MPLL_SS2 0x860 2298c2ecf20Sopenharmony_ci#define CLKS(x) ((x) << 0) 2308c2ecf20Sopenharmony_ci#define CLKS_MASK (0xfff << 0) 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci#define CG_IND_ADDR 0x8f8 2338c2ecf20Sopenharmony_ci#define CG_IND_DATA 0x8fc 2348c2ecf20Sopenharmony_ci/* CGIND regs */ 2358c2ecf20Sopenharmony_ci#define CG_CGTT_LOCAL_0 0x00 2368c2ecf20Sopenharmony_ci#define CG_CGTT_LOCAL_1 0x01 2378c2ecf20Sopenharmony_ci#define CG_CGTT_LOCAL_2 0x02 2388c2ecf20Sopenharmony_ci#define CG_CGTT_LOCAL_3 0x03 2398c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_0 0x20 2408c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_1 0x21 2418c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_2 0x22 2428c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_3 0x23 2438c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_4 0x24 2448c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_5 0x25 2458c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_6 0x26 2468c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_7 0x27 2478c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_8 0x28 2488c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_9 0x29 2498c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_10 0x2a 2508c2ecf20Sopenharmony_ci#define CG_CGLS_TILE_11 0x2b 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ci#define VM_L2_CG 0x15c0 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci#define MC_CONFIG 0x2000 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci#define MC_CONFIG_MCD 0x20a0 2578c2ecf20Sopenharmony_ci#define MC_CG_CONFIG_MCD 0x20a4 2588c2ecf20Sopenharmony_ci#define MC_RD_ENABLE_MCD(x) ((x) << 8) 2598c2ecf20Sopenharmony_ci#define MC_RD_ENABLE_MCD_MASK (7 << 8) 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci#define MC_HUB_MISC_HUB_CG 0x20b8 2628c2ecf20Sopenharmony_ci#define MC_HUB_MISC_VM_CG 0x20bc 2638c2ecf20Sopenharmony_ci#define MC_HUB_MISC_SIP_CG 0x20c0 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci#define MC_XPB_CLK_GAT 0x2478 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci#define MC_CG_CONFIG 0x25bc 2688c2ecf20Sopenharmony_ci#define MC_RD_ENABLE(x) ((x) << 4) 2698c2ecf20Sopenharmony_ci#define MC_RD_ENABLE_MASK (3 << 4) 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci#define MC_CITF_MISC_RD_CG 0x2648 2728c2ecf20Sopenharmony_ci#define MC_CITF_MISC_WR_CG 0x264c 2738c2ecf20Sopenharmony_ci#define MC_CITF_MISC_VM_CG 0x2650 2748c2ecf20Sopenharmony_ci# define MEM_LS_ENABLE (1 << 19) 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci#define MC_ARB_BURST_TIME 0x2808 2778c2ecf20Sopenharmony_ci#define STATE0(x) ((x) << 0) 2788c2ecf20Sopenharmony_ci#define STATE0_MASK (0x1f << 0) 2798c2ecf20Sopenharmony_ci#define STATE1(x) ((x) << 5) 2808c2ecf20Sopenharmony_ci#define STATE1_MASK (0x1f << 5) 2818c2ecf20Sopenharmony_ci#define STATE2(x) ((x) << 10) 2828c2ecf20Sopenharmony_ci#define STATE2_MASK (0x1f << 10) 2838c2ecf20Sopenharmony_ci#define STATE3(x) ((x) << 15) 2848c2ecf20Sopenharmony_ci#define STATE3_MASK (0x1f << 15) 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci#define MC_SEQ_RAS_TIMING 0x28a0 2878c2ecf20Sopenharmony_ci#define MC_SEQ_CAS_TIMING 0x28a4 2888c2ecf20Sopenharmony_ci#define MC_SEQ_MISC_TIMING 0x28a8 2898c2ecf20Sopenharmony_ci#define MC_SEQ_MISC_TIMING2 0x28ac 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci#define MC_SEQ_RD_CTL_D0 0x28b4 2928c2ecf20Sopenharmony_ci#define MC_SEQ_RD_CTL_D1 0x28b8 2938c2ecf20Sopenharmony_ci#define MC_SEQ_WR_CTL_D0 0x28bc 2948c2ecf20Sopenharmony_ci#define MC_SEQ_WR_CTL_D1 0x28c0 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_ci#define MC_SEQ_STATUS_M 0x29f4 2978c2ecf20Sopenharmony_ci# define PMG_PWRSTATE (1 << 16) 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci#define MC_SEQ_MISC1 0x2a04 3008c2ecf20Sopenharmony_ci#define MC_SEQ_RESERVE_M 0x2a08 3018c2ecf20Sopenharmony_ci#define MC_PMG_CMD_EMRS 0x2a0c 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci#define MC_SEQ_MISC3 0x2a2c 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_ci#define MC_SEQ_MISC5 0x2a54 3068c2ecf20Sopenharmony_ci#define MC_SEQ_MISC6 0x2a58 3078c2ecf20Sopenharmony_ci 3088c2ecf20Sopenharmony_ci#define MC_SEQ_MISC7 0x2a64 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci#define MC_SEQ_CG 0x2a68 3118c2ecf20Sopenharmony_ci#define CG_SEQ_REQ(x) ((x) << 0) 3128c2ecf20Sopenharmony_ci#define CG_SEQ_REQ_MASK (0xff << 0) 3138c2ecf20Sopenharmony_ci#define CG_SEQ_REQ_SHIFT 0 3148c2ecf20Sopenharmony_ci#define CG_SEQ_RESP(x) ((x) << 8) 3158c2ecf20Sopenharmony_ci#define CG_SEQ_RESP_MASK (0xff << 8) 3168c2ecf20Sopenharmony_ci#define CG_SEQ_RESP_SHIFT 8 3178c2ecf20Sopenharmony_ci#define SEQ_CG_REQ(x) ((x) << 16) 3188c2ecf20Sopenharmony_ci#define SEQ_CG_REQ_MASK (0xff << 16) 3198c2ecf20Sopenharmony_ci#define SEQ_CG_REQ_SHIFT 16 3208c2ecf20Sopenharmony_ci#define SEQ_CG_RESP(x) ((x) << 24) 3218c2ecf20Sopenharmony_ci#define SEQ_CG_RESP_MASK (0xff << 24) 3228c2ecf20Sopenharmony_ci#define SEQ_CG_RESP_SHIFT 24 3238c2ecf20Sopenharmony_ci#define MC_SEQ_RAS_TIMING_LP 0x2a6c 3248c2ecf20Sopenharmony_ci#define MC_SEQ_CAS_TIMING_LP 0x2a70 3258c2ecf20Sopenharmony_ci#define MC_SEQ_MISC_TIMING_LP 0x2a74 3268c2ecf20Sopenharmony_ci#define MC_SEQ_MISC_TIMING2_LP 0x2a78 3278c2ecf20Sopenharmony_ci#define MC_SEQ_WR_CTL_D0_LP 0x2a7c 3288c2ecf20Sopenharmony_ci#define MC_SEQ_WR_CTL_D1_LP 0x2a80 3298c2ecf20Sopenharmony_ci#define MC_SEQ_PMG_CMD_EMRS_LP 0x2a84 3308c2ecf20Sopenharmony_ci#define MC_SEQ_PMG_CMD_MRS_LP 0x2a88 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ci#define MC_PMG_CMD_MRS 0x2aac 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci#define MC_SEQ_RD_CTL_D0_LP 0x2b1c 3358c2ecf20Sopenharmony_ci#define MC_SEQ_RD_CTL_D1_LP 0x2b20 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci#define MC_PMG_CMD_MRS1 0x2b44 3388c2ecf20Sopenharmony_ci#define MC_SEQ_PMG_CMD_MRS1_LP 0x2b48 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci#define CGTS_SM_CTRL_REG 0x9150 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci/* Registers */ 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ci#define RCU_IND_INDEX 0x100 3458c2ecf20Sopenharmony_ci#define RCU_IND_DATA 0x104 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci/* discrete uvd clocks */ 3488c2ecf20Sopenharmony_ci#define CG_UPLL_FUNC_CNTL 0x718 3498c2ecf20Sopenharmony_ci# define UPLL_RESET_MASK 0x00000001 3508c2ecf20Sopenharmony_ci# define UPLL_SLEEP_MASK 0x00000002 3518c2ecf20Sopenharmony_ci# define UPLL_BYPASS_EN_MASK 0x00000004 3528c2ecf20Sopenharmony_ci# define UPLL_CTLREQ_MASK 0x00000008 3538c2ecf20Sopenharmony_ci# define UPLL_REF_DIV_MASK 0x003F0000 3548c2ecf20Sopenharmony_ci# define UPLL_VCO_MODE_MASK 0x00000200 3558c2ecf20Sopenharmony_ci# define UPLL_CTLACK_MASK 0x40000000 3568c2ecf20Sopenharmony_ci# define UPLL_CTLACK2_MASK 0x80000000 3578c2ecf20Sopenharmony_ci#define CG_UPLL_FUNC_CNTL_2 0x71c 3588c2ecf20Sopenharmony_ci# define UPLL_PDIV_A(x) ((x) << 0) 3598c2ecf20Sopenharmony_ci# define UPLL_PDIV_A_MASK 0x0000007F 3608c2ecf20Sopenharmony_ci# define UPLL_PDIV_B(x) ((x) << 8) 3618c2ecf20Sopenharmony_ci# define UPLL_PDIV_B_MASK 0x00007F00 3628c2ecf20Sopenharmony_ci# define VCLK_SRC_SEL(x) ((x) << 20) 3638c2ecf20Sopenharmony_ci# define VCLK_SRC_SEL_MASK 0x01F00000 3648c2ecf20Sopenharmony_ci# define DCLK_SRC_SEL(x) ((x) << 25) 3658c2ecf20Sopenharmony_ci# define DCLK_SRC_SEL_MASK 0x3E000000 3668c2ecf20Sopenharmony_ci#define CG_UPLL_FUNC_CNTL_3 0x720 3678c2ecf20Sopenharmony_ci# define UPLL_FB_DIV(x) ((x) << 0) 3688c2ecf20Sopenharmony_ci# define UPLL_FB_DIV_MASK 0x01FFFFFF 3698c2ecf20Sopenharmony_ci#define CG_UPLL_FUNC_CNTL_4 0x854 3708c2ecf20Sopenharmony_ci# define UPLL_SPARE_ISPARE9 0x00020000 3718c2ecf20Sopenharmony_ci#define CG_UPLL_SPREAD_SPECTRUM 0x79c 3728c2ecf20Sopenharmony_ci# define SSEN_MASK 0x00000001 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ci/* fusion uvd clocks */ 3758c2ecf20Sopenharmony_ci#define CG_DCLK_CNTL 0x610 3768c2ecf20Sopenharmony_ci# define DCLK_DIVIDER_MASK 0x7f 3778c2ecf20Sopenharmony_ci# define DCLK_DIR_CNTL_EN (1 << 8) 3788c2ecf20Sopenharmony_ci#define CG_DCLK_STATUS 0x614 3798c2ecf20Sopenharmony_ci# define DCLK_STATUS (1 << 0) 3808c2ecf20Sopenharmony_ci#define CG_VCLK_CNTL 0x618 3818c2ecf20Sopenharmony_ci#define CG_VCLK_STATUS 0x61c 3828c2ecf20Sopenharmony_ci#define CG_SCRATCH1 0x820 3838c2ecf20Sopenharmony_ci 3848c2ecf20Sopenharmony_ci#define RLC_CNTL 0x3f00 3858c2ecf20Sopenharmony_ci# define RLC_ENABLE (1 << 0) 3868c2ecf20Sopenharmony_ci# define GFX_POWER_GATING_ENABLE (1 << 7) 3878c2ecf20Sopenharmony_ci# define GFX_POWER_GATING_SRC (1 << 8) 3888c2ecf20Sopenharmony_ci# define DYN_PER_SIMD_PG_ENABLE (1 << 27) 3898c2ecf20Sopenharmony_ci# define LB_CNT_SPIM_ACTIVE (1 << 30) 3908c2ecf20Sopenharmony_ci# define LOAD_BALANCE_ENABLE (1 << 31) 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_ci#define RLC_HB_BASE 0x3f10 3938c2ecf20Sopenharmony_ci#define RLC_HB_CNTL 0x3f0c 3948c2ecf20Sopenharmony_ci#define RLC_HB_RPTR 0x3f20 3958c2ecf20Sopenharmony_ci#define RLC_HB_WPTR 0x3f1c 3968c2ecf20Sopenharmony_ci#define RLC_HB_WPTR_LSB_ADDR 0x3f14 3978c2ecf20Sopenharmony_ci#define RLC_HB_WPTR_MSB_ADDR 0x3f18 3988c2ecf20Sopenharmony_ci#define RLC_MC_CNTL 0x3f44 3998c2ecf20Sopenharmony_ci#define RLC_UCODE_CNTL 0x3f48 4008c2ecf20Sopenharmony_ci#define RLC_UCODE_ADDR 0x3f2c 4018c2ecf20Sopenharmony_ci#define RLC_UCODE_DATA 0x3f30 4028c2ecf20Sopenharmony_ci 4038c2ecf20Sopenharmony_ci/* new for TN */ 4048c2ecf20Sopenharmony_ci#define TN_RLC_SAVE_AND_RESTORE_BASE 0x3f10 4058c2ecf20Sopenharmony_ci#define TN_RLC_LB_CNTR_MAX 0x3f14 4068c2ecf20Sopenharmony_ci#define TN_RLC_LB_CNTR_INIT 0x3f18 4078c2ecf20Sopenharmony_ci#define TN_RLC_CLEAR_STATE_RESTORE_BASE 0x3f20 4088c2ecf20Sopenharmony_ci#define TN_RLC_LB_INIT_SIMD_MASK 0x3fe4 4098c2ecf20Sopenharmony_ci#define TN_RLC_LB_ALWAYS_ACTIVE_SIMD_MASK 0x3fe8 4108c2ecf20Sopenharmony_ci#define TN_RLC_LB_PARAMS 0x3fec 4118c2ecf20Sopenharmony_ci 4128c2ecf20Sopenharmony_ci#define GRBM_GFX_INDEX 0x802C 4138c2ecf20Sopenharmony_ci#define INSTANCE_INDEX(x) ((x) << 0) 4148c2ecf20Sopenharmony_ci#define SE_INDEX(x) ((x) << 16) 4158c2ecf20Sopenharmony_ci#define INSTANCE_BROADCAST_WRITES (1 << 30) 4168c2ecf20Sopenharmony_ci#define SE_BROADCAST_WRITES (1 << 31) 4178c2ecf20Sopenharmony_ci#define RLC_GFX_INDEX 0x3fC4 4188c2ecf20Sopenharmony_ci#define CC_GC_SHADER_PIPE_CONFIG 0x8950 4198c2ecf20Sopenharmony_ci#define WRITE_DIS (1 << 0) 4208c2ecf20Sopenharmony_ci#define CC_RB_BACKEND_DISABLE 0x98F4 4218c2ecf20Sopenharmony_ci#define BACKEND_DISABLE(x) ((x) << 16) 4228c2ecf20Sopenharmony_ci#define GB_ADDR_CONFIG 0x98F8 4238c2ecf20Sopenharmony_ci#define NUM_PIPES(x) ((x) << 0) 4248c2ecf20Sopenharmony_ci#define NUM_PIPES_MASK 0x0000000f 4258c2ecf20Sopenharmony_ci#define PIPE_INTERLEAVE_SIZE(x) ((x) << 4) 4268c2ecf20Sopenharmony_ci#define BANK_INTERLEAVE_SIZE(x) ((x) << 8) 4278c2ecf20Sopenharmony_ci#define NUM_SHADER_ENGINES(x) ((x) << 12) 4288c2ecf20Sopenharmony_ci#define SHADER_ENGINE_TILE_SIZE(x) ((x) << 16) 4298c2ecf20Sopenharmony_ci#define NUM_GPUS(x) ((x) << 20) 4308c2ecf20Sopenharmony_ci#define MULTI_GPU_TILE_SIZE(x) ((x) << 24) 4318c2ecf20Sopenharmony_ci#define ROW_SIZE(x) ((x) << 28) 4328c2ecf20Sopenharmony_ci#define GB_BACKEND_MAP 0x98FC 4338c2ecf20Sopenharmony_ci#define DMIF_ADDR_CONFIG 0xBD4 4348c2ecf20Sopenharmony_ci#define HDP_ADDR_CONFIG 0x2F48 4358c2ecf20Sopenharmony_ci#define HDP_MISC_CNTL 0x2F4C 4368c2ecf20Sopenharmony_ci#define HDP_FLUSH_INVALIDATE_CACHE (1 << 0) 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ci#define CC_SYS_RB_BACKEND_DISABLE 0x3F88 4398c2ecf20Sopenharmony_ci#define GC_USER_RB_BACKEND_DISABLE 0x9B7C 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_ci#define CGTS_SYS_TCC_DISABLE 0x3F90 4428c2ecf20Sopenharmony_ci#define CGTS_TCC_DISABLE 0x9148 4438c2ecf20Sopenharmony_ci#define CGTS_USER_SYS_TCC_DISABLE 0x3F94 4448c2ecf20Sopenharmony_ci#define CGTS_USER_TCC_DISABLE 0x914C 4458c2ecf20Sopenharmony_ci 4468c2ecf20Sopenharmony_ci#define CONFIG_MEMSIZE 0x5428 4478c2ecf20Sopenharmony_ci 4488c2ecf20Sopenharmony_ci#define BIF_FB_EN 0x5490 4498c2ecf20Sopenharmony_ci#define FB_READ_EN (1 << 0) 4508c2ecf20Sopenharmony_ci#define FB_WRITE_EN (1 << 1) 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_ci#define CP_STRMOUT_CNTL 0x84FC 4538c2ecf20Sopenharmony_ci 4548c2ecf20Sopenharmony_ci#define CP_COHER_CNTL 0x85F0 4558c2ecf20Sopenharmony_ci#define CP_COHER_SIZE 0x85F4 4568c2ecf20Sopenharmony_ci#define CP_COHER_BASE 0x85F8 4578c2ecf20Sopenharmony_ci#define CP_STALLED_STAT1 0x8674 4588c2ecf20Sopenharmony_ci#define CP_STALLED_STAT2 0x8678 4598c2ecf20Sopenharmony_ci#define CP_BUSY_STAT 0x867C 4608c2ecf20Sopenharmony_ci#define CP_STAT 0x8680 4618c2ecf20Sopenharmony_ci#define CP_ME_CNTL 0x86D8 4628c2ecf20Sopenharmony_ci#define CP_ME_HALT (1 << 28) 4638c2ecf20Sopenharmony_ci#define CP_PFP_HALT (1 << 26) 4648c2ecf20Sopenharmony_ci#define CP_ME_RAM_DATA 0xC160 4658c2ecf20Sopenharmony_ci#define CP_ME_RAM_RADDR 0xC158 4668c2ecf20Sopenharmony_ci#define CP_ME_RAM_WADDR 0xC15C 4678c2ecf20Sopenharmony_ci#define CP_MEQ_THRESHOLDS 0x8764 4688c2ecf20Sopenharmony_ci#define STQ_SPLIT(x) ((x) << 0) 4698c2ecf20Sopenharmony_ci#define CP_PERFMON_CNTL 0x87FC 4708c2ecf20Sopenharmony_ci#define CP_PFP_UCODE_ADDR 0xC150 4718c2ecf20Sopenharmony_ci#define CP_PFP_UCODE_DATA 0xC154 4728c2ecf20Sopenharmony_ci#define CP_QUEUE_THRESHOLDS 0x8760 4738c2ecf20Sopenharmony_ci#define ROQ_IB1_START(x) ((x) << 0) 4748c2ecf20Sopenharmony_ci#define ROQ_IB2_START(x) ((x) << 8) 4758c2ecf20Sopenharmony_ci#define CP_RB_BASE 0xC100 4768c2ecf20Sopenharmony_ci#define CP_RB_CNTL 0xC104 4778c2ecf20Sopenharmony_ci#define RB_BUFSZ(x) ((x) << 0) 4788c2ecf20Sopenharmony_ci#define RB_BLKSZ(x) ((x) << 8) 4798c2ecf20Sopenharmony_ci#define RB_NO_UPDATE (1 << 27) 4808c2ecf20Sopenharmony_ci#define RB_RPTR_WR_ENA (1 << 31) 4818c2ecf20Sopenharmony_ci#define BUF_SWAP_32BIT (2 << 16) 4828c2ecf20Sopenharmony_ci#define CP_RB_RPTR 0x8700 4838c2ecf20Sopenharmony_ci#define CP_RB_RPTR_ADDR 0xC10C 4848c2ecf20Sopenharmony_ci#define RB_RPTR_SWAP(x) ((x) << 0) 4858c2ecf20Sopenharmony_ci#define CP_RB_RPTR_ADDR_HI 0xC110 4868c2ecf20Sopenharmony_ci#define CP_RB_RPTR_WR 0xC108 4878c2ecf20Sopenharmony_ci#define CP_RB_WPTR 0xC114 4888c2ecf20Sopenharmony_ci#define CP_RB_WPTR_ADDR 0xC118 4898c2ecf20Sopenharmony_ci#define CP_RB_WPTR_ADDR_HI 0xC11C 4908c2ecf20Sopenharmony_ci#define CP_RB_WPTR_DELAY 0x8704 4918c2ecf20Sopenharmony_ci#define CP_SEM_WAIT_TIMER 0x85BC 4928c2ecf20Sopenharmony_ci#define CP_SEM_INCOMPLETE_TIMER_CNTL 0x85C8 4938c2ecf20Sopenharmony_ci#define CP_DEBUG 0xC1FC 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_ci/* Audio clocks */ 4968c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO_SOURCE 0x05ac 4978c2ecf20Sopenharmony_ci# define DCCG_AUDIO_DTO0_SOURCE_SEL(x) ((x) << 0) /* crtc0 - crtc5 */ 4988c2ecf20Sopenharmony_ci# define DCCG_AUDIO_DTO_SEL (1 << 4) /* 0=dto0 1=dto1 */ 4998c2ecf20Sopenharmony_ci 5008c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO0_PHASE 0x05b0 5018c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO0_MODULE 0x05b4 5028c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO0_LOAD 0x05b8 5038c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO0_CNTL 0x05bc 5048c2ecf20Sopenharmony_ci# define DCCG_AUDIO_DTO_WALLCLOCK_RATIO(x) (((x) & 7) << 0) 5058c2ecf20Sopenharmony_ci# define DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK 7 5068c2ecf20Sopenharmony_ci# define DCCG_AUDIO_DTO_WALLCLOCK_RATIO_SHIFT 0 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO1_PHASE 0x05c0 5098c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO1_MODULE 0x05c4 5108c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO1_LOAD 0x05c8 5118c2ecf20Sopenharmony_ci#define DCCG_AUDIO_DTO1_CNTL 0x05cc 5128c2ecf20Sopenharmony_ci# define DCCG_AUDIO_DTO1_USE_512FBR_DTO (1 << 3) 5138c2ecf20Sopenharmony_ci 5148c2ecf20Sopenharmony_ci#define DCE41_DENTIST_DISPCLK_CNTL 0x049c 5158c2ecf20Sopenharmony_ci# define DENTIST_DPREFCLK_WDIVIDER(x) (((x) & 0x7f) << 24) 5168c2ecf20Sopenharmony_ci# define DENTIST_DPREFCLK_WDIVIDER_MASK (0x7f << 24) 5178c2ecf20Sopenharmony_ci# define DENTIST_DPREFCLK_WDIVIDER_SHIFT 24 5188c2ecf20Sopenharmony_ci 5198c2ecf20Sopenharmony_ci/* DCE 4.0 AFMT */ 5208c2ecf20Sopenharmony_ci#define HDMI_CONTROL 0x7030 5218c2ecf20Sopenharmony_ci# define HDMI_KEEPOUT_MODE (1 << 0) 5228c2ecf20Sopenharmony_ci# define HDMI_PACKET_GEN_VERSION (1 << 4) /* 0 = r6xx compat */ 5238c2ecf20Sopenharmony_ci# define HDMI_ERROR_ACK (1 << 8) 5248c2ecf20Sopenharmony_ci# define HDMI_ERROR_MASK (1 << 9) 5258c2ecf20Sopenharmony_ci# define HDMI_DEEP_COLOR_ENABLE (1 << 24) 5268c2ecf20Sopenharmony_ci# define HDMI_DEEP_COLOR_DEPTH(x) (((x) & 3) << 28) 5278c2ecf20Sopenharmony_ci# define HDMI_24BIT_DEEP_COLOR 0 5288c2ecf20Sopenharmony_ci# define HDMI_30BIT_DEEP_COLOR 1 5298c2ecf20Sopenharmony_ci# define HDMI_36BIT_DEEP_COLOR 2 5308c2ecf20Sopenharmony_ci# define HDMI_DEEP_COLOR_DEPTH_MASK (3 << 28) 5318c2ecf20Sopenharmony_ci#define HDMI_STATUS 0x7034 5328c2ecf20Sopenharmony_ci# define HDMI_ACTIVE_AVMUTE (1 << 0) 5338c2ecf20Sopenharmony_ci# define HDMI_AUDIO_PACKET_ERROR (1 << 16) 5348c2ecf20Sopenharmony_ci# define HDMI_VBI_PACKET_ERROR (1 << 20) 5358c2ecf20Sopenharmony_ci#define HDMI_AUDIO_PACKET_CONTROL 0x7038 5368c2ecf20Sopenharmony_ci# define HDMI_AUDIO_DELAY_EN(x) (((x) & 3) << 4) 5378c2ecf20Sopenharmony_ci# define HDMI_AUDIO_PACKETS_PER_LINE(x) (((x) & 0x1f) << 16) 5388c2ecf20Sopenharmony_ci#define HDMI_ACR_PACKET_CONTROL 0x703c 5398c2ecf20Sopenharmony_ci# define HDMI_ACR_SEND (1 << 0) 5408c2ecf20Sopenharmony_ci# define HDMI_ACR_CONT (1 << 1) 5418c2ecf20Sopenharmony_ci# define HDMI_ACR_SELECT(x) (((x) & 3) << 4) 5428c2ecf20Sopenharmony_ci# define HDMI_ACR_HW 0 5438c2ecf20Sopenharmony_ci# define HDMI_ACR_32 1 5448c2ecf20Sopenharmony_ci# define HDMI_ACR_44 2 5458c2ecf20Sopenharmony_ci# define HDMI_ACR_48 3 5468c2ecf20Sopenharmony_ci# define HDMI_ACR_SOURCE (1 << 8) /* 0 - hw; 1 - cts value */ 5478c2ecf20Sopenharmony_ci# define HDMI_ACR_AUTO_SEND (1 << 12) 5488c2ecf20Sopenharmony_ci# define HDMI_ACR_N_MULTIPLE(x) (((x) & 7) << 16) 5498c2ecf20Sopenharmony_ci# define HDMI_ACR_X1 1 5508c2ecf20Sopenharmony_ci# define HDMI_ACR_X2 2 5518c2ecf20Sopenharmony_ci# define HDMI_ACR_X4 4 5528c2ecf20Sopenharmony_ci# define HDMI_ACR_AUDIO_PRIORITY (1 << 31) 5538c2ecf20Sopenharmony_ci#define HDMI_VBI_PACKET_CONTROL 0x7040 5548c2ecf20Sopenharmony_ci# define HDMI_NULL_SEND (1 << 0) 5558c2ecf20Sopenharmony_ci# define HDMI_GC_SEND (1 << 4) 5568c2ecf20Sopenharmony_ci# define HDMI_GC_CONT (1 << 5) /* 0 - once; 1 - every frame */ 5578c2ecf20Sopenharmony_ci#define HDMI_INFOFRAME_CONTROL0 0x7044 5588c2ecf20Sopenharmony_ci# define HDMI_AVI_INFO_SEND (1 << 0) 5598c2ecf20Sopenharmony_ci# define HDMI_AVI_INFO_CONT (1 << 1) 5608c2ecf20Sopenharmony_ci# define HDMI_AUDIO_INFO_SEND (1 << 4) 5618c2ecf20Sopenharmony_ci# define HDMI_AUDIO_INFO_CONT (1 << 5) 5628c2ecf20Sopenharmony_ci# define HDMI_MPEG_INFO_SEND (1 << 8) 5638c2ecf20Sopenharmony_ci# define HDMI_MPEG_INFO_CONT (1 << 9) 5648c2ecf20Sopenharmony_ci#define HDMI_INFOFRAME_CONTROL1 0x7048 5658c2ecf20Sopenharmony_ci# define HDMI_AVI_INFO_LINE(x) (((x) & 0x3f) << 0) 5668c2ecf20Sopenharmony_ci# define HDMI_AVI_INFO_LINE_MASK (0x3f << 0) 5678c2ecf20Sopenharmony_ci# define HDMI_AUDIO_INFO_LINE(x) (((x) & 0x3f) << 8) 5688c2ecf20Sopenharmony_ci# define HDMI_MPEG_INFO_LINE(x) (((x) & 0x3f) << 16) 5698c2ecf20Sopenharmony_ci#define HDMI_GENERIC_PACKET_CONTROL 0x704c 5708c2ecf20Sopenharmony_ci# define HDMI_GENERIC0_SEND (1 << 0) 5718c2ecf20Sopenharmony_ci# define HDMI_GENERIC0_CONT (1 << 1) 5728c2ecf20Sopenharmony_ci# define HDMI_GENERIC1_SEND (1 << 4) 5738c2ecf20Sopenharmony_ci# define HDMI_GENERIC1_CONT (1 << 5) 5748c2ecf20Sopenharmony_ci# define HDMI_GENERIC0_LINE(x) (((x) & 0x3f) << 16) 5758c2ecf20Sopenharmony_ci# define HDMI_GENERIC1_LINE(x) (((x) & 0x3f) << 24) 5768c2ecf20Sopenharmony_ci#define HDMI_GC 0x7058 5778c2ecf20Sopenharmony_ci# define HDMI_GC_AVMUTE (1 << 0) 5788c2ecf20Sopenharmony_ci# define HDMI_GC_AVMUTE_CONT (1 << 2) 5798c2ecf20Sopenharmony_ci#define AFMT_AUDIO_PACKET_CONTROL2 0x705c 5808c2ecf20Sopenharmony_ci# define AFMT_AUDIO_LAYOUT_OVRD (1 << 0) 5818c2ecf20Sopenharmony_ci# define AFMT_AUDIO_LAYOUT_SELECT (1 << 1) 5828c2ecf20Sopenharmony_ci# define AFMT_60958_CS_SOURCE (1 << 4) 5838c2ecf20Sopenharmony_ci# define AFMT_AUDIO_CHANNEL_ENABLE(x) (((x) & 0xff) << 8) 5848c2ecf20Sopenharmony_ci# define AFMT_DP_AUDIO_STREAM_ID(x) (((x) & 0xff) << 16) 5858c2ecf20Sopenharmony_ci#define AFMT_AVI_INFO0 0x7084 5868c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_CHECKSUM(x) (((x) & 0xff) << 0) 5878c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_S(x) (((x) & 3) << 8) 5888c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_B(x) (((x) & 3) << 10) 5898c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_A(x) (((x) & 1) << 12) 5908c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_Y(x) (((x) & 3) << 13) 5918c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_Y_RGB 0 5928c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_Y_YCBCR422 1 5938c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_Y_YCBCR444 2 5948c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_Y_A_B_S(x) (((x) & 0xff) << 8) 5958c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_R(x) (((x) & 0xf) << 16) 5968c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_M(x) (((x) & 0x3) << 20) 5978c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_C(x) (((x) & 0x3) << 22) 5988c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_C_M_R(x) (((x) & 0xff) << 16) 5998c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_SC(x) (((x) & 0x3) << 24) 6008c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_Q(x) (((x) & 0x3) << 26) 6018c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_EC(x) (((x) & 0x3) << 28) 6028c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_ITC(x) (((x) & 0x1) << 31) 6038c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_ITC_EC_Q_SC(x) (((x) & 0xff) << 24) 6048c2ecf20Sopenharmony_ci#define AFMT_AVI_INFO1 0x7088 6058c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_VIC(x) (((x) & 0x7f) << 0) /* don't use avi infoframe v1 */ 6068c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_PR(x) (((x) & 0xf) << 8) /* don't use avi infoframe v1 */ 6078c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_CN(x) (((x) & 0x3) << 12) 6088c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_YQ(x) (((x) & 0x3) << 14) 6098c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_TOP(x) (((x) & 0xffff) << 16) 6108c2ecf20Sopenharmony_ci#define AFMT_AVI_INFO2 0x708c 6118c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_BOTTOM(x) (((x) & 0xffff) << 0) 6128c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_LEFT(x) (((x) & 0xffff) << 16) 6138c2ecf20Sopenharmony_ci#define AFMT_AVI_INFO3 0x7090 6148c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_RIGHT(x) (((x) & 0xffff) << 0) 6158c2ecf20Sopenharmony_ci# define AFMT_AVI_INFO_VERSION(x) (((x) & 3) << 24) 6168c2ecf20Sopenharmony_ci#define AFMT_MPEG_INFO0 0x7094 6178c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_CHECKSUM(x) (((x) & 0xff) << 0) 6188c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_MB0(x) (((x) & 0xff) << 8) 6198c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_MB1(x) (((x) & 0xff) << 16) 6208c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_MB2(x) (((x) & 0xff) << 24) 6218c2ecf20Sopenharmony_ci#define AFMT_MPEG_INFO1 0x7098 6228c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_MB3(x) (((x) & 0xff) << 0) 6238c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_MF(x) (((x) & 3) << 8) 6248c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_FR(x) (((x) & 1) << 12) 6258c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_HDR 0x709c 6268c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_0 0x70a0 6278c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_1 0x70a4 6288c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_2 0x70a8 6298c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_3 0x70ac 6308c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_4 0x70b0 6318c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_5 0x70b4 6328c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_6 0x70b8 6338c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_HDR 0x70bc 6348c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_0 0x70c0 6358c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_1 0x70c4 6368c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_2 0x70c8 6378c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_3 0x70cc 6388c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_4 0x70d0 6398c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_5 0x70d4 6408c2ecf20Sopenharmony_ci#define AFMT_GENERIC1_6 0x70d8 6418c2ecf20Sopenharmony_ci#define HDMI_ACR_32_0 0x70dc 6428c2ecf20Sopenharmony_ci# define HDMI_ACR_CTS_32(x) (((x) & 0xfffff) << 12) 6438c2ecf20Sopenharmony_ci#define HDMI_ACR_32_1 0x70e0 6448c2ecf20Sopenharmony_ci# define HDMI_ACR_N_32(x) (((x) & 0xfffff) << 0) 6458c2ecf20Sopenharmony_ci#define HDMI_ACR_44_0 0x70e4 6468c2ecf20Sopenharmony_ci# define HDMI_ACR_CTS_44(x) (((x) & 0xfffff) << 12) 6478c2ecf20Sopenharmony_ci#define HDMI_ACR_44_1 0x70e8 6488c2ecf20Sopenharmony_ci# define HDMI_ACR_N_44(x) (((x) & 0xfffff) << 0) 6498c2ecf20Sopenharmony_ci#define HDMI_ACR_48_0 0x70ec 6508c2ecf20Sopenharmony_ci# define HDMI_ACR_CTS_48(x) (((x) & 0xfffff) << 12) 6518c2ecf20Sopenharmony_ci#define HDMI_ACR_48_1 0x70f0 6528c2ecf20Sopenharmony_ci# define HDMI_ACR_N_48(x) (((x) & 0xfffff) << 0) 6538c2ecf20Sopenharmony_ci#define HDMI_ACR_STATUS_0 0x70f4 6548c2ecf20Sopenharmony_ci#define HDMI_ACR_STATUS_1 0x70f8 6558c2ecf20Sopenharmony_ci#define AFMT_AUDIO_INFO0 0x70fc 6568c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_CHECKSUM(x) (((x) & 0xff) << 0) 6578c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_CC(x) (((x) & 7) << 8) 6588c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_CT(x) (((x) & 0xf) << 11) 6598c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_CHECKSUM_OFFSET(x) (((x) & 0xff) << 16) 6608c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_CXT(x) (((x) & 0x1f) << 24) 6618c2ecf20Sopenharmony_ci#define AFMT_AUDIO_INFO1 0x7100 6628c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_CA(x) (((x) & 0xff) << 0) 6638c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_LSV(x) (((x) & 0xf) << 11) 6648c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_DM_INH(x) (((x) & 1) << 15) 6658c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_DM_INH_LSV(x) (((x) & 0xff) << 8) 6668c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_LFEBPL(x) (((x) & 3) << 16) 6678c2ecf20Sopenharmony_ci#define AFMT_60958_0 0x7104 6688c2ecf20Sopenharmony_ci# define AFMT_60958_CS_A(x) (((x) & 1) << 0) 6698c2ecf20Sopenharmony_ci# define AFMT_60958_CS_B(x) (((x) & 1) << 1) 6708c2ecf20Sopenharmony_ci# define AFMT_60958_CS_C(x) (((x) & 1) << 2) 6718c2ecf20Sopenharmony_ci# define AFMT_60958_CS_D(x) (((x) & 3) << 3) 6728c2ecf20Sopenharmony_ci# define AFMT_60958_CS_MODE(x) (((x) & 3) << 6) 6738c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CATEGORY_CODE(x) (((x) & 0xff) << 8) 6748c2ecf20Sopenharmony_ci# define AFMT_60958_CS_SOURCE_NUMBER(x) (((x) & 0xf) << 16) 6758c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_L(x) (((x) & 0xf) << 20) 6768c2ecf20Sopenharmony_ci# define AFMT_60958_CS_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 24) 6778c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CLOCK_ACCURACY(x) (((x) & 3) << 28) 6788c2ecf20Sopenharmony_ci#define AFMT_60958_1 0x7108 6798c2ecf20Sopenharmony_ci# define AFMT_60958_CS_WORD_LENGTH(x) (((x) & 0xf) << 0) 6808c2ecf20Sopenharmony_ci# define AFMT_60958_CS_ORIGINAL_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 4) 6818c2ecf20Sopenharmony_ci# define AFMT_60958_CS_VALID_L(x) (((x) & 1) << 16) 6828c2ecf20Sopenharmony_ci# define AFMT_60958_CS_VALID_R(x) (((x) & 1) << 18) 6838c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_R(x) (((x) & 0xf) << 20) 6848c2ecf20Sopenharmony_ci#define AFMT_AUDIO_CRC_CONTROL 0x710c 6858c2ecf20Sopenharmony_ci# define AFMT_AUDIO_CRC_EN (1 << 0) 6868c2ecf20Sopenharmony_ci#define AFMT_RAMP_CONTROL0 0x7110 6878c2ecf20Sopenharmony_ci# define AFMT_RAMP_MAX_COUNT(x) (((x) & 0xffffff) << 0) 6888c2ecf20Sopenharmony_ci# define AFMT_RAMP_DATA_SIGN (1 << 31) 6898c2ecf20Sopenharmony_ci#define AFMT_RAMP_CONTROL1 0x7114 6908c2ecf20Sopenharmony_ci# define AFMT_RAMP_MIN_COUNT(x) (((x) & 0xffffff) << 0) 6918c2ecf20Sopenharmony_ci# define AFMT_AUDIO_TEST_CH_DISABLE(x) (((x) & 0xff) << 24) 6928c2ecf20Sopenharmony_ci#define AFMT_RAMP_CONTROL2 0x7118 6938c2ecf20Sopenharmony_ci# define AFMT_RAMP_INC_COUNT(x) (((x) & 0xffffff) << 0) 6948c2ecf20Sopenharmony_ci#define AFMT_RAMP_CONTROL3 0x711c 6958c2ecf20Sopenharmony_ci# define AFMT_RAMP_DEC_COUNT(x) (((x) & 0xffffff) << 0) 6968c2ecf20Sopenharmony_ci#define AFMT_60958_2 0x7120 6978c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_2(x) (((x) & 0xf) << 0) 6988c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_3(x) (((x) & 0xf) << 4) 6998c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_4(x) (((x) & 0xf) << 8) 7008c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_5(x) (((x) & 0xf) << 12) 7018c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_6(x) (((x) & 0xf) << 16) 7028c2ecf20Sopenharmony_ci# define AFMT_60958_CS_CHANNEL_NUMBER_7(x) (((x) & 0xf) << 20) 7038c2ecf20Sopenharmony_ci#define AFMT_STATUS 0x7128 7048c2ecf20Sopenharmony_ci# define AFMT_AUDIO_ENABLE (1 << 4) 7058c2ecf20Sopenharmony_ci# define AFMT_AUDIO_HBR_ENABLE (1 << 8) 7068c2ecf20Sopenharmony_ci# define AFMT_AZ_FORMAT_WTRIG (1 << 28) 7078c2ecf20Sopenharmony_ci# define AFMT_AZ_FORMAT_WTRIG_INT (1 << 29) 7088c2ecf20Sopenharmony_ci# define AFMT_AZ_AUDIO_ENABLE_CHG (1 << 30) 7098c2ecf20Sopenharmony_ci#define AFMT_AUDIO_PACKET_CONTROL 0x712c 7108c2ecf20Sopenharmony_ci# define AFMT_AUDIO_SAMPLE_SEND (1 << 0) 7118c2ecf20Sopenharmony_ci# define AFMT_RESET_FIFO_WHEN_AUDIO_DIS (1 << 11) /* set to 1 */ 7128c2ecf20Sopenharmony_ci# define AFMT_AUDIO_TEST_EN (1 << 12) 7138c2ecf20Sopenharmony_ci# define AFMT_AUDIO_CHANNEL_SWAP (1 << 24) 7148c2ecf20Sopenharmony_ci# define AFMT_60958_CS_UPDATE (1 << 26) 7158c2ecf20Sopenharmony_ci# define AFMT_AZ_AUDIO_ENABLE_CHG_MASK (1 << 27) 7168c2ecf20Sopenharmony_ci# define AFMT_AZ_FORMAT_WTRIG_MASK (1 << 28) 7178c2ecf20Sopenharmony_ci# define AFMT_AZ_FORMAT_WTRIG_ACK (1 << 29) 7188c2ecf20Sopenharmony_ci# define AFMT_AZ_AUDIO_ENABLE_CHG_ACK (1 << 30) 7198c2ecf20Sopenharmony_ci#define AFMT_VBI_PACKET_CONTROL 0x7130 7208c2ecf20Sopenharmony_ci# define AFMT_GENERIC0_UPDATE (1 << 2) 7218c2ecf20Sopenharmony_ci#define AFMT_INFOFRAME_CONTROL0 0x7134 7228c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_SOURCE (1 << 6) /* 0 - sound block; 1 - afmt regs */ 7238c2ecf20Sopenharmony_ci# define AFMT_AUDIO_INFO_UPDATE (1 << 7) 7248c2ecf20Sopenharmony_ci# define AFMT_MPEG_INFO_UPDATE (1 << 10) 7258c2ecf20Sopenharmony_ci#define AFMT_GENERIC0_7 0x7138 7268c2ecf20Sopenharmony_ci 7278c2ecf20Sopenharmony_ci/* DCE4/5 ELD audio interface */ 7288c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_CHANNEL_SPEAKER 0x5f78 7298c2ecf20Sopenharmony_ci#define SPEAKER_ALLOCATION(x) (((x) & 0x7f) << 0) 7308c2ecf20Sopenharmony_ci#define SPEAKER_ALLOCATION_MASK (0x7f << 0) 7318c2ecf20Sopenharmony_ci#define SPEAKER_ALLOCATION_SHIFT 0 7328c2ecf20Sopenharmony_ci#define HDMI_CONNECTION (1 << 16) 7338c2ecf20Sopenharmony_ci#define DP_CONNECTION (1 << 17) 7348c2ecf20Sopenharmony_ci 7358c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR0 0x5f84 /* LPCM */ 7368c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR1 0x5f88 /* AC3 */ 7378c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR2 0x5f8c /* MPEG1 */ 7388c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR3 0x5f90 /* MP3 */ 7398c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR4 0x5f94 /* MPEG2 */ 7408c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR5 0x5f98 /* AAC */ 7418c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR6 0x5f9c /* DTS */ 7428c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR7 0x5fa0 /* ATRAC */ 7438c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR8 0x5fa4 /* one bit audio - leave at 0 (default) */ 7448c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR9 0x5fa8 /* Dolby Digital */ 7458c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR10 0x5fac /* DTS-HD */ 7468c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR11 0x5fb0 /* MAT-MLP */ 7478c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR12 0x5fb4 /* DTS */ 7488c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_AUDIO_DESCRIPTOR13 0x5fb8 /* WMA Pro */ 7498c2ecf20Sopenharmony_ci# define MAX_CHANNELS(x) (((x) & 0x7) << 0) 7508c2ecf20Sopenharmony_ci/* max channels minus one. 7 = 8 channels */ 7518c2ecf20Sopenharmony_ci# define SUPPORTED_FREQUENCIES(x) (((x) & 0xff) << 8) 7528c2ecf20Sopenharmony_ci# define DESCRIPTOR_BYTE_2(x) (((x) & 0xff) << 16) 7538c2ecf20Sopenharmony_ci# define SUPPORTED_FREQUENCIES_STEREO(x) (((x) & 0xff) << 24) /* LPCM only */ 7548c2ecf20Sopenharmony_ci/* SUPPORTED_FREQUENCIES, SUPPORTED_FREQUENCIES_STEREO 7558c2ecf20Sopenharmony_ci * bit0 = 32 kHz 7568c2ecf20Sopenharmony_ci * bit1 = 44.1 kHz 7578c2ecf20Sopenharmony_ci * bit2 = 48 kHz 7588c2ecf20Sopenharmony_ci * bit3 = 88.2 kHz 7598c2ecf20Sopenharmony_ci * bit4 = 96 kHz 7608c2ecf20Sopenharmony_ci * bit5 = 176.4 kHz 7618c2ecf20Sopenharmony_ci * bit6 = 192 kHz 7628c2ecf20Sopenharmony_ci */ 7638c2ecf20Sopenharmony_ci 7648c2ecf20Sopenharmony_ci#define AZ_CHANNEL_COUNT_CONTROL 0x5fe4 7658c2ecf20Sopenharmony_ci# define HBR_CHANNEL_COUNT(x) (((x) & 0x7) << 0) 7668c2ecf20Sopenharmony_ci# define COMPRESSED_CHANNEL_COUNT(x) (((x) & 0x7) << 4) 7678c2ecf20Sopenharmony_ci/* HBR_CHANNEL_COUNT, COMPRESSED_CHANNEL_COUNT 7688c2ecf20Sopenharmony_ci * 0 = use stream header 7698c2ecf20Sopenharmony_ci * 1-7 = channel count - 1 7708c2ecf20Sopenharmony_ci */ 7718c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_LIPSYNC 0x5fe8 7728c2ecf20Sopenharmony_ci# define VIDEO_LIPSYNC(x) (((x) & 0xff) << 0) 7738c2ecf20Sopenharmony_ci# define AUDIO_LIPSYNC(x) (((x) & 0xff) << 8) 7748c2ecf20Sopenharmony_ci/* VIDEO_LIPSYNC, AUDIO_LIPSYNC 7758c2ecf20Sopenharmony_ci * 0 = invalid 7768c2ecf20Sopenharmony_ci * x = legal delay value 7778c2ecf20Sopenharmony_ci * 255 = sync not supported 7788c2ecf20Sopenharmony_ci */ 7798c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_HBR 0x5fec 7808c2ecf20Sopenharmony_ci# define HBR_CAPABLE (1 << 0) /* enabled by default */ 7818c2ecf20Sopenharmony_ci 7828c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_AV_ASSOCIATION0 0x5ff4 7838c2ecf20Sopenharmony_ci# define DISPLAY0_TYPE(x) (((x) & 0x3) << 0) 7848c2ecf20Sopenharmony_ci# define DISPLAY_TYPE_NONE 0 7858c2ecf20Sopenharmony_ci# define DISPLAY_TYPE_HDMI 1 7868c2ecf20Sopenharmony_ci# define DISPLAY_TYPE_DP 2 7878c2ecf20Sopenharmony_ci# define DISPLAY0_ID(x) (((x) & 0x3f) << 2) 7888c2ecf20Sopenharmony_ci# define DISPLAY1_TYPE(x) (((x) & 0x3) << 8) 7898c2ecf20Sopenharmony_ci# define DISPLAY1_ID(x) (((x) & 0x3f) << 10) 7908c2ecf20Sopenharmony_ci# define DISPLAY2_TYPE(x) (((x) & 0x3) << 16) 7918c2ecf20Sopenharmony_ci# define DISPLAY2_ID(x) (((x) & 0x3f) << 18) 7928c2ecf20Sopenharmony_ci# define DISPLAY3_TYPE(x) (((x) & 0x3) << 24) 7938c2ecf20Sopenharmony_ci# define DISPLAY3_ID(x) (((x) & 0x3f) << 26) 7948c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_AV_ASSOCIATION1 0x5ff8 7958c2ecf20Sopenharmony_ci# define DISPLAY4_TYPE(x) (((x) & 0x3) << 0) 7968c2ecf20Sopenharmony_ci# define DISPLAY4_ID(x) (((x) & 0x3f) << 2) 7978c2ecf20Sopenharmony_ci# define DISPLAY5_TYPE(x) (((x) & 0x3) << 8) 7988c2ecf20Sopenharmony_ci# define DISPLAY5_ID(x) (((x) & 0x3f) << 10) 7998c2ecf20Sopenharmony_ci#define AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_AV_NUMBER 0x5ffc 8008c2ecf20Sopenharmony_ci# define NUMBER_OF_DISPLAY_ID(x) (((x) & 0x7) << 0) 8018c2ecf20Sopenharmony_ci 8028c2ecf20Sopenharmony_ci#define AZ_HOT_PLUG_CONTROL 0x5e78 8038c2ecf20Sopenharmony_ci# define AZ_FORCE_CODEC_WAKE (1 << 0) 8048c2ecf20Sopenharmony_ci# define PIN0_JACK_DETECTION_ENABLE (1 << 4) 8058c2ecf20Sopenharmony_ci# define PIN1_JACK_DETECTION_ENABLE (1 << 5) 8068c2ecf20Sopenharmony_ci# define PIN2_JACK_DETECTION_ENABLE (1 << 6) 8078c2ecf20Sopenharmony_ci# define PIN3_JACK_DETECTION_ENABLE (1 << 7) 8088c2ecf20Sopenharmony_ci# define PIN0_UNSOLICITED_RESPONSE_ENABLE (1 << 8) 8098c2ecf20Sopenharmony_ci# define PIN1_UNSOLICITED_RESPONSE_ENABLE (1 << 9) 8108c2ecf20Sopenharmony_ci# define PIN2_UNSOLICITED_RESPONSE_ENABLE (1 << 10) 8118c2ecf20Sopenharmony_ci# define PIN3_UNSOLICITED_RESPONSE_ENABLE (1 << 11) 8128c2ecf20Sopenharmony_ci# define CODEC_HOT_PLUG_ENABLE (1 << 12) 8138c2ecf20Sopenharmony_ci# define PIN0_AUDIO_ENABLED (1 << 24) 8148c2ecf20Sopenharmony_ci# define PIN1_AUDIO_ENABLED (1 << 25) 8158c2ecf20Sopenharmony_ci# define PIN2_AUDIO_ENABLED (1 << 26) 8168c2ecf20Sopenharmony_ci# define PIN3_AUDIO_ENABLED (1 << 27) 8178c2ecf20Sopenharmony_ci# define AUDIO_ENABLED (1 << 31) 8188c2ecf20Sopenharmony_ci 8198c2ecf20Sopenharmony_ci 8208c2ecf20Sopenharmony_ci#define GC_USER_SHADER_PIPE_CONFIG 0x8954 8218c2ecf20Sopenharmony_ci#define INACTIVE_QD_PIPES(x) ((x) << 8) 8228c2ecf20Sopenharmony_ci#define INACTIVE_QD_PIPES_MASK 0x0000FF00 8238c2ecf20Sopenharmony_ci#define INACTIVE_SIMDS(x) ((x) << 16) 8248c2ecf20Sopenharmony_ci#define INACTIVE_SIMDS_MASK 0x00FF0000 8258c2ecf20Sopenharmony_ci 8268c2ecf20Sopenharmony_ci#define GRBM_CNTL 0x8000 8278c2ecf20Sopenharmony_ci#define GRBM_READ_TIMEOUT(x) ((x) << 0) 8288c2ecf20Sopenharmony_ci#define GRBM_SOFT_RESET 0x8020 8298c2ecf20Sopenharmony_ci#define SOFT_RESET_CP (1 << 0) 8308c2ecf20Sopenharmony_ci#define SOFT_RESET_CB (1 << 1) 8318c2ecf20Sopenharmony_ci#define SOFT_RESET_DB (1 << 3) 8328c2ecf20Sopenharmony_ci#define SOFT_RESET_PA (1 << 5) 8338c2ecf20Sopenharmony_ci#define SOFT_RESET_SC (1 << 6) 8348c2ecf20Sopenharmony_ci#define SOFT_RESET_SPI (1 << 8) 8358c2ecf20Sopenharmony_ci#define SOFT_RESET_SH (1 << 9) 8368c2ecf20Sopenharmony_ci#define SOFT_RESET_SX (1 << 10) 8378c2ecf20Sopenharmony_ci#define SOFT_RESET_TC (1 << 11) 8388c2ecf20Sopenharmony_ci#define SOFT_RESET_TA (1 << 12) 8398c2ecf20Sopenharmony_ci#define SOFT_RESET_VC (1 << 13) 8408c2ecf20Sopenharmony_ci#define SOFT_RESET_VGT (1 << 14) 8418c2ecf20Sopenharmony_ci 8428c2ecf20Sopenharmony_ci#define GRBM_STATUS 0x8010 8438c2ecf20Sopenharmony_ci#define CMDFIFO_AVAIL_MASK 0x0000000F 8448c2ecf20Sopenharmony_ci#define SRBM_RQ_PENDING (1 << 5) 8458c2ecf20Sopenharmony_ci#define CF_RQ_PENDING (1 << 7) 8468c2ecf20Sopenharmony_ci#define PF_RQ_PENDING (1 << 8) 8478c2ecf20Sopenharmony_ci#define GRBM_EE_BUSY (1 << 10) 8488c2ecf20Sopenharmony_ci#define SX_CLEAN (1 << 11) 8498c2ecf20Sopenharmony_ci#define DB_CLEAN (1 << 12) 8508c2ecf20Sopenharmony_ci#define CB_CLEAN (1 << 13) 8518c2ecf20Sopenharmony_ci#define TA_BUSY (1 << 14) 8528c2ecf20Sopenharmony_ci#define VGT_BUSY_NO_DMA (1 << 16) 8538c2ecf20Sopenharmony_ci#define VGT_BUSY (1 << 17) 8548c2ecf20Sopenharmony_ci#define SX_BUSY (1 << 20) 8558c2ecf20Sopenharmony_ci#define SH_BUSY (1 << 21) 8568c2ecf20Sopenharmony_ci#define SPI_BUSY (1 << 22) 8578c2ecf20Sopenharmony_ci#define SC_BUSY (1 << 24) 8588c2ecf20Sopenharmony_ci#define PA_BUSY (1 << 25) 8598c2ecf20Sopenharmony_ci#define DB_BUSY (1 << 26) 8608c2ecf20Sopenharmony_ci#define CP_COHERENCY_BUSY (1 << 28) 8618c2ecf20Sopenharmony_ci#define CP_BUSY (1 << 29) 8628c2ecf20Sopenharmony_ci#define CB_BUSY (1 << 30) 8638c2ecf20Sopenharmony_ci#define GUI_ACTIVE (1 << 31) 8648c2ecf20Sopenharmony_ci#define GRBM_STATUS_SE0 0x8014 8658c2ecf20Sopenharmony_ci#define GRBM_STATUS_SE1 0x8018 8668c2ecf20Sopenharmony_ci#define SE_SX_CLEAN (1 << 0) 8678c2ecf20Sopenharmony_ci#define SE_DB_CLEAN (1 << 1) 8688c2ecf20Sopenharmony_ci#define SE_CB_CLEAN (1 << 2) 8698c2ecf20Sopenharmony_ci#define SE_TA_BUSY (1 << 25) 8708c2ecf20Sopenharmony_ci#define SE_SX_BUSY (1 << 26) 8718c2ecf20Sopenharmony_ci#define SE_SPI_BUSY (1 << 27) 8728c2ecf20Sopenharmony_ci#define SE_SH_BUSY (1 << 28) 8738c2ecf20Sopenharmony_ci#define SE_SC_BUSY (1 << 29) 8748c2ecf20Sopenharmony_ci#define SE_DB_BUSY (1 << 30) 8758c2ecf20Sopenharmony_ci#define SE_CB_BUSY (1 << 31) 8768c2ecf20Sopenharmony_ci/* evergreen */ 8778c2ecf20Sopenharmony_ci#define CG_THERMAL_CTRL 0x72c 8788c2ecf20Sopenharmony_ci#define TOFFSET_MASK 0x00003FE0 8798c2ecf20Sopenharmony_ci#define TOFFSET_SHIFT 5 8808c2ecf20Sopenharmony_ci#define DIG_THERM_DPM(x) ((x) << 14) 8818c2ecf20Sopenharmony_ci#define DIG_THERM_DPM_MASK 0x003FC000 8828c2ecf20Sopenharmony_ci#define DIG_THERM_DPM_SHIFT 14 8838c2ecf20Sopenharmony_ci 8848c2ecf20Sopenharmony_ci#define CG_THERMAL_INT 0x734 8858c2ecf20Sopenharmony_ci#define DIG_THERM_INTH(x) ((x) << 8) 8868c2ecf20Sopenharmony_ci#define DIG_THERM_INTH_MASK 0x0000FF00 8878c2ecf20Sopenharmony_ci#define DIG_THERM_INTH_SHIFT 8 8888c2ecf20Sopenharmony_ci#define DIG_THERM_INTL(x) ((x) << 16) 8898c2ecf20Sopenharmony_ci#define DIG_THERM_INTL_MASK 0x00FF0000 8908c2ecf20Sopenharmony_ci#define DIG_THERM_INTL_SHIFT 16 8918c2ecf20Sopenharmony_ci#define THERM_INT_MASK_HIGH (1 << 24) 8928c2ecf20Sopenharmony_ci#define THERM_INT_MASK_LOW (1 << 25) 8938c2ecf20Sopenharmony_ci 8948c2ecf20Sopenharmony_ci#define TN_CG_THERMAL_INT_CTRL 0x738 8958c2ecf20Sopenharmony_ci#define TN_DIG_THERM_INTH(x) ((x) << 0) 8968c2ecf20Sopenharmony_ci#define TN_DIG_THERM_INTH_MASK 0x000000FF 8978c2ecf20Sopenharmony_ci#define TN_DIG_THERM_INTH_SHIFT 0 8988c2ecf20Sopenharmony_ci#define TN_DIG_THERM_INTL(x) ((x) << 8) 8998c2ecf20Sopenharmony_ci#define TN_DIG_THERM_INTL_MASK 0x0000FF00 9008c2ecf20Sopenharmony_ci#define TN_DIG_THERM_INTL_SHIFT 8 9018c2ecf20Sopenharmony_ci#define TN_THERM_INT_MASK_HIGH (1 << 24) 9028c2ecf20Sopenharmony_ci#define TN_THERM_INT_MASK_LOW (1 << 25) 9038c2ecf20Sopenharmony_ci 9048c2ecf20Sopenharmony_ci#define CG_MULT_THERMAL_STATUS 0x740 9058c2ecf20Sopenharmony_ci#define ASIC_T(x) ((x) << 16) 9068c2ecf20Sopenharmony_ci#define ASIC_T_MASK 0x07FF0000 9078c2ecf20Sopenharmony_ci#define ASIC_T_SHIFT 16 9088c2ecf20Sopenharmony_ci#define CG_TS0_STATUS 0x760 9098c2ecf20Sopenharmony_ci#define TS0_ADC_DOUT_MASK 0x000003FF 9108c2ecf20Sopenharmony_ci#define TS0_ADC_DOUT_SHIFT 0 9118c2ecf20Sopenharmony_ci 9128c2ecf20Sopenharmony_ci/* APU */ 9138c2ecf20Sopenharmony_ci#define CG_THERMAL_STATUS 0x678 9148c2ecf20Sopenharmony_ci 9158c2ecf20Sopenharmony_ci#define HDP_HOST_PATH_CNTL 0x2C00 9168c2ecf20Sopenharmony_ci#define HDP_NONSURFACE_BASE 0x2C04 9178c2ecf20Sopenharmony_ci#define HDP_NONSURFACE_INFO 0x2C08 9188c2ecf20Sopenharmony_ci#define HDP_NONSURFACE_SIZE 0x2C0C 9198c2ecf20Sopenharmony_ci#define HDP_MEM_COHERENCY_FLUSH_CNTL 0x5480 9208c2ecf20Sopenharmony_ci#define HDP_REG_COHERENCY_FLUSH_CNTL 0x54A0 9218c2ecf20Sopenharmony_ci#define HDP_TILING_CONFIG 0x2F3C 9228c2ecf20Sopenharmony_ci 9238c2ecf20Sopenharmony_ci#define MC_SHARED_CHMAP 0x2004 9248c2ecf20Sopenharmony_ci#define NOOFCHAN_SHIFT 12 9258c2ecf20Sopenharmony_ci#define NOOFCHAN_MASK 0x00003000 9268c2ecf20Sopenharmony_ci#define MC_SHARED_CHREMAP 0x2008 9278c2ecf20Sopenharmony_ci 9288c2ecf20Sopenharmony_ci#define MC_SHARED_BLACKOUT_CNTL 0x20ac 9298c2ecf20Sopenharmony_ci#define BLACKOUT_MODE_MASK 0x00000007 9308c2ecf20Sopenharmony_ci 9318c2ecf20Sopenharmony_ci#define MC_ARB_RAMCFG 0x2760 9328c2ecf20Sopenharmony_ci#define NOOFBANK_SHIFT 0 9338c2ecf20Sopenharmony_ci#define NOOFBANK_MASK 0x00000003 9348c2ecf20Sopenharmony_ci#define NOOFRANK_SHIFT 2 9358c2ecf20Sopenharmony_ci#define NOOFRANK_MASK 0x00000004 9368c2ecf20Sopenharmony_ci#define NOOFROWS_SHIFT 3 9378c2ecf20Sopenharmony_ci#define NOOFROWS_MASK 0x00000038 9388c2ecf20Sopenharmony_ci#define NOOFCOLS_SHIFT 6 9398c2ecf20Sopenharmony_ci#define NOOFCOLS_MASK 0x000000C0 9408c2ecf20Sopenharmony_ci#define CHANSIZE_SHIFT 8 9418c2ecf20Sopenharmony_ci#define CHANSIZE_MASK 0x00000100 9428c2ecf20Sopenharmony_ci#define BURSTLENGTH_SHIFT 9 9438c2ecf20Sopenharmony_ci#define BURSTLENGTH_MASK 0x00000200 9448c2ecf20Sopenharmony_ci#define CHANSIZE_OVERRIDE (1 << 11) 9458c2ecf20Sopenharmony_ci#define FUS_MC_ARB_RAMCFG 0x2768 9468c2ecf20Sopenharmony_ci#define MC_VM_AGP_TOP 0x2028 9478c2ecf20Sopenharmony_ci#define MC_VM_AGP_BOT 0x202C 9488c2ecf20Sopenharmony_ci#define MC_VM_AGP_BASE 0x2030 9498c2ecf20Sopenharmony_ci#define MC_VM_FB_LOCATION 0x2024 9508c2ecf20Sopenharmony_ci#define MC_FUS_VM_FB_OFFSET 0x2898 9518c2ecf20Sopenharmony_ci#define MC_VM_MB_L1_TLB0_CNTL 0x2234 9528c2ecf20Sopenharmony_ci#define MC_VM_MB_L1_TLB1_CNTL 0x2238 9538c2ecf20Sopenharmony_ci#define MC_VM_MB_L1_TLB2_CNTL 0x223C 9548c2ecf20Sopenharmony_ci#define MC_VM_MB_L1_TLB3_CNTL 0x2240 9558c2ecf20Sopenharmony_ci#define ENABLE_L1_TLB (1 << 0) 9568c2ecf20Sopenharmony_ci#define ENABLE_L1_FRAGMENT_PROCESSING (1 << 1) 9578c2ecf20Sopenharmony_ci#define SYSTEM_ACCESS_MODE_PA_ONLY (0 << 3) 9588c2ecf20Sopenharmony_ci#define SYSTEM_ACCESS_MODE_USE_SYS_MAP (1 << 3) 9598c2ecf20Sopenharmony_ci#define SYSTEM_ACCESS_MODE_IN_SYS (2 << 3) 9608c2ecf20Sopenharmony_ci#define SYSTEM_ACCESS_MODE_NOT_IN_SYS (3 << 3) 9618c2ecf20Sopenharmony_ci#define SYSTEM_APERTURE_UNMAPPED_ACCESS_PASS_THRU (0 << 5) 9628c2ecf20Sopenharmony_ci#define EFFECTIVE_L1_TLB_SIZE(x) ((x)<<15) 9638c2ecf20Sopenharmony_ci#define EFFECTIVE_L1_QUEUE_SIZE(x) ((x)<<18) 9648c2ecf20Sopenharmony_ci#define MC_VM_MD_L1_TLB0_CNTL 0x2654 9658c2ecf20Sopenharmony_ci#define MC_VM_MD_L1_TLB1_CNTL 0x2658 9668c2ecf20Sopenharmony_ci#define MC_VM_MD_L1_TLB2_CNTL 0x265C 9678c2ecf20Sopenharmony_ci#define MC_VM_MD_L1_TLB3_CNTL 0x2698 9688c2ecf20Sopenharmony_ci 9698c2ecf20Sopenharmony_ci#define FUS_MC_VM_MD_L1_TLB0_CNTL 0x265C 9708c2ecf20Sopenharmony_ci#define FUS_MC_VM_MD_L1_TLB1_CNTL 0x2660 9718c2ecf20Sopenharmony_ci#define FUS_MC_VM_MD_L1_TLB2_CNTL 0x2664 9728c2ecf20Sopenharmony_ci 9738c2ecf20Sopenharmony_ci#define MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR 0x203C 9748c2ecf20Sopenharmony_ci#define MC_VM_SYSTEM_APERTURE_HIGH_ADDR 0x2038 9758c2ecf20Sopenharmony_ci#define MC_VM_SYSTEM_APERTURE_LOW_ADDR 0x2034 9768c2ecf20Sopenharmony_ci 9778c2ecf20Sopenharmony_ci#define PA_CL_ENHANCE 0x8A14 9788c2ecf20Sopenharmony_ci#define CLIP_VTX_REORDER_ENA (1 << 0) 9798c2ecf20Sopenharmony_ci#define NUM_CLIP_SEQ(x) ((x) << 1) 9808c2ecf20Sopenharmony_ci#define PA_SC_ENHANCE 0x8BF0 9818c2ecf20Sopenharmony_ci#define PA_SC_AA_CONFIG 0x28C04 9828c2ecf20Sopenharmony_ci#define MSAA_NUM_SAMPLES_SHIFT 0 9838c2ecf20Sopenharmony_ci#define MSAA_NUM_SAMPLES_MASK 0x3 9848c2ecf20Sopenharmony_ci#define PA_SC_CLIPRECT_RULE 0x2820C 9858c2ecf20Sopenharmony_ci#define PA_SC_EDGERULE 0x28230 9868c2ecf20Sopenharmony_ci#define PA_SC_FIFO_SIZE 0x8BCC 9878c2ecf20Sopenharmony_ci#define SC_PRIM_FIFO_SIZE(x) ((x) << 0) 9888c2ecf20Sopenharmony_ci#define SC_HIZ_TILE_FIFO_SIZE(x) ((x) << 12) 9898c2ecf20Sopenharmony_ci#define SC_EARLYZ_TILE_FIFO_SIZE(x) ((x) << 20) 9908c2ecf20Sopenharmony_ci#define PA_SC_FORCE_EOV_MAX_CNTS 0x8B24 9918c2ecf20Sopenharmony_ci#define FORCE_EOV_MAX_CLK_CNT(x) ((x) << 0) 9928c2ecf20Sopenharmony_ci#define FORCE_EOV_MAX_REZ_CNT(x) ((x) << 16) 9938c2ecf20Sopenharmony_ci#define PA_SC_LINE_STIPPLE 0x28A0C 9948c2ecf20Sopenharmony_ci#define PA_SU_LINE_STIPPLE_VALUE 0x8A60 9958c2ecf20Sopenharmony_ci#define PA_SC_LINE_STIPPLE_STATE 0x8B10 9968c2ecf20Sopenharmony_ci 9978c2ecf20Sopenharmony_ci#define SCRATCH_REG0 0x8500 9988c2ecf20Sopenharmony_ci#define SCRATCH_REG1 0x8504 9998c2ecf20Sopenharmony_ci#define SCRATCH_REG2 0x8508 10008c2ecf20Sopenharmony_ci#define SCRATCH_REG3 0x850C 10018c2ecf20Sopenharmony_ci#define SCRATCH_REG4 0x8510 10028c2ecf20Sopenharmony_ci#define SCRATCH_REG5 0x8514 10038c2ecf20Sopenharmony_ci#define SCRATCH_REG6 0x8518 10048c2ecf20Sopenharmony_ci#define SCRATCH_REG7 0x851C 10058c2ecf20Sopenharmony_ci#define SCRATCH_UMSK 0x8540 10068c2ecf20Sopenharmony_ci#define SCRATCH_ADDR 0x8544 10078c2ecf20Sopenharmony_ci 10088c2ecf20Sopenharmony_ci#define SMX_SAR_CTL0 0xA008 10098c2ecf20Sopenharmony_ci#define SMX_DC_CTL0 0xA020 10108c2ecf20Sopenharmony_ci#define USE_HASH_FUNCTION (1 << 0) 10118c2ecf20Sopenharmony_ci#define NUMBER_OF_SETS(x) ((x) << 1) 10128c2ecf20Sopenharmony_ci#define FLUSH_ALL_ON_EVENT (1 << 10) 10138c2ecf20Sopenharmony_ci#define STALL_ON_EVENT (1 << 11) 10148c2ecf20Sopenharmony_ci#define SMX_EVENT_CTL 0xA02C 10158c2ecf20Sopenharmony_ci#define ES_FLUSH_CTL(x) ((x) << 0) 10168c2ecf20Sopenharmony_ci#define GS_FLUSH_CTL(x) ((x) << 3) 10178c2ecf20Sopenharmony_ci#define ACK_FLUSH_CTL(x) ((x) << 6) 10188c2ecf20Sopenharmony_ci#define SYNC_FLUSH_CTL (1 << 8) 10198c2ecf20Sopenharmony_ci 10208c2ecf20Sopenharmony_ci#define SPI_CONFIG_CNTL 0x9100 10218c2ecf20Sopenharmony_ci#define GPR_WRITE_PRIORITY(x) ((x) << 0) 10228c2ecf20Sopenharmony_ci#define SPI_CONFIG_CNTL_1 0x913C 10238c2ecf20Sopenharmony_ci#define VTX_DONE_DELAY(x) ((x) << 0) 10248c2ecf20Sopenharmony_ci#define INTERP_ONE_PRIM_PER_ROW (1 << 4) 10258c2ecf20Sopenharmony_ci#define SPI_INPUT_Z 0x286D8 10268c2ecf20Sopenharmony_ci#define SPI_PS_IN_CONTROL_0 0x286CC 10278c2ecf20Sopenharmony_ci#define NUM_INTERP(x) ((x)<<0) 10288c2ecf20Sopenharmony_ci#define POSITION_ENA (1<<8) 10298c2ecf20Sopenharmony_ci#define POSITION_CENTROID (1<<9) 10308c2ecf20Sopenharmony_ci#define POSITION_ADDR(x) ((x)<<10) 10318c2ecf20Sopenharmony_ci#define PARAM_GEN(x) ((x)<<15) 10328c2ecf20Sopenharmony_ci#define PARAM_GEN_ADDR(x) ((x)<<19) 10338c2ecf20Sopenharmony_ci#define BARYC_SAMPLE_CNTL(x) ((x)<<26) 10348c2ecf20Sopenharmony_ci#define PERSP_GRADIENT_ENA (1<<28) 10358c2ecf20Sopenharmony_ci#define LINEAR_GRADIENT_ENA (1<<29) 10368c2ecf20Sopenharmony_ci#define POSITION_SAMPLE (1<<30) 10378c2ecf20Sopenharmony_ci#define BARYC_AT_SAMPLE_ENA (1<<31) 10388c2ecf20Sopenharmony_ci 10398c2ecf20Sopenharmony_ci#define SQ_CONFIG 0x8C00 10408c2ecf20Sopenharmony_ci#define VC_ENABLE (1 << 0) 10418c2ecf20Sopenharmony_ci#define EXPORT_SRC_C (1 << 1) 10428c2ecf20Sopenharmony_ci#define CS_PRIO(x) ((x) << 18) 10438c2ecf20Sopenharmony_ci#define LS_PRIO(x) ((x) << 20) 10448c2ecf20Sopenharmony_ci#define HS_PRIO(x) ((x) << 22) 10458c2ecf20Sopenharmony_ci#define PS_PRIO(x) ((x) << 24) 10468c2ecf20Sopenharmony_ci#define VS_PRIO(x) ((x) << 26) 10478c2ecf20Sopenharmony_ci#define GS_PRIO(x) ((x) << 28) 10488c2ecf20Sopenharmony_ci#define ES_PRIO(x) ((x) << 30) 10498c2ecf20Sopenharmony_ci#define SQ_GPR_RESOURCE_MGMT_1 0x8C04 10508c2ecf20Sopenharmony_ci#define NUM_PS_GPRS(x) ((x) << 0) 10518c2ecf20Sopenharmony_ci#define NUM_VS_GPRS(x) ((x) << 16) 10528c2ecf20Sopenharmony_ci#define NUM_CLAUSE_TEMP_GPRS(x) ((x) << 28) 10538c2ecf20Sopenharmony_ci#define SQ_GPR_RESOURCE_MGMT_2 0x8C08 10548c2ecf20Sopenharmony_ci#define NUM_GS_GPRS(x) ((x) << 0) 10558c2ecf20Sopenharmony_ci#define NUM_ES_GPRS(x) ((x) << 16) 10568c2ecf20Sopenharmony_ci#define SQ_GPR_RESOURCE_MGMT_3 0x8C0C 10578c2ecf20Sopenharmony_ci#define NUM_HS_GPRS(x) ((x) << 0) 10588c2ecf20Sopenharmony_ci#define NUM_LS_GPRS(x) ((x) << 16) 10598c2ecf20Sopenharmony_ci#define SQ_GLOBAL_GPR_RESOURCE_MGMT_1 0x8C10 10608c2ecf20Sopenharmony_ci#define SQ_GLOBAL_GPR_RESOURCE_MGMT_2 0x8C14 10618c2ecf20Sopenharmony_ci#define SQ_THREAD_RESOURCE_MGMT 0x8C18 10628c2ecf20Sopenharmony_ci#define NUM_PS_THREADS(x) ((x) << 0) 10638c2ecf20Sopenharmony_ci#define NUM_VS_THREADS(x) ((x) << 8) 10648c2ecf20Sopenharmony_ci#define NUM_GS_THREADS(x) ((x) << 16) 10658c2ecf20Sopenharmony_ci#define NUM_ES_THREADS(x) ((x) << 24) 10668c2ecf20Sopenharmony_ci#define SQ_THREAD_RESOURCE_MGMT_2 0x8C1C 10678c2ecf20Sopenharmony_ci#define NUM_HS_THREADS(x) ((x) << 0) 10688c2ecf20Sopenharmony_ci#define NUM_LS_THREADS(x) ((x) << 8) 10698c2ecf20Sopenharmony_ci#define SQ_STACK_RESOURCE_MGMT_1 0x8C20 10708c2ecf20Sopenharmony_ci#define NUM_PS_STACK_ENTRIES(x) ((x) << 0) 10718c2ecf20Sopenharmony_ci#define NUM_VS_STACK_ENTRIES(x) ((x) << 16) 10728c2ecf20Sopenharmony_ci#define SQ_STACK_RESOURCE_MGMT_2 0x8C24 10738c2ecf20Sopenharmony_ci#define NUM_GS_STACK_ENTRIES(x) ((x) << 0) 10748c2ecf20Sopenharmony_ci#define NUM_ES_STACK_ENTRIES(x) ((x) << 16) 10758c2ecf20Sopenharmony_ci#define SQ_STACK_RESOURCE_MGMT_3 0x8C28 10768c2ecf20Sopenharmony_ci#define NUM_HS_STACK_ENTRIES(x) ((x) << 0) 10778c2ecf20Sopenharmony_ci#define NUM_LS_STACK_ENTRIES(x) ((x) << 16) 10788c2ecf20Sopenharmony_ci#define SQ_DYN_GPR_CNTL_PS_FLUSH_REQ 0x8D8C 10798c2ecf20Sopenharmony_ci#define SQ_DYN_GPR_SIMD_LOCK_EN 0x8D94 10808c2ecf20Sopenharmony_ci#define SQ_STATIC_THREAD_MGMT_1 0x8E20 10818c2ecf20Sopenharmony_ci#define SQ_STATIC_THREAD_MGMT_2 0x8E24 10828c2ecf20Sopenharmony_ci#define SQ_STATIC_THREAD_MGMT_3 0x8E28 10838c2ecf20Sopenharmony_ci#define SQ_LDS_RESOURCE_MGMT 0x8E2C 10848c2ecf20Sopenharmony_ci 10858c2ecf20Sopenharmony_ci#define SQ_MS_FIFO_SIZES 0x8CF0 10868c2ecf20Sopenharmony_ci#define CACHE_FIFO_SIZE(x) ((x) << 0) 10878c2ecf20Sopenharmony_ci#define FETCH_FIFO_HIWATER(x) ((x) << 8) 10888c2ecf20Sopenharmony_ci#define DONE_FIFO_HIWATER(x) ((x) << 16) 10898c2ecf20Sopenharmony_ci#define ALU_UPDATE_FIFO_HIWATER(x) ((x) << 24) 10908c2ecf20Sopenharmony_ci 10918c2ecf20Sopenharmony_ci#define SX_DEBUG_1 0x9058 10928c2ecf20Sopenharmony_ci#define ENABLE_NEW_SMX_ADDRESS (1 << 16) 10938c2ecf20Sopenharmony_ci#define SX_EXPORT_BUFFER_SIZES 0x900C 10948c2ecf20Sopenharmony_ci#define COLOR_BUFFER_SIZE(x) ((x) << 0) 10958c2ecf20Sopenharmony_ci#define POSITION_BUFFER_SIZE(x) ((x) << 8) 10968c2ecf20Sopenharmony_ci#define SMX_BUFFER_SIZE(x) ((x) << 16) 10978c2ecf20Sopenharmony_ci#define SX_MEMORY_EXPORT_BASE 0x9010 10988c2ecf20Sopenharmony_ci#define SX_MISC 0x28350 10998c2ecf20Sopenharmony_ci 11008c2ecf20Sopenharmony_ci#define CB_PERF_CTR0_SEL_0 0x9A20 11018c2ecf20Sopenharmony_ci#define CB_PERF_CTR0_SEL_1 0x9A24 11028c2ecf20Sopenharmony_ci#define CB_PERF_CTR1_SEL_0 0x9A28 11038c2ecf20Sopenharmony_ci#define CB_PERF_CTR1_SEL_1 0x9A2C 11048c2ecf20Sopenharmony_ci#define CB_PERF_CTR2_SEL_0 0x9A30 11058c2ecf20Sopenharmony_ci#define CB_PERF_CTR2_SEL_1 0x9A34 11068c2ecf20Sopenharmony_ci#define CB_PERF_CTR3_SEL_0 0x9A38 11078c2ecf20Sopenharmony_ci#define CB_PERF_CTR3_SEL_1 0x9A3C 11088c2ecf20Sopenharmony_ci 11098c2ecf20Sopenharmony_ci#define TA_CNTL_AUX 0x9508 11108c2ecf20Sopenharmony_ci#define DISABLE_CUBE_WRAP (1 << 0) 11118c2ecf20Sopenharmony_ci#define DISABLE_CUBE_ANISO (1 << 1) 11128c2ecf20Sopenharmony_ci#define SYNC_GRADIENT (1 << 24) 11138c2ecf20Sopenharmony_ci#define SYNC_WALKER (1 << 25) 11148c2ecf20Sopenharmony_ci#define SYNC_ALIGNER (1 << 26) 11158c2ecf20Sopenharmony_ci 11168c2ecf20Sopenharmony_ci#define TCP_CHAN_STEER_LO 0x960c 11178c2ecf20Sopenharmony_ci#define TCP_CHAN_STEER_HI 0x9610 11188c2ecf20Sopenharmony_ci 11198c2ecf20Sopenharmony_ci#define VGT_CACHE_INVALIDATION 0x88C4 11208c2ecf20Sopenharmony_ci#define CACHE_INVALIDATION(x) ((x) << 0) 11218c2ecf20Sopenharmony_ci#define VC_ONLY 0 11228c2ecf20Sopenharmony_ci#define TC_ONLY 1 11238c2ecf20Sopenharmony_ci#define VC_AND_TC 2 11248c2ecf20Sopenharmony_ci#define AUTO_INVLD_EN(x) ((x) << 6) 11258c2ecf20Sopenharmony_ci#define NO_AUTO 0 11268c2ecf20Sopenharmony_ci#define ES_AUTO 1 11278c2ecf20Sopenharmony_ci#define GS_AUTO 2 11288c2ecf20Sopenharmony_ci#define ES_AND_GS_AUTO 3 11298c2ecf20Sopenharmony_ci#define VGT_GS_VERTEX_REUSE 0x88D4 11308c2ecf20Sopenharmony_ci#define VGT_NUM_INSTANCES 0x8974 11318c2ecf20Sopenharmony_ci#define VGT_OUT_DEALLOC_CNTL 0x28C5C 11328c2ecf20Sopenharmony_ci#define DEALLOC_DIST_MASK 0x0000007F 11338c2ecf20Sopenharmony_ci#define VGT_VERTEX_REUSE_BLOCK_CNTL 0x28C58 11348c2ecf20Sopenharmony_ci#define VTX_REUSE_DEPTH_MASK 0x000000FF 11358c2ecf20Sopenharmony_ci 11368c2ecf20Sopenharmony_ci#define VM_CONTEXT0_CNTL 0x1410 11378c2ecf20Sopenharmony_ci#define ENABLE_CONTEXT (1 << 0) 11388c2ecf20Sopenharmony_ci#define PAGE_TABLE_DEPTH(x) (((x) & 3) << 1) 11398c2ecf20Sopenharmony_ci#define RANGE_PROTECTION_FAULT_ENABLE_DEFAULT (1 << 4) 11408c2ecf20Sopenharmony_ci#define VM_CONTEXT1_CNTL 0x1414 11418c2ecf20Sopenharmony_ci#define VM_CONTEXT1_CNTL2 0x1434 11428c2ecf20Sopenharmony_ci#define VM_CONTEXT0_PAGE_TABLE_BASE_ADDR 0x153C 11438c2ecf20Sopenharmony_ci#define VM_CONTEXT0_PAGE_TABLE_END_ADDR 0x157C 11448c2ecf20Sopenharmony_ci#define VM_CONTEXT0_PAGE_TABLE_START_ADDR 0x155C 11458c2ecf20Sopenharmony_ci#define VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR 0x1518 11468c2ecf20Sopenharmony_ci#define VM_CONTEXT0_REQUEST_RESPONSE 0x1470 11478c2ecf20Sopenharmony_ci#define REQUEST_TYPE(x) (((x) & 0xf) << 0) 11488c2ecf20Sopenharmony_ci#define RESPONSE_TYPE_MASK 0x000000F0 11498c2ecf20Sopenharmony_ci#define RESPONSE_TYPE_SHIFT 4 11508c2ecf20Sopenharmony_ci#define VM_L2_CNTL 0x1400 11518c2ecf20Sopenharmony_ci#define ENABLE_L2_CACHE (1 << 0) 11528c2ecf20Sopenharmony_ci#define ENABLE_L2_FRAGMENT_PROCESSING (1 << 1) 11538c2ecf20Sopenharmony_ci#define ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE (1 << 9) 11548c2ecf20Sopenharmony_ci#define EFFECTIVE_L2_QUEUE_SIZE(x) (((x) & 7) << 14) 11558c2ecf20Sopenharmony_ci#define VM_L2_CNTL2 0x1404 11568c2ecf20Sopenharmony_ci#define INVALIDATE_ALL_L1_TLBS (1 << 0) 11578c2ecf20Sopenharmony_ci#define INVALIDATE_L2_CACHE (1 << 1) 11588c2ecf20Sopenharmony_ci#define VM_L2_CNTL3 0x1408 11598c2ecf20Sopenharmony_ci#define BANK_SELECT(x) ((x) << 0) 11608c2ecf20Sopenharmony_ci#define CACHE_UPDATE_MODE(x) ((x) << 6) 11618c2ecf20Sopenharmony_ci#define VM_L2_STATUS 0x140C 11628c2ecf20Sopenharmony_ci#define L2_BUSY (1 << 0) 11638c2ecf20Sopenharmony_ci#define VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x14FC 11648c2ecf20Sopenharmony_ci#define VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x14DC 11658c2ecf20Sopenharmony_ci 11668c2ecf20Sopenharmony_ci#define WAIT_UNTIL 0x8040 11678c2ecf20Sopenharmony_ci 11688c2ecf20Sopenharmony_ci#define SRBM_STATUS 0x0E50 11698c2ecf20Sopenharmony_ci#define RLC_RQ_PENDING (1 << 3) 11708c2ecf20Sopenharmony_ci#define GRBM_RQ_PENDING (1 << 5) 11718c2ecf20Sopenharmony_ci#define VMC_BUSY (1 << 8) 11728c2ecf20Sopenharmony_ci#define MCB_BUSY (1 << 9) 11738c2ecf20Sopenharmony_ci#define MCB_NON_DISPLAY_BUSY (1 << 10) 11748c2ecf20Sopenharmony_ci#define MCC_BUSY (1 << 11) 11758c2ecf20Sopenharmony_ci#define MCD_BUSY (1 << 12) 11768c2ecf20Sopenharmony_ci#define SEM_BUSY (1 << 14) 11778c2ecf20Sopenharmony_ci#define RLC_BUSY (1 << 15) 11788c2ecf20Sopenharmony_ci#define IH_BUSY (1 << 17) 11798c2ecf20Sopenharmony_ci#define SRBM_STATUS2 0x0EC4 11808c2ecf20Sopenharmony_ci#define DMA_BUSY (1 << 5) 11818c2ecf20Sopenharmony_ci#define SRBM_SOFT_RESET 0x0E60 11828c2ecf20Sopenharmony_ci#define SRBM_SOFT_RESET_ALL_MASK 0x00FEEFA6 11838c2ecf20Sopenharmony_ci#define SOFT_RESET_BIF (1 << 1) 11848c2ecf20Sopenharmony_ci#define SOFT_RESET_CG (1 << 2) 11858c2ecf20Sopenharmony_ci#define SOFT_RESET_DC (1 << 5) 11868c2ecf20Sopenharmony_ci#define SOFT_RESET_GRBM (1 << 8) 11878c2ecf20Sopenharmony_ci#define SOFT_RESET_HDP (1 << 9) 11888c2ecf20Sopenharmony_ci#define SOFT_RESET_IH (1 << 10) 11898c2ecf20Sopenharmony_ci#define SOFT_RESET_MC (1 << 11) 11908c2ecf20Sopenharmony_ci#define SOFT_RESET_RLC (1 << 13) 11918c2ecf20Sopenharmony_ci#define SOFT_RESET_ROM (1 << 14) 11928c2ecf20Sopenharmony_ci#define SOFT_RESET_SEM (1 << 15) 11938c2ecf20Sopenharmony_ci#define SOFT_RESET_VMC (1 << 17) 11948c2ecf20Sopenharmony_ci#define SOFT_RESET_DMA (1 << 20) 11958c2ecf20Sopenharmony_ci#define SOFT_RESET_TST (1 << 21) 11968c2ecf20Sopenharmony_ci#define SOFT_RESET_REGBB (1 << 22) 11978c2ecf20Sopenharmony_ci#define SOFT_RESET_ORB (1 << 23) 11988c2ecf20Sopenharmony_ci 11998c2ecf20Sopenharmony_ci#define SRBM_READ_ERROR 0xE98 12008c2ecf20Sopenharmony_ci#define SRBM_INT_CNTL 0xEA0 12018c2ecf20Sopenharmony_ci#define SRBM_INT_ACK 0xEA8 12028c2ecf20Sopenharmony_ci 12038c2ecf20Sopenharmony_ci/* display watermarks */ 12048c2ecf20Sopenharmony_ci#define DC_LB_MEMORY_SPLIT 0x6b0c 12058c2ecf20Sopenharmony_ci#define PRIORITY_A_CNT 0x6b18 12068c2ecf20Sopenharmony_ci#define PRIORITY_MARK_MASK 0x7fff 12078c2ecf20Sopenharmony_ci#define PRIORITY_OFF (1 << 16) 12088c2ecf20Sopenharmony_ci#define PRIORITY_ALWAYS_ON (1 << 20) 12098c2ecf20Sopenharmony_ci#define PRIORITY_B_CNT 0x6b1c 12108c2ecf20Sopenharmony_ci#define PIPE0_ARBITRATION_CONTROL3 0x0bf0 12118c2ecf20Sopenharmony_ci# define LATENCY_WATERMARK_MASK(x) ((x) << 16) 12128c2ecf20Sopenharmony_ci#define PIPE0_LATENCY_CONTROL 0x0bf4 12138c2ecf20Sopenharmony_ci# define LATENCY_LOW_WATERMARK(x) ((x) << 0) 12148c2ecf20Sopenharmony_ci# define LATENCY_HIGH_WATERMARK(x) ((x) << 16) 12158c2ecf20Sopenharmony_ci 12168c2ecf20Sopenharmony_ci#define PIPE0_DMIF_BUFFER_CONTROL 0x0ca0 12178c2ecf20Sopenharmony_ci# define DMIF_BUFFERS_ALLOCATED(x) ((x) << 0) 12188c2ecf20Sopenharmony_ci# define DMIF_BUFFERS_ALLOCATED_COMPLETED (1 << 4) 12198c2ecf20Sopenharmony_ci 12208c2ecf20Sopenharmony_ci#define IH_RB_CNTL 0x3e00 12218c2ecf20Sopenharmony_ci# define IH_RB_ENABLE (1 << 0) 12228c2ecf20Sopenharmony_ci# define IH_IB_SIZE(x) ((x) << 1) /* log2 */ 12238c2ecf20Sopenharmony_ci# define IH_RB_FULL_DRAIN_ENABLE (1 << 6) 12248c2ecf20Sopenharmony_ci# define IH_WPTR_WRITEBACK_ENABLE (1 << 8) 12258c2ecf20Sopenharmony_ci# define IH_WPTR_WRITEBACK_TIMER(x) ((x) << 9) /* log2 */ 12268c2ecf20Sopenharmony_ci# define IH_WPTR_OVERFLOW_ENABLE (1 << 16) 12278c2ecf20Sopenharmony_ci# define IH_WPTR_OVERFLOW_CLEAR (1 << 31) 12288c2ecf20Sopenharmony_ci#define IH_RB_BASE 0x3e04 12298c2ecf20Sopenharmony_ci#define IH_RB_RPTR 0x3e08 12308c2ecf20Sopenharmony_ci#define IH_RB_WPTR 0x3e0c 12318c2ecf20Sopenharmony_ci# define RB_OVERFLOW (1 << 0) 12328c2ecf20Sopenharmony_ci# define WPTR_OFFSET_MASK 0x3fffc 12338c2ecf20Sopenharmony_ci#define IH_RB_WPTR_ADDR_HI 0x3e10 12348c2ecf20Sopenharmony_ci#define IH_RB_WPTR_ADDR_LO 0x3e14 12358c2ecf20Sopenharmony_ci#define IH_CNTL 0x3e18 12368c2ecf20Sopenharmony_ci# define ENABLE_INTR (1 << 0) 12378c2ecf20Sopenharmony_ci# define IH_MC_SWAP(x) ((x) << 1) 12388c2ecf20Sopenharmony_ci# define IH_MC_SWAP_NONE 0 12398c2ecf20Sopenharmony_ci# define IH_MC_SWAP_16BIT 1 12408c2ecf20Sopenharmony_ci# define IH_MC_SWAP_32BIT 2 12418c2ecf20Sopenharmony_ci# define IH_MC_SWAP_64BIT 3 12428c2ecf20Sopenharmony_ci# define RPTR_REARM (1 << 4) 12438c2ecf20Sopenharmony_ci# define MC_WRREQ_CREDIT(x) ((x) << 15) 12448c2ecf20Sopenharmony_ci# define MC_WR_CLEAN_CNT(x) ((x) << 20) 12458c2ecf20Sopenharmony_ci 12468c2ecf20Sopenharmony_ci#define CP_INT_CNTL 0xc124 12478c2ecf20Sopenharmony_ci# define CNTX_BUSY_INT_ENABLE (1 << 19) 12488c2ecf20Sopenharmony_ci# define CNTX_EMPTY_INT_ENABLE (1 << 20) 12498c2ecf20Sopenharmony_ci# define SCRATCH_INT_ENABLE (1 << 25) 12508c2ecf20Sopenharmony_ci# define TIME_STAMP_INT_ENABLE (1 << 26) 12518c2ecf20Sopenharmony_ci# define IB2_INT_ENABLE (1 << 29) 12528c2ecf20Sopenharmony_ci# define IB1_INT_ENABLE (1 << 30) 12538c2ecf20Sopenharmony_ci# define RB_INT_ENABLE (1 << 31) 12548c2ecf20Sopenharmony_ci#define CP_INT_STATUS 0xc128 12558c2ecf20Sopenharmony_ci# define SCRATCH_INT_STAT (1 << 25) 12568c2ecf20Sopenharmony_ci# define TIME_STAMP_INT_STAT (1 << 26) 12578c2ecf20Sopenharmony_ci# define IB2_INT_STAT (1 << 29) 12588c2ecf20Sopenharmony_ci# define IB1_INT_STAT (1 << 30) 12598c2ecf20Sopenharmony_ci# define RB_INT_STAT (1 << 31) 12608c2ecf20Sopenharmony_ci 12618c2ecf20Sopenharmony_ci#define GRBM_INT_CNTL 0x8060 12628c2ecf20Sopenharmony_ci# define RDERR_INT_ENABLE (1 << 0) 12638c2ecf20Sopenharmony_ci# define GUI_IDLE_INT_ENABLE (1 << 19) 12648c2ecf20Sopenharmony_ci 12658c2ecf20Sopenharmony_ci/* 0x6e98, 0x7a98, 0x10698, 0x11298, 0x11e98, 0x12a98 */ 12668c2ecf20Sopenharmony_ci#define CRTC_STATUS_FRAME_COUNT 0x6e98 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci/* 0x6bb8, 0x77b8, 0x103b8, 0x10fb8, 0x11bb8, 0x127b8 */ 12698c2ecf20Sopenharmony_ci#define VLINE_STATUS 0x6bb8 12708c2ecf20Sopenharmony_ci# define VLINE_OCCURRED (1 << 0) 12718c2ecf20Sopenharmony_ci# define VLINE_ACK (1 << 4) 12728c2ecf20Sopenharmony_ci# define VLINE_STAT (1 << 12) 12738c2ecf20Sopenharmony_ci# define VLINE_INTERRUPT (1 << 16) 12748c2ecf20Sopenharmony_ci# define VLINE_INTERRUPT_TYPE (1 << 17) 12758c2ecf20Sopenharmony_ci/* 0x6bbc, 0x77bc, 0x103bc, 0x10fbc, 0x11bbc, 0x127bc */ 12768c2ecf20Sopenharmony_ci#define VBLANK_STATUS 0x6bbc 12778c2ecf20Sopenharmony_ci# define VBLANK_OCCURRED (1 << 0) 12788c2ecf20Sopenharmony_ci# define VBLANK_ACK (1 << 4) 12798c2ecf20Sopenharmony_ci# define VBLANK_STAT (1 << 12) 12808c2ecf20Sopenharmony_ci# define VBLANK_INTERRUPT (1 << 16) 12818c2ecf20Sopenharmony_ci# define VBLANK_INTERRUPT_TYPE (1 << 17) 12828c2ecf20Sopenharmony_ci 12838c2ecf20Sopenharmony_ci/* 0x6b40, 0x7740, 0x10340, 0x10f40, 0x11b40, 0x12740 */ 12848c2ecf20Sopenharmony_ci#define INT_MASK 0x6b40 12858c2ecf20Sopenharmony_ci# define VBLANK_INT_MASK (1 << 0) 12868c2ecf20Sopenharmony_ci# define VLINE_INT_MASK (1 << 4) 12878c2ecf20Sopenharmony_ci 12888c2ecf20Sopenharmony_ci#define DISP_INTERRUPT_STATUS 0x60f4 12898c2ecf20Sopenharmony_ci# define LB_D1_VLINE_INTERRUPT (1 << 2) 12908c2ecf20Sopenharmony_ci# define LB_D1_VBLANK_INTERRUPT (1 << 3) 12918c2ecf20Sopenharmony_ci# define DC_HPD1_INTERRUPT (1 << 17) 12928c2ecf20Sopenharmony_ci# define DC_HPD1_RX_INTERRUPT (1 << 18) 12938c2ecf20Sopenharmony_ci# define DACA_AUTODETECT_INTERRUPT (1 << 22) 12948c2ecf20Sopenharmony_ci# define DACB_AUTODETECT_INTERRUPT (1 << 23) 12958c2ecf20Sopenharmony_ci# define DC_I2C_SW_DONE_INTERRUPT (1 << 24) 12968c2ecf20Sopenharmony_ci# define DC_I2C_HW_DONE_INTERRUPT (1 << 25) 12978c2ecf20Sopenharmony_ci#define DISP_INTERRUPT_STATUS_CONTINUE 0x60f8 12988c2ecf20Sopenharmony_ci# define LB_D2_VLINE_INTERRUPT (1 << 2) 12998c2ecf20Sopenharmony_ci# define LB_D2_VBLANK_INTERRUPT (1 << 3) 13008c2ecf20Sopenharmony_ci# define DC_HPD2_INTERRUPT (1 << 17) 13018c2ecf20Sopenharmony_ci# define DC_HPD2_RX_INTERRUPT (1 << 18) 13028c2ecf20Sopenharmony_ci# define DISP_TIMER_INTERRUPT (1 << 24) 13038c2ecf20Sopenharmony_ci#define DISP_INTERRUPT_STATUS_CONTINUE2 0x60fc 13048c2ecf20Sopenharmony_ci# define LB_D3_VLINE_INTERRUPT (1 << 2) 13058c2ecf20Sopenharmony_ci# define LB_D3_VBLANK_INTERRUPT (1 << 3) 13068c2ecf20Sopenharmony_ci# define DC_HPD3_INTERRUPT (1 << 17) 13078c2ecf20Sopenharmony_ci# define DC_HPD3_RX_INTERRUPT (1 << 18) 13088c2ecf20Sopenharmony_ci#define DISP_INTERRUPT_STATUS_CONTINUE3 0x6100 13098c2ecf20Sopenharmony_ci# define LB_D4_VLINE_INTERRUPT (1 << 2) 13108c2ecf20Sopenharmony_ci# define LB_D4_VBLANK_INTERRUPT (1 << 3) 13118c2ecf20Sopenharmony_ci# define DC_HPD4_INTERRUPT (1 << 17) 13128c2ecf20Sopenharmony_ci# define DC_HPD4_RX_INTERRUPT (1 << 18) 13138c2ecf20Sopenharmony_ci#define DISP_INTERRUPT_STATUS_CONTINUE4 0x614c 13148c2ecf20Sopenharmony_ci# define LB_D5_VLINE_INTERRUPT (1 << 2) 13158c2ecf20Sopenharmony_ci# define LB_D5_VBLANK_INTERRUPT (1 << 3) 13168c2ecf20Sopenharmony_ci# define DC_HPD5_INTERRUPT (1 << 17) 13178c2ecf20Sopenharmony_ci# define DC_HPD5_RX_INTERRUPT (1 << 18) 13188c2ecf20Sopenharmony_ci#define DISP_INTERRUPT_STATUS_CONTINUE5 0x6150 13198c2ecf20Sopenharmony_ci# define LB_D6_VLINE_INTERRUPT (1 << 2) 13208c2ecf20Sopenharmony_ci# define LB_D6_VBLANK_INTERRUPT (1 << 3) 13218c2ecf20Sopenharmony_ci# define DC_HPD6_INTERRUPT (1 << 17) 13228c2ecf20Sopenharmony_ci# define DC_HPD6_RX_INTERRUPT (1 << 18) 13238c2ecf20Sopenharmony_ci 13248c2ecf20Sopenharmony_ci/* 0x6858, 0x7458, 0x10058, 0x10c58, 0x11858, 0x12458 */ 13258c2ecf20Sopenharmony_ci#define GRPH_INT_STATUS 0x6858 13268c2ecf20Sopenharmony_ci# define GRPH_PFLIP_INT_OCCURRED (1 << 0) 13278c2ecf20Sopenharmony_ci# define GRPH_PFLIP_INT_CLEAR (1 << 8) 13288c2ecf20Sopenharmony_ci/* 0x685c, 0x745c, 0x1005c, 0x10c5c, 0x1185c, 0x1245c */ 13298c2ecf20Sopenharmony_ci#define GRPH_INT_CONTROL 0x685c 13308c2ecf20Sopenharmony_ci# define GRPH_PFLIP_INT_MASK (1 << 0) 13318c2ecf20Sopenharmony_ci# define GRPH_PFLIP_INT_TYPE (1 << 8) 13328c2ecf20Sopenharmony_ci 13338c2ecf20Sopenharmony_ci#define DACA_AUTODETECT_INT_CONTROL 0x66c8 13348c2ecf20Sopenharmony_ci#define DACB_AUTODETECT_INT_CONTROL 0x67c8 13358c2ecf20Sopenharmony_ci 13368c2ecf20Sopenharmony_ci#define DC_HPD1_INT_STATUS 0x601c 13378c2ecf20Sopenharmony_ci#define DC_HPD2_INT_STATUS 0x6028 13388c2ecf20Sopenharmony_ci#define DC_HPD3_INT_STATUS 0x6034 13398c2ecf20Sopenharmony_ci#define DC_HPD4_INT_STATUS 0x6040 13408c2ecf20Sopenharmony_ci#define DC_HPD5_INT_STATUS 0x604c 13418c2ecf20Sopenharmony_ci#define DC_HPD6_INT_STATUS 0x6058 13428c2ecf20Sopenharmony_ci# define DC_HPDx_INT_STATUS (1 << 0) 13438c2ecf20Sopenharmony_ci# define DC_HPDx_SENSE (1 << 1) 13448c2ecf20Sopenharmony_ci# define DC_HPDx_RX_INT_STATUS (1 << 8) 13458c2ecf20Sopenharmony_ci 13468c2ecf20Sopenharmony_ci#define DC_HPD1_INT_CONTROL 0x6020 13478c2ecf20Sopenharmony_ci#define DC_HPD2_INT_CONTROL 0x602c 13488c2ecf20Sopenharmony_ci#define DC_HPD3_INT_CONTROL 0x6038 13498c2ecf20Sopenharmony_ci#define DC_HPD4_INT_CONTROL 0x6044 13508c2ecf20Sopenharmony_ci#define DC_HPD5_INT_CONTROL 0x6050 13518c2ecf20Sopenharmony_ci#define DC_HPD6_INT_CONTROL 0x605c 13528c2ecf20Sopenharmony_ci# define DC_HPDx_INT_ACK (1 << 0) 13538c2ecf20Sopenharmony_ci# define DC_HPDx_INT_POLARITY (1 << 8) 13548c2ecf20Sopenharmony_ci# define DC_HPDx_INT_EN (1 << 16) 13558c2ecf20Sopenharmony_ci# define DC_HPDx_RX_INT_ACK (1 << 20) 13568c2ecf20Sopenharmony_ci# define DC_HPDx_RX_INT_EN (1 << 24) 13578c2ecf20Sopenharmony_ci 13588c2ecf20Sopenharmony_ci#define DC_HPD1_CONTROL 0x6024 13598c2ecf20Sopenharmony_ci#define DC_HPD2_CONTROL 0x6030 13608c2ecf20Sopenharmony_ci#define DC_HPD3_CONTROL 0x603c 13618c2ecf20Sopenharmony_ci#define DC_HPD4_CONTROL 0x6048 13628c2ecf20Sopenharmony_ci#define DC_HPD5_CONTROL 0x6054 13638c2ecf20Sopenharmony_ci#define DC_HPD6_CONTROL 0x6060 13648c2ecf20Sopenharmony_ci# define DC_HPDx_CONNECTION_TIMER(x) ((x) << 0) 13658c2ecf20Sopenharmony_ci# define DC_HPDx_RX_INT_TIMER(x) ((x) << 16) 13668c2ecf20Sopenharmony_ci# define DC_HPDx_EN (1 << 28) 13678c2ecf20Sopenharmony_ci 13688c2ecf20Sopenharmony_ci/* DCE4/5/6 FMT blocks */ 13698c2ecf20Sopenharmony_ci#define FMT_DYNAMIC_EXP_CNTL 0x6fb4 13708c2ecf20Sopenharmony_ci# define FMT_DYNAMIC_EXP_EN (1 << 0) 13718c2ecf20Sopenharmony_ci# define FMT_DYNAMIC_EXP_MODE (1 << 4) 13728c2ecf20Sopenharmony_ci /* 0 = 10bit -> 12bit, 1 = 8bit -> 12bit */ 13738c2ecf20Sopenharmony_ci#define FMT_CONTROL 0x6fb8 13748c2ecf20Sopenharmony_ci# define FMT_PIXEL_ENCODING (1 << 16) 13758c2ecf20Sopenharmony_ci /* 0 = RGB 4:4:4 or YCbCr 4:4:4, 1 = YCbCr 4:2:2 */ 13768c2ecf20Sopenharmony_ci#define FMT_BIT_DEPTH_CONTROL 0x6fc8 13778c2ecf20Sopenharmony_ci# define FMT_TRUNCATE_EN (1 << 0) 13788c2ecf20Sopenharmony_ci# define FMT_TRUNCATE_DEPTH (1 << 4) 13798c2ecf20Sopenharmony_ci# define FMT_SPATIAL_DITHER_EN (1 << 8) 13808c2ecf20Sopenharmony_ci# define FMT_SPATIAL_DITHER_MODE(x) ((x) << 9) 13818c2ecf20Sopenharmony_ci# define FMT_SPATIAL_DITHER_DEPTH (1 << 12) 13828c2ecf20Sopenharmony_ci# define FMT_FRAME_RANDOM_ENABLE (1 << 13) 13838c2ecf20Sopenharmony_ci# define FMT_RGB_RANDOM_ENABLE (1 << 14) 13848c2ecf20Sopenharmony_ci# define FMT_HIGHPASS_RANDOM_ENABLE (1 << 15) 13858c2ecf20Sopenharmony_ci# define FMT_TEMPORAL_DITHER_EN (1 << 16) 13868c2ecf20Sopenharmony_ci# define FMT_TEMPORAL_DITHER_DEPTH (1 << 20) 13878c2ecf20Sopenharmony_ci# define FMT_TEMPORAL_DITHER_OFFSET(x) ((x) << 21) 13888c2ecf20Sopenharmony_ci# define FMT_TEMPORAL_LEVEL (1 << 24) 13898c2ecf20Sopenharmony_ci# define FMT_TEMPORAL_DITHER_RESET (1 << 25) 13908c2ecf20Sopenharmony_ci# define FMT_25FRC_SEL(x) ((x) << 26) 13918c2ecf20Sopenharmony_ci# define FMT_50FRC_SEL(x) ((x) << 28) 13928c2ecf20Sopenharmony_ci# define FMT_75FRC_SEL(x) ((x) << 30) 13938c2ecf20Sopenharmony_ci#define FMT_CLAMP_CONTROL 0x6fe4 13948c2ecf20Sopenharmony_ci# define FMT_CLAMP_DATA_EN (1 << 0) 13958c2ecf20Sopenharmony_ci# define FMT_CLAMP_COLOR_FORMAT(x) ((x) << 16) 13968c2ecf20Sopenharmony_ci# define FMT_CLAMP_6BPC 0 13978c2ecf20Sopenharmony_ci# define FMT_CLAMP_8BPC 1 13988c2ecf20Sopenharmony_ci# define FMT_CLAMP_10BPC 2 13998c2ecf20Sopenharmony_ci 14008c2ecf20Sopenharmony_ci/* ASYNC DMA */ 14018c2ecf20Sopenharmony_ci#define DMA_RB_RPTR 0xd008 14028c2ecf20Sopenharmony_ci#define DMA_RB_WPTR 0xd00c 14038c2ecf20Sopenharmony_ci 14048c2ecf20Sopenharmony_ci#define DMA_CNTL 0xd02c 14058c2ecf20Sopenharmony_ci# define TRAP_ENABLE (1 << 0) 14068c2ecf20Sopenharmony_ci# define SEM_INCOMPLETE_INT_ENABLE (1 << 1) 14078c2ecf20Sopenharmony_ci# define SEM_WAIT_INT_ENABLE (1 << 2) 14088c2ecf20Sopenharmony_ci# define DATA_SWAP_ENABLE (1 << 3) 14098c2ecf20Sopenharmony_ci# define FENCE_SWAP_ENABLE (1 << 4) 14108c2ecf20Sopenharmony_ci# define CTXEMPTY_INT_ENABLE (1 << 28) 14118c2ecf20Sopenharmony_ci#define DMA_TILING_CONFIG 0xD0B8 14128c2ecf20Sopenharmony_ci 14138c2ecf20Sopenharmony_ci#define CAYMAN_DMA1_CNTL 0xd82c 14148c2ecf20Sopenharmony_ci 14158c2ecf20Sopenharmony_ci/* async DMA packets */ 14168c2ecf20Sopenharmony_ci#define DMA_PACKET(cmd, sub_cmd, n) ((((cmd) & 0xF) << 28) | \ 14178c2ecf20Sopenharmony_ci (((sub_cmd) & 0xFF) << 20) |\ 14188c2ecf20Sopenharmony_ci (((n) & 0xFFFFF) << 0)) 14198c2ecf20Sopenharmony_ci#define GET_DMA_CMD(h) (((h) & 0xf0000000) >> 28) 14208c2ecf20Sopenharmony_ci#define GET_DMA_COUNT(h) ((h) & 0x000fffff) 14218c2ecf20Sopenharmony_ci#define GET_DMA_SUB_CMD(h) (((h) & 0x0ff00000) >> 20) 14228c2ecf20Sopenharmony_ci 14238c2ecf20Sopenharmony_ci/* async DMA Packet types */ 14248c2ecf20Sopenharmony_ci#define DMA_PACKET_WRITE 0x2 14258c2ecf20Sopenharmony_ci#define DMA_PACKET_COPY 0x3 14268c2ecf20Sopenharmony_ci#define DMA_PACKET_INDIRECT_BUFFER 0x4 14278c2ecf20Sopenharmony_ci#define DMA_PACKET_SEMAPHORE 0x5 14288c2ecf20Sopenharmony_ci#define DMA_PACKET_FENCE 0x6 14298c2ecf20Sopenharmony_ci#define DMA_PACKET_TRAP 0x7 14308c2ecf20Sopenharmony_ci#define DMA_PACKET_SRBM_WRITE 0x9 14318c2ecf20Sopenharmony_ci#define DMA_PACKET_CONSTANT_FILL 0xd 14328c2ecf20Sopenharmony_ci#define DMA_PACKET_NOP 0xf 14338c2ecf20Sopenharmony_ci 14348c2ecf20Sopenharmony_ci/* PIF PHY0 indirect regs */ 14358c2ecf20Sopenharmony_ci#define PB0_PIF_CNTL 0x10 14368c2ecf20Sopenharmony_ci# define LS2_EXIT_TIME(x) ((x) << 17) 14378c2ecf20Sopenharmony_ci# define LS2_EXIT_TIME_MASK (0x7 << 17) 14388c2ecf20Sopenharmony_ci# define LS2_EXIT_TIME_SHIFT 17 14398c2ecf20Sopenharmony_ci#define PB0_PIF_PAIRING 0x11 14408c2ecf20Sopenharmony_ci# define MULTI_PIF (1 << 25) 14418c2ecf20Sopenharmony_ci#define PB0_PIF_PWRDOWN_0 0x12 14428c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_TXS2_0(x) ((x) << 7) 14438c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_TXS2_0_MASK (0x7 << 7) 14448c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_TXS2_0_SHIFT 7 14458c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_OFF_0(x) ((x) << 10) 14468c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_OFF_0_MASK (0x7 << 10) 14478c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_OFF_0_SHIFT 10 14488c2ecf20Sopenharmony_ci# define PLL_RAMP_UP_TIME_0(x) ((x) << 24) 14498c2ecf20Sopenharmony_ci# define PLL_RAMP_UP_TIME_0_MASK (0x7 << 24) 14508c2ecf20Sopenharmony_ci# define PLL_RAMP_UP_TIME_0_SHIFT 24 14518c2ecf20Sopenharmony_ci#define PB0_PIF_PWRDOWN_1 0x13 14528c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_TXS2_1(x) ((x) << 7) 14538c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_TXS2_1_MASK (0x7 << 7) 14548c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_TXS2_1_SHIFT 7 14558c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_OFF_1(x) ((x) << 10) 14568c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_OFF_1_MASK (0x7 << 10) 14578c2ecf20Sopenharmony_ci# define PLL_POWER_STATE_IN_OFF_1_SHIFT 10 14588c2ecf20Sopenharmony_ci# define PLL_RAMP_UP_TIME_1(x) ((x) << 24) 14598c2ecf20Sopenharmony_ci# define PLL_RAMP_UP_TIME_1_MASK (0x7 << 24) 14608c2ecf20Sopenharmony_ci# define PLL_RAMP_UP_TIME_1_SHIFT 24 14618c2ecf20Sopenharmony_ci/* PIF PHY1 indirect regs */ 14628c2ecf20Sopenharmony_ci#define PB1_PIF_CNTL 0x10 14638c2ecf20Sopenharmony_ci#define PB1_PIF_PAIRING 0x11 14648c2ecf20Sopenharmony_ci#define PB1_PIF_PWRDOWN_0 0x12 14658c2ecf20Sopenharmony_ci#define PB1_PIF_PWRDOWN_1 0x13 14668c2ecf20Sopenharmony_ci/* PCIE PORT indirect regs */ 14678c2ecf20Sopenharmony_ci#define PCIE_LC_CNTL 0xa0 14688c2ecf20Sopenharmony_ci# define LC_L0S_INACTIVITY(x) ((x) << 8) 14698c2ecf20Sopenharmony_ci# define LC_L0S_INACTIVITY_MASK (0xf << 8) 14708c2ecf20Sopenharmony_ci# define LC_L0S_INACTIVITY_SHIFT 8 14718c2ecf20Sopenharmony_ci# define LC_L1_INACTIVITY(x) ((x) << 12) 14728c2ecf20Sopenharmony_ci# define LC_L1_INACTIVITY_MASK (0xf << 12) 14738c2ecf20Sopenharmony_ci# define LC_L1_INACTIVITY_SHIFT 12 14748c2ecf20Sopenharmony_ci# define LC_PMI_TO_L1_DIS (1 << 16) 14758c2ecf20Sopenharmony_ci# define LC_ASPM_TO_L1_DIS (1 << 24) 14768c2ecf20Sopenharmony_ci#define PCIE_LC_TRAINING_CNTL 0xa1 /* PCIE_P */ 14778c2ecf20Sopenharmony_ci#define PCIE_LC_LINK_WIDTH_CNTL 0xa2 /* PCIE_P */ 14788c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_SHIFT 0 14798c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_MASK 0x7 14808c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_X0 0 14818c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_X1 1 14828c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_X2 2 14838c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_X4 3 14848c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_X8 4 14858c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_X16 6 14868c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_RD_SHIFT 4 14878c2ecf20Sopenharmony_ci# define LC_LINK_WIDTH_RD_MASK 0x70 14888c2ecf20Sopenharmony_ci# define LC_RECONFIG_ARC_MISSING_ESCAPE (1 << 7) 14898c2ecf20Sopenharmony_ci# define LC_RECONFIG_NOW (1 << 8) 14908c2ecf20Sopenharmony_ci# define LC_RENEGOTIATION_SUPPORT (1 << 9) 14918c2ecf20Sopenharmony_ci# define LC_RENEGOTIATE_EN (1 << 10) 14928c2ecf20Sopenharmony_ci# define LC_SHORT_RECONFIG_EN (1 << 11) 14938c2ecf20Sopenharmony_ci# define LC_UPCONFIGURE_SUPPORT (1 << 12) 14948c2ecf20Sopenharmony_ci# define LC_UPCONFIGURE_DIS (1 << 13) 14958c2ecf20Sopenharmony_ci# define LC_DYN_LANES_PWR_STATE(x) ((x) << 21) 14968c2ecf20Sopenharmony_ci# define LC_DYN_LANES_PWR_STATE_MASK (0x3 << 21) 14978c2ecf20Sopenharmony_ci# define LC_DYN_LANES_PWR_STATE_SHIFT 21 14988c2ecf20Sopenharmony_ci#define PCIE_LC_SPEED_CNTL 0xa4 /* PCIE_P */ 14998c2ecf20Sopenharmony_ci# define LC_GEN2_EN_STRAP (1 << 0) 15008c2ecf20Sopenharmony_ci# define LC_TARGET_LINK_SPEED_OVERRIDE_EN (1 << 1) 15018c2ecf20Sopenharmony_ci# define LC_FORCE_EN_HW_SPEED_CHANGE (1 << 5) 15028c2ecf20Sopenharmony_ci# define LC_FORCE_DIS_HW_SPEED_CHANGE (1 << 6) 15038c2ecf20Sopenharmony_ci# define LC_SPEED_CHANGE_ATTEMPTS_ALLOWED_MASK (0x3 << 8) 15048c2ecf20Sopenharmony_ci# define LC_SPEED_CHANGE_ATTEMPTS_ALLOWED_SHIFT 3 15058c2ecf20Sopenharmony_ci# define LC_CURRENT_DATA_RATE (1 << 11) 15068c2ecf20Sopenharmony_ci# define LC_HW_VOLTAGE_IF_CONTROL(x) ((x) << 12) 15078c2ecf20Sopenharmony_ci# define LC_HW_VOLTAGE_IF_CONTROL_MASK (3 << 12) 15088c2ecf20Sopenharmony_ci# define LC_HW_VOLTAGE_IF_CONTROL_SHIFT 12 15098c2ecf20Sopenharmony_ci# define LC_VOLTAGE_TIMER_SEL_MASK (0xf << 14) 15108c2ecf20Sopenharmony_ci# define LC_CLR_FAILED_SPD_CHANGE_CNT (1 << 21) 15118c2ecf20Sopenharmony_ci# define LC_OTHER_SIDE_EVER_SENT_GEN2 (1 << 23) 15128c2ecf20Sopenharmony_ci# define LC_OTHER_SIDE_SUPPORTS_GEN2 (1 << 24) 15138c2ecf20Sopenharmony_ci#define MM_CFGREGS_CNTL 0x544c 15148c2ecf20Sopenharmony_ci# define MM_WR_TO_CFG_EN (1 << 3) 15158c2ecf20Sopenharmony_ci#define LINK_CNTL2 0x88 /* F0 */ 15168c2ecf20Sopenharmony_ci# define TARGET_LINK_SPEED_MASK (0xf << 0) 15178c2ecf20Sopenharmony_ci# define SELECTABLE_DEEMPHASIS (1 << 6) 15188c2ecf20Sopenharmony_ci 15198c2ecf20Sopenharmony_ci 15208c2ecf20Sopenharmony_ci/* 15218c2ecf20Sopenharmony_ci * UVD 15228c2ecf20Sopenharmony_ci */ 15238c2ecf20Sopenharmony_ci#define UVD_UDEC_ADDR_CONFIG 0xef4c 15248c2ecf20Sopenharmony_ci#define UVD_UDEC_DB_ADDR_CONFIG 0xef50 15258c2ecf20Sopenharmony_ci#define UVD_UDEC_DBW_ADDR_CONFIG 0xef54 15268c2ecf20Sopenharmony_ci#define UVD_NO_OP 0xeffc 15278c2ecf20Sopenharmony_ci#define UVD_RBC_RB_RPTR 0xf690 15288c2ecf20Sopenharmony_ci#define UVD_RBC_RB_WPTR 0xf694 15298c2ecf20Sopenharmony_ci#define UVD_STATUS 0xf6bc 15308c2ecf20Sopenharmony_ci 15318c2ecf20Sopenharmony_ci/* 15328c2ecf20Sopenharmony_ci * PM4 15338c2ecf20Sopenharmony_ci */ 15348c2ecf20Sopenharmony_ci#define PACKET0(reg, n) ((RADEON_PACKET_TYPE0 << 30) | \ 15358c2ecf20Sopenharmony_ci (((reg) >> 2) & 0xFFFF) | \ 15368c2ecf20Sopenharmony_ci ((n) & 0x3FFF) << 16) 15378c2ecf20Sopenharmony_ci#define CP_PACKET2 0x80000000 15388c2ecf20Sopenharmony_ci#define PACKET2_PAD_SHIFT 0 15398c2ecf20Sopenharmony_ci#define PACKET2_PAD_MASK (0x3fffffff << 0) 15408c2ecf20Sopenharmony_ci 15418c2ecf20Sopenharmony_ci#define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v))) 15428c2ecf20Sopenharmony_ci 15438c2ecf20Sopenharmony_ci#define PACKET3(op, n) ((RADEON_PACKET_TYPE3 << 30) | \ 15448c2ecf20Sopenharmony_ci (((op) & 0xFF) << 8) | \ 15458c2ecf20Sopenharmony_ci ((n) & 0x3FFF) << 16) 15468c2ecf20Sopenharmony_ci 15478c2ecf20Sopenharmony_ci/* Packet 3 types */ 15488c2ecf20Sopenharmony_ci#define PACKET3_NOP 0x10 15498c2ecf20Sopenharmony_ci#define PACKET3_SET_BASE 0x11 15508c2ecf20Sopenharmony_ci#define PACKET3_CLEAR_STATE 0x12 15518c2ecf20Sopenharmony_ci#define PACKET3_INDEX_BUFFER_SIZE 0x13 15528c2ecf20Sopenharmony_ci#define PACKET3_DISPATCH_DIRECT 0x15 15538c2ecf20Sopenharmony_ci#define PACKET3_DISPATCH_INDIRECT 0x16 15548c2ecf20Sopenharmony_ci#define PACKET3_INDIRECT_BUFFER_END 0x17 15558c2ecf20Sopenharmony_ci#define PACKET3_MODE_CONTROL 0x18 15568c2ecf20Sopenharmony_ci#define PACKET3_SET_PREDICATION 0x20 15578c2ecf20Sopenharmony_ci#define PACKET3_REG_RMW 0x21 15588c2ecf20Sopenharmony_ci#define PACKET3_COND_EXEC 0x22 15598c2ecf20Sopenharmony_ci#define PACKET3_PRED_EXEC 0x23 15608c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDIRECT 0x24 15618c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_INDIRECT 0x25 15628c2ecf20Sopenharmony_ci#define PACKET3_INDEX_BASE 0x26 15638c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_2 0x27 15648c2ecf20Sopenharmony_ci#define PACKET3_CONTEXT_CONTROL 0x28 15658c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_OFFSET 0x29 15668c2ecf20Sopenharmony_ci#define PACKET3_INDEX_TYPE 0x2A 15678c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX 0x2B 15688c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_AUTO 0x2D 15698c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_IMMD 0x2E 15708c2ecf20Sopenharmony_ci#define PACKET3_NUM_INSTANCES 0x2F 15718c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_MULTI_AUTO 0x30 15728c2ecf20Sopenharmony_ci#define PACKET3_STRMOUT_BUFFER_UPDATE 0x34 15738c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_OFFSET_2 0x35 15748c2ecf20Sopenharmony_ci#define PACKET3_DRAW_INDEX_MULTI_ELEMENT 0x36 15758c2ecf20Sopenharmony_ci#define PACKET3_MEM_SEMAPHORE 0x39 15768c2ecf20Sopenharmony_ci#define PACKET3_MPEG_INDEX 0x3A 15778c2ecf20Sopenharmony_ci#define PACKET3_COPY_DW 0x3B 15788c2ecf20Sopenharmony_ci#define PACKET3_WAIT_REG_MEM 0x3C 15798c2ecf20Sopenharmony_ci#define PACKET3_MEM_WRITE 0x3D 15808c2ecf20Sopenharmony_ci#define PACKET3_INDIRECT_BUFFER 0x32 15818c2ecf20Sopenharmony_ci#define PACKET3_CP_DMA 0x41 15828c2ecf20Sopenharmony_ci/* 1. header 15838c2ecf20Sopenharmony_ci * 2. SRC_ADDR_LO or DATA [31:0] 15848c2ecf20Sopenharmony_ci * 3. CP_SYNC [31] | SRC_SEL [30:29] | ENGINE [27] | DST_SEL [21:20] | 15858c2ecf20Sopenharmony_ci * SRC_ADDR_HI [7:0] 15868c2ecf20Sopenharmony_ci * 4. DST_ADDR_LO [31:0] 15878c2ecf20Sopenharmony_ci * 5. DST_ADDR_HI [7:0] 15888c2ecf20Sopenharmony_ci * 6. COMMAND [29:22] | BYTE_COUNT [20:0] 15898c2ecf20Sopenharmony_ci */ 15908c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_DST_SEL(x) ((x) << 20) 15918c2ecf20Sopenharmony_ci /* 0 - DST_ADDR 15928c2ecf20Sopenharmony_ci * 1 - GDS 15938c2ecf20Sopenharmony_ci */ 15948c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_ENGINE(x) ((x) << 27) 15958c2ecf20Sopenharmony_ci /* 0 - ME 15968c2ecf20Sopenharmony_ci * 1 - PFP 15978c2ecf20Sopenharmony_ci */ 15988c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_SRC_SEL(x) ((x) << 29) 15998c2ecf20Sopenharmony_ci /* 0 - SRC_ADDR 16008c2ecf20Sopenharmony_ci * 1 - GDS 16018c2ecf20Sopenharmony_ci * 2 - DATA 16028c2ecf20Sopenharmony_ci */ 16038c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CP_SYNC (1 << 31) 16048c2ecf20Sopenharmony_ci/* COMMAND */ 16058c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_DIS_WC (1 << 21) 16068c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22) 16078c2ecf20Sopenharmony_ci /* 0 - none 16088c2ecf20Sopenharmony_ci * 1 - 8 in 16 16098c2ecf20Sopenharmony_ci * 2 - 8 in 32 16108c2ecf20Sopenharmony_ci * 3 - 8 in 64 16118c2ecf20Sopenharmony_ci */ 16128c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_DST_SWAP(x) ((x) << 24) 16138c2ecf20Sopenharmony_ci /* 0 - none 16148c2ecf20Sopenharmony_ci * 1 - 8 in 16 16158c2ecf20Sopenharmony_ci * 2 - 8 in 32 16168c2ecf20Sopenharmony_ci * 3 - 8 in 64 16178c2ecf20Sopenharmony_ci */ 16188c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_SAS (1 << 26) 16198c2ecf20Sopenharmony_ci /* 0 - memory 16208c2ecf20Sopenharmony_ci * 1 - register 16218c2ecf20Sopenharmony_ci */ 16228c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_DAS (1 << 27) 16238c2ecf20Sopenharmony_ci /* 0 - memory 16248c2ecf20Sopenharmony_ci * 1 - register 16258c2ecf20Sopenharmony_ci */ 16268c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_SAIC (1 << 28) 16278c2ecf20Sopenharmony_ci# define PACKET3_CP_DMA_CMD_DAIC (1 << 29) 16288c2ecf20Sopenharmony_ci#define PACKET3_PFP_SYNC_ME 0x42 16298c2ecf20Sopenharmony_ci#define PACKET3_SURFACE_SYNC 0x43 16308c2ecf20Sopenharmony_ci# define PACKET3_CB0_DEST_BASE_ENA (1 << 6) 16318c2ecf20Sopenharmony_ci# define PACKET3_CB1_DEST_BASE_ENA (1 << 7) 16328c2ecf20Sopenharmony_ci# define PACKET3_CB2_DEST_BASE_ENA (1 << 8) 16338c2ecf20Sopenharmony_ci# define PACKET3_CB3_DEST_BASE_ENA (1 << 9) 16348c2ecf20Sopenharmony_ci# define PACKET3_CB4_DEST_BASE_ENA (1 << 10) 16358c2ecf20Sopenharmony_ci# define PACKET3_CB5_DEST_BASE_ENA (1 << 11) 16368c2ecf20Sopenharmony_ci# define PACKET3_CB6_DEST_BASE_ENA (1 << 12) 16378c2ecf20Sopenharmony_ci# define PACKET3_CB7_DEST_BASE_ENA (1 << 13) 16388c2ecf20Sopenharmony_ci# define PACKET3_DB_DEST_BASE_ENA (1 << 14) 16398c2ecf20Sopenharmony_ci# define PACKET3_CB8_DEST_BASE_ENA (1 << 15) 16408c2ecf20Sopenharmony_ci# define PACKET3_CB9_DEST_BASE_ENA (1 << 16) 16418c2ecf20Sopenharmony_ci# define PACKET3_CB10_DEST_BASE_ENA (1 << 17) 16428c2ecf20Sopenharmony_ci# define PACKET3_CB11_DEST_BASE_ENA (1 << 18) 16438c2ecf20Sopenharmony_ci# define PACKET3_FULL_CACHE_ENA (1 << 20) 16448c2ecf20Sopenharmony_ci# define PACKET3_TC_ACTION_ENA (1 << 23) 16458c2ecf20Sopenharmony_ci# define PACKET3_VC_ACTION_ENA (1 << 24) 16468c2ecf20Sopenharmony_ci# define PACKET3_CB_ACTION_ENA (1 << 25) 16478c2ecf20Sopenharmony_ci# define PACKET3_DB_ACTION_ENA (1 << 26) 16488c2ecf20Sopenharmony_ci# define PACKET3_SH_ACTION_ENA (1 << 27) 16498c2ecf20Sopenharmony_ci# define PACKET3_SX_ACTION_ENA (1 << 28) 16508c2ecf20Sopenharmony_ci#define PACKET3_ME_INITIALIZE 0x44 16518c2ecf20Sopenharmony_ci#define PACKET3_ME_INITIALIZE_DEVICE_ID(x) ((x) << 16) 16528c2ecf20Sopenharmony_ci#define PACKET3_COND_WRITE 0x45 16538c2ecf20Sopenharmony_ci#define PACKET3_EVENT_WRITE 0x46 16548c2ecf20Sopenharmony_ci#define PACKET3_EVENT_WRITE_EOP 0x47 16558c2ecf20Sopenharmony_ci#define PACKET3_EVENT_WRITE_EOS 0x48 16568c2ecf20Sopenharmony_ci#define PACKET3_PREAMBLE_CNTL 0x4A 16578c2ecf20Sopenharmony_ci# define PACKET3_PREAMBLE_BEGIN_CLEAR_STATE (2 << 28) 16588c2ecf20Sopenharmony_ci# define PACKET3_PREAMBLE_END_CLEAR_STATE (3 << 28) 16598c2ecf20Sopenharmony_ci#define PACKET3_RB_OFFSET 0x4B 16608c2ecf20Sopenharmony_ci#define PACKET3_ALU_PS_CONST_BUFFER_COPY 0x4C 16618c2ecf20Sopenharmony_ci#define PACKET3_ALU_VS_CONST_BUFFER_COPY 0x4D 16628c2ecf20Sopenharmony_ci#define PACKET3_ALU_PS_CONST_UPDATE 0x4E 16638c2ecf20Sopenharmony_ci#define PACKET3_ALU_VS_CONST_UPDATE 0x4F 16648c2ecf20Sopenharmony_ci#define PACKET3_ONE_REG_WRITE 0x57 16658c2ecf20Sopenharmony_ci#define PACKET3_SET_CONFIG_REG 0x68 16668c2ecf20Sopenharmony_ci#define PACKET3_SET_CONFIG_REG_START 0x00008000 16678c2ecf20Sopenharmony_ci#define PACKET3_SET_CONFIG_REG_END 0x0000ac00 16688c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG 0x69 16698c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG_START 0x00028000 16708c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG_END 0x00029000 16718c2ecf20Sopenharmony_ci#define PACKET3_SET_ALU_CONST 0x6A 16728c2ecf20Sopenharmony_ci/* alu const buffers only; no reg file */ 16738c2ecf20Sopenharmony_ci#define PACKET3_SET_BOOL_CONST 0x6B 16748c2ecf20Sopenharmony_ci#define PACKET3_SET_BOOL_CONST_START 0x0003a500 16758c2ecf20Sopenharmony_ci#define PACKET3_SET_BOOL_CONST_END 0x0003a518 16768c2ecf20Sopenharmony_ci#define PACKET3_SET_LOOP_CONST 0x6C 16778c2ecf20Sopenharmony_ci#define PACKET3_SET_LOOP_CONST_START 0x0003a200 16788c2ecf20Sopenharmony_ci#define PACKET3_SET_LOOP_CONST_END 0x0003a500 16798c2ecf20Sopenharmony_ci#define PACKET3_SET_RESOURCE 0x6D 16808c2ecf20Sopenharmony_ci#define PACKET3_SET_RESOURCE_START 0x00030000 16818c2ecf20Sopenharmony_ci#define PACKET3_SET_RESOURCE_END 0x00038000 16828c2ecf20Sopenharmony_ci#define PACKET3_SET_SAMPLER 0x6E 16838c2ecf20Sopenharmony_ci#define PACKET3_SET_SAMPLER_START 0x0003c000 16848c2ecf20Sopenharmony_ci#define PACKET3_SET_SAMPLER_END 0x0003c600 16858c2ecf20Sopenharmony_ci#define PACKET3_SET_CTL_CONST 0x6F 16868c2ecf20Sopenharmony_ci#define PACKET3_SET_CTL_CONST_START 0x0003cff0 16878c2ecf20Sopenharmony_ci#define PACKET3_SET_CTL_CONST_END 0x0003ff0c 16888c2ecf20Sopenharmony_ci#define PACKET3_SET_RESOURCE_OFFSET 0x70 16898c2ecf20Sopenharmony_ci#define PACKET3_SET_ALU_CONST_VS 0x71 16908c2ecf20Sopenharmony_ci#define PACKET3_SET_ALU_CONST_DI 0x72 16918c2ecf20Sopenharmony_ci#define PACKET3_SET_CONTEXT_REG_INDIRECT 0x73 16928c2ecf20Sopenharmony_ci#define PACKET3_SET_RESOURCE_INDIRECT 0x74 16938c2ecf20Sopenharmony_ci#define PACKET3_SET_APPEND_CNT 0x75 16948c2ecf20Sopenharmony_ci/* SET_APPEND_CNT - documentation 16958c2ecf20Sopenharmony_ci * 1. header 16968c2ecf20Sopenharmony_ci * 2. COMMAND 16978c2ecf20Sopenharmony_ci * 1:0 - SOURCE SEL 16988c2ecf20Sopenharmony_ci * 15:2 - Reserved 16998c2ecf20Sopenharmony_ci * 31:16 - WR_REG_OFFSET - context register to write source data to. 17008c2ecf20Sopenharmony_ci * (one of R_02872C_GDS_APPEND_COUNT_0-11) 17018c2ecf20Sopenharmony_ci * 3. CONTROL 17028c2ecf20Sopenharmony_ci * (for source == mem) 17038c2ecf20Sopenharmony_ci * 31:2 SRC_ADDRESS_LO 17048c2ecf20Sopenharmony_ci * 0:1 SWAP 17058c2ecf20Sopenharmony_ci * (for source == GDS) 17068c2ecf20Sopenharmony_ci * 31:0 GDS offset 17078c2ecf20Sopenharmony_ci * (for source == DATA) 17088c2ecf20Sopenharmony_ci * 31:0 DATA 17098c2ecf20Sopenharmony_ci * (for source == REG) 17108c2ecf20Sopenharmony_ci * 31:0 REG 17118c2ecf20Sopenharmony_ci * 4. SRC_ADDRESS_HI[7:0] 17128c2ecf20Sopenharmony_ci * kernel driver 2.44 only supports SRC == MEM. 17138c2ecf20Sopenharmony_ci */ 17148c2ecf20Sopenharmony_ci#define PACKET3_SET_APPEND_CNT_SRC_SELECT(x) ((x) << 0) 17158c2ecf20Sopenharmony_ci#define G_PACKET3_SET_APPEND_CNT_SRC_SELECT(x) ((x & 0x3) >> 0) 17168c2ecf20Sopenharmony_ci/* source is from the data in CONTROL */ 17178c2ecf20Sopenharmony_ci#define PACKET3_SAC_SRC_SEL_DATA 0x0 17188c2ecf20Sopenharmony_ci/* source is from register */ 17198c2ecf20Sopenharmony_ci#define PACKET3_SAC_SRC_SEL_REG 0x1 17208c2ecf20Sopenharmony_ci/* source is from GDS offset in CONTROL */ 17218c2ecf20Sopenharmony_ci#define PACKET3_SAC_SRC_SEL_GDS 0x2 17228c2ecf20Sopenharmony_ci/* source is from memory address */ 17238c2ecf20Sopenharmony_ci#define PACKET3_SAC_SRC_SEL_MEM 0x3 17248c2ecf20Sopenharmony_ci 17258c2ecf20Sopenharmony_ci#define SQ_RESOURCE_CONSTANT_WORD7_0 0x3001c 17268c2ecf20Sopenharmony_ci#define S__SQ_CONSTANT_TYPE(x) (((x) & 3) << 30) 17278c2ecf20Sopenharmony_ci#define G__SQ_CONSTANT_TYPE(x) (((x) >> 30) & 3) 17288c2ecf20Sopenharmony_ci#define SQ_TEX_VTX_INVALID_TEXTURE 0x0 17298c2ecf20Sopenharmony_ci#define SQ_TEX_VTX_INVALID_BUFFER 0x1 17308c2ecf20Sopenharmony_ci#define SQ_TEX_VTX_VALID_TEXTURE 0x2 17318c2ecf20Sopenharmony_ci#define SQ_TEX_VTX_VALID_BUFFER 0x3 17328c2ecf20Sopenharmony_ci 17338c2ecf20Sopenharmony_ci#define VGT_VTX_VECT_EJECT_REG 0x88b0 17348c2ecf20Sopenharmony_ci 17358c2ecf20Sopenharmony_ci#define SQ_CONST_MEM_BASE 0x8df8 17368c2ecf20Sopenharmony_ci 17378c2ecf20Sopenharmony_ci#define SQ_ESGS_RING_BASE 0x8c40 17388c2ecf20Sopenharmony_ci#define SQ_ESGS_RING_SIZE 0x8c44 17398c2ecf20Sopenharmony_ci#define SQ_GSVS_RING_BASE 0x8c48 17408c2ecf20Sopenharmony_ci#define SQ_GSVS_RING_SIZE 0x8c4c 17418c2ecf20Sopenharmony_ci#define SQ_ESTMP_RING_BASE 0x8c50 17428c2ecf20Sopenharmony_ci#define SQ_ESTMP_RING_SIZE 0x8c54 17438c2ecf20Sopenharmony_ci#define SQ_GSTMP_RING_BASE 0x8c58 17448c2ecf20Sopenharmony_ci#define SQ_GSTMP_RING_SIZE 0x8c5c 17458c2ecf20Sopenharmony_ci#define SQ_VSTMP_RING_BASE 0x8c60 17468c2ecf20Sopenharmony_ci#define SQ_VSTMP_RING_SIZE 0x8c64 17478c2ecf20Sopenharmony_ci#define SQ_PSTMP_RING_BASE 0x8c68 17488c2ecf20Sopenharmony_ci#define SQ_PSTMP_RING_SIZE 0x8c6c 17498c2ecf20Sopenharmony_ci#define SQ_LSTMP_RING_BASE 0x8e10 17508c2ecf20Sopenharmony_ci#define SQ_LSTMP_RING_SIZE 0x8e14 17518c2ecf20Sopenharmony_ci#define SQ_HSTMP_RING_BASE 0x8e18 17528c2ecf20Sopenharmony_ci#define SQ_HSTMP_RING_SIZE 0x8e1c 17538c2ecf20Sopenharmony_ci#define VGT_TF_RING_SIZE 0x8988 17548c2ecf20Sopenharmony_ci 17558c2ecf20Sopenharmony_ci#define SQ_ESGS_RING_ITEMSIZE 0x28900 17568c2ecf20Sopenharmony_ci#define SQ_GSVS_RING_ITEMSIZE 0x28904 17578c2ecf20Sopenharmony_ci#define SQ_ESTMP_RING_ITEMSIZE 0x28908 17588c2ecf20Sopenharmony_ci#define SQ_GSTMP_RING_ITEMSIZE 0x2890c 17598c2ecf20Sopenharmony_ci#define SQ_VSTMP_RING_ITEMSIZE 0x28910 17608c2ecf20Sopenharmony_ci#define SQ_PSTMP_RING_ITEMSIZE 0x28914 17618c2ecf20Sopenharmony_ci#define SQ_LSTMP_RING_ITEMSIZE 0x28830 17628c2ecf20Sopenharmony_ci#define SQ_HSTMP_RING_ITEMSIZE 0x28834 17638c2ecf20Sopenharmony_ci 17648c2ecf20Sopenharmony_ci#define SQ_GS_VERT_ITEMSIZE 0x2891c 17658c2ecf20Sopenharmony_ci#define SQ_GS_VERT_ITEMSIZE_1 0x28920 17668c2ecf20Sopenharmony_ci#define SQ_GS_VERT_ITEMSIZE_2 0x28924 17678c2ecf20Sopenharmony_ci#define SQ_GS_VERT_ITEMSIZE_3 0x28928 17688c2ecf20Sopenharmony_ci#define SQ_GSVS_RING_OFFSET_1 0x2892c 17698c2ecf20Sopenharmony_ci#define SQ_GSVS_RING_OFFSET_2 0x28930 17708c2ecf20Sopenharmony_ci#define SQ_GSVS_RING_OFFSET_3 0x28934 17718c2ecf20Sopenharmony_ci 17728c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_BUFFER_SIZE_PS_0 0x28140 17738c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_BUFFER_SIZE_HS_0 0x28f80 17748c2ecf20Sopenharmony_ci 17758c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_0 0x28940 17768c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_1 0x28944 17778c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_2 0x28948 17788c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_3 0x2894c 17798c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_4 0x28950 17808c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_5 0x28954 17818c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_6 0x28958 17828c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_7 0x2895c 17838c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_8 0x28960 17848c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_9 0x28964 17858c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_10 0x28968 17868c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_11 0x2896c 17878c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_12 0x28970 17888c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_13 0x28974 17898c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_14 0x28978 17908c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_PS_15 0x2897c 17918c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_0 0x28980 17928c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_1 0x28984 17938c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_2 0x28988 17948c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_3 0x2898c 17958c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_4 0x28990 17968c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_5 0x28994 17978c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_6 0x28998 17988c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_7 0x2899c 17998c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_8 0x289a0 18008c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_9 0x289a4 18018c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_10 0x289a8 18028c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_11 0x289ac 18038c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_12 0x289b0 18048c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_13 0x289b4 18058c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_14 0x289b8 18068c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_VS_15 0x289bc 18078c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_0 0x289c0 18088c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_1 0x289c4 18098c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_2 0x289c8 18108c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_3 0x289cc 18118c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_4 0x289d0 18128c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_5 0x289d4 18138c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_6 0x289d8 18148c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_7 0x289dc 18158c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_8 0x289e0 18168c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_9 0x289e4 18178c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_10 0x289e8 18188c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_11 0x289ec 18198c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_12 0x289f0 18208c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_13 0x289f4 18218c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_14 0x289f8 18228c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_GS_15 0x289fc 18238c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_0 0x28f00 18248c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_1 0x28f04 18258c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_2 0x28f08 18268c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_3 0x28f0c 18278c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_4 0x28f10 18288c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_5 0x28f14 18298c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_6 0x28f18 18308c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_7 0x28f1c 18318c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_8 0x28f20 18328c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_9 0x28f24 18338c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_10 0x28f28 18348c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_11 0x28f2c 18358c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_12 0x28f30 18368c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_13 0x28f34 18378c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_14 0x28f38 18388c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_HS_15 0x28f3c 18398c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_0 0x28f40 18408c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_1 0x28f44 18418c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_2 0x28f48 18428c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_3 0x28f4c 18438c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_4 0x28f50 18448c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_5 0x28f54 18458c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_6 0x28f58 18468c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_7 0x28f5c 18478c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_8 0x28f60 18488c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_9 0x28f64 18498c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_10 0x28f68 18508c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_11 0x28f6c 18518c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_12 0x28f70 18528c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_13 0x28f74 18538c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_14 0x28f78 18548c2ecf20Sopenharmony_ci#define SQ_ALU_CONST_CACHE_LS_15 0x28f7c 18558c2ecf20Sopenharmony_ci 18568c2ecf20Sopenharmony_ci#define PA_SC_SCREEN_SCISSOR_TL 0x28030 18578c2ecf20Sopenharmony_ci#define PA_SC_GENERIC_SCISSOR_TL 0x28240 18588c2ecf20Sopenharmony_ci#define PA_SC_WINDOW_SCISSOR_TL 0x28204 18598c2ecf20Sopenharmony_ci 18608c2ecf20Sopenharmony_ci#define VGT_PRIMITIVE_TYPE 0x8958 18618c2ecf20Sopenharmony_ci#define VGT_INDEX_TYPE 0x895C 18628c2ecf20Sopenharmony_ci 18638c2ecf20Sopenharmony_ci#define VGT_NUM_INDICES 0x8970 18648c2ecf20Sopenharmony_ci 18658c2ecf20Sopenharmony_ci#define VGT_COMPUTE_DIM_X 0x8990 18668c2ecf20Sopenharmony_ci#define VGT_COMPUTE_DIM_Y 0x8994 18678c2ecf20Sopenharmony_ci#define VGT_COMPUTE_DIM_Z 0x8998 18688c2ecf20Sopenharmony_ci#define VGT_COMPUTE_START_X 0x899C 18698c2ecf20Sopenharmony_ci#define VGT_COMPUTE_START_Y 0x89A0 18708c2ecf20Sopenharmony_ci#define VGT_COMPUTE_START_Z 0x89A4 18718c2ecf20Sopenharmony_ci#define VGT_COMPUTE_INDEX 0x89A8 18728c2ecf20Sopenharmony_ci#define VGT_COMPUTE_THREAD_GROUP_SIZE 0x89AC 18738c2ecf20Sopenharmony_ci#define VGT_HS_OFFCHIP_PARAM 0x89B0 18748c2ecf20Sopenharmony_ci 18758c2ecf20Sopenharmony_ci#define DB_DEBUG 0x9830 18768c2ecf20Sopenharmony_ci#define DB_DEBUG2 0x9834 18778c2ecf20Sopenharmony_ci#define DB_DEBUG3 0x9838 18788c2ecf20Sopenharmony_ci#define DB_DEBUG4 0x983C 18798c2ecf20Sopenharmony_ci#define DB_WATERMARKS 0x9854 18808c2ecf20Sopenharmony_ci#define DB_DEPTH_CONTROL 0x28800 18818c2ecf20Sopenharmony_ci#define R_028800_DB_DEPTH_CONTROL 0x028800 18828c2ecf20Sopenharmony_ci#define S_028800_STENCIL_ENABLE(x) (((x) & 0x1) << 0) 18838c2ecf20Sopenharmony_ci#define G_028800_STENCIL_ENABLE(x) (((x) >> 0) & 0x1) 18848c2ecf20Sopenharmony_ci#define C_028800_STENCIL_ENABLE 0xFFFFFFFE 18858c2ecf20Sopenharmony_ci#define S_028800_Z_ENABLE(x) (((x) & 0x1) << 1) 18868c2ecf20Sopenharmony_ci#define G_028800_Z_ENABLE(x) (((x) >> 1) & 0x1) 18878c2ecf20Sopenharmony_ci#define C_028800_Z_ENABLE 0xFFFFFFFD 18888c2ecf20Sopenharmony_ci#define S_028800_Z_WRITE_ENABLE(x) (((x) & 0x1) << 2) 18898c2ecf20Sopenharmony_ci#define G_028800_Z_WRITE_ENABLE(x) (((x) >> 2) & 0x1) 18908c2ecf20Sopenharmony_ci#define C_028800_Z_WRITE_ENABLE 0xFFFFFFFB 18918c2ecf20Sopenharmony_ci#define S_028800_ZFUNC(x) (((x) & 0x7) << 4) 18928c2ecf20Sopenharmony_ci#define G_028800_ZFUNC(x) (((x) >> 4) & 0x7) 18938c2ecf20Sopenharmony_ci#define C_028800_ZFUNC 0xFFFFFF8F 18948c2ecf20Sopenharmony_ci#define S_028800_BACKFACE_ENABLE(x) (((x) & 0x1) << 7) 18958c2ecf20Sopenharmony_ci#define G_028800_BACKFACE_ENABLE(x) (((x) >> 7) & 0x1) 18968c2ecf20Sopenharmony_ci#define C_028800_BACKFACE_ENABLE 0xFFFFFF7F 18978c2ecf20Sopenharmony_ci#define S_028800_STENCILFUNC(x) (((x) & 0x7) << 8) 18988c2ecf20Sopenharmony_ci#define G_028800_STENCILFUNC(x) (((x) >> 8) & 0x7) 18998c2ecf20Sopenharmony_ci#define C_028800_STENCILFUNC 0xFFFFF8FF 19008c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_NEVER 0x00000000 19018c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_LESS 0x00000001 19028c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_EQUAL 0x00000002 19038c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_LEQUAL 0x00000003 19048c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_GREATER 0x00000004 19058c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_NOTEQUAL 0x00000005 19068c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_GEQUAL 0x00000006 19078c2ecf20Sopenharmony_ci#define V_028800_STENCILFUNC_ALWAYS 0x00000007 19088c2ecf20Sopenharmony_ci#define S_028800_STENCILFAIL(x) (((x) & 0x7) << 11) 19098c2ecf20Sopenharmony_ci#define G_028800_STENCILFAIL(x) (((x) >> 11) & 0x7) 19108c2ecf20Sopenharmony_ci#define C_028800_STENCILFAIL 0xFFFFC7FF 19118c2ecf20Sopenharmony_ci#define V_028800_STENCIL_KEEP 0x00000000 19128c2ecf20Sopenharmony_ci#define V_028800_STENCIL_ZERO 0x00000001 19138c2ecf20Sopenharmony_ci#define V_028800_STENCIL_REPLACE 0x00000002 19148c2ecf20Sopenharmony_ci#define V_028800_STENCIL_INCR 0x00000003 19158c2ecf20Sopenharmony_ci#define V_028800_STENCIL_DECR 0x00000004 19168c2ecf20Sopenharmony_ci#define V_028800_STENCIL_INVERT 0x00000005 19178c2ecf20Sopenharmony_ci#define V_028800_STENCIL_INCR_WRAP 0x00000006 19188c2ecf20Sopenharmony_ci#define V_028800_STENCIL_DECR_WRAP 0x00000007 19198c2ecf20Sopenharmony_ci#define S_028800_STENCILZPASS(x) (((x) & 0x7) << 14) 19208c2ecf20Sopenharmony_ci#define G_028800_STENCILZPASS(x) (((x) >> 14) & 0x7) 19218c2ecf20Sopenharmony_ci#define C_028800_STENCILZPASS 0xFFFE3FFF 19228c2ecf20Sopenharmony_ci#define S_028800_STENCILZFAIL(x) (((x) & 0x7) << 17) 19238c2ecf20Sopenharmony_ci#define G_028800_STENCILZFAIL(x) (((x) >> 17) & 0x7) 19248c2ecf20Sopenharmony_ci#define C_028800_STENCILZFAIL 0xFFF1FFFF 19258c2ecf20Sopenharmony_ci#define S_028800_STENCILFUNC_BF(x) (((x) & 0x7) << 20) 19268c2ecf20Sopenharmony_ci#define G_028800_STENCILFUNC_BF(x) (((x) >> 20) & 0x7) 19278c2ecf20Sopenharmony_ci#define C_028800_STENCILFUNC_BF 0xFF8FFFFF 19288c2ecf20Sopenharmony_ci#define S_028800_STENCILFAIL_BF(x) (((x) & 0x7) << 23) 19298c2ecf20Sopenharmony_ci#define G_028800_STENCILFAIL_BF(x) (((x) >> 23) & 0x7) 19308c2ecf20Sopenharmony_ci#define C_028800_STENCILFAIL_BF 0xFC7FFFFF 19318c2ecf20Sopenharmony_ci#define S_028800_STENCILZPASS_BF(x) (((x) & 0x7) << 26) 19328c2ecf20Sopenharmony_ci#define G_028800_STENCILZPASS_BF(x) (((x) >> 26) & 0x7) 19338c2ecf20Sopenharmony_ci#define C_028800_STENCILZPASS_BF 0xE3FFFFFF 19348c2ecf20Sopenharmony_ci#define S_028800_STENCILZFAIL_BF(x) (((x) & 0x7) << 29) 19358c2ecf20Sopenharmony_ci#define G_028800_STENCILZFAIL_BF(x) (((x) >> 29) & 0x7) 19368c2ecf20Sopenharmony_ci#define C_028800_STENCILZFAIL_BF 0x1FFFFFFF 19378c2ecf20Sopenharmony_ci#define DB_DEPTH_VIEW 0x28008 19388c2ecf20Sopenharmony_ci#define R_028008_DB_DEPTH_VIEW 0x00028008 19398c2ecf20Sopenharmony_ci#define S_028008_SLICE_START(x) (((x) & 0x7FF) << 0) 19408c2ecf20Sopenharmony_ci#define G_028008_SLICE_START(x) (((x) >> 0) & 0x7FF) 19418c2ecf20Sopenharmony_ci#define C_028008_SLICE_START 0xFFFFF800 19428c2ecf20Sopenharmony_ci#define S_028008_SLICE_MAX(x) (((x) & 0x7FF) << 13) 19438c2ecf20Sopenharmony_ci#define G_028008_SLICE_MAX(x) (((x) >> 13) & 0x7FF) 19448c2ecf20Sopenharmony_ci#define C_028008_SLICE_MAX 0xFF001FFF 19458c2ecf20Sopenharmony_ci#define DB_HTILE_DATA_BASE 0x28014 19468c2ecf20Sopenharmony_ci#define DB_HTILE_SURFACE 0x28abc 19478c2ecf20Sopenharmony_ci#define S_028ABC_HTILE_WIDTH(x) (((x) & 0x1) << 0) 19488c2ecf20Sopenharmony_ci#define G_028ABC_HTILE_WIDTH(x) (((x) >> 0) & 0x1) 19498c2ecf20Sopenharmony_ci#define C_028ABC_HTILE_WIDTH 0xFFFFFFFE 19508c2ecf20Sopenharmony_ci#define S_028ABC_HTILE_HEIGHT(x) (((x) & 0x1) << 1) 19518c2ecf20Sopenharmony_ci#define G_028ABC_HTILE_HEIGHT(x) (((x) >> 1) & 0x1) 19528c2ecf20Sopenharmony_ci#define C_028ABC_HTILE_HEIGHT 0xFFFFFFFD 19538c2ecf20Sopenharmony_ci#define G_028ABC_LINEAR(x) (((x) >> 2) & 0x1) 19548c2ecf20Sopenharmony_ci#define DB_Z_INFO 0x28040 19558c2ecf20Sopenharmony_ci# define Z_ARRAY_MODE(x) ((x) << 4) 19568c2ecf20Sopenharmony_ci# define DB_TILE_SPLIT(x) (((x) & 0x7) << 8) 19578c2ecf20Sopenharmony_ci# define DB_NUM_BANKS(x) (((x) & 0x3) << 12) 19588c2ecf20Sopenharmony_ci# define DB_BANK_WIDTH(x) (((x) & 0x3) << 16) 19598c2ecf20Sopenharmony_ci# define DB_BANK_HEIGHT(x) (((x) & 0x3) << 20) 19608c2ecf20Sopenharmony_ci# define DB_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 24) 19618c2ecf20Sopenharmony_ci#define R_028040_DB_Z_INFO 0x028040 19628c2ecf20Sopenharmony_ci#define S_028040_FORMAT(x) (((x) & 0x3) << 0) 19638c2ecf20Sopenharmony_ci#define G_028040_FORMAT(x) (((x) >> 0) & 0x3) 19648c2ecf20Sopenharmony_ci#define C_028040_FORMAT 0xFFFFFFFC 19658c2ecf20Sopenharmony_ci#define V_028040_Z_INVALID 0x00000000 19668c2ecf20Sopenharmony_ci#define V_028040_Z_16 0x00000001 19678c2ecf20Sopenharmony_ci#define V_028040_Z_24 0x00000002 19688c2ecf20Sopenharmony_ci#define V_028040_Z_32_FLOAT 0x00000003 19698c2ecf20Sopenharmony_ci#define S_028040_ARRAY_MODE(x) (((x) & 0xF) << 4) 19708c2ecf20Sopenharmony_ci#define G_028040_ARRAY_MODE(x) (((x) >> 4) & 0xF) 19718c2ecf20Sopenharmony_ci#define C_028040_ARRAY_MODE 0xFFFFFF0F 19728c2ecf20Sopenharmony_ci#define S_028040_READ_SIZE(x) (((x) & 0x1) << 28) 19738c2ecf20Sopenharmony_ci#define G_028040_READ_SIZE(x) (((x) >> 28) & 0x1) 19748c2ecf20Sopenharmony_ci#define C_028040_READ_SIZE 0xEFFFFFFF 19758c2ecf20Sopenharmony_ci#define S_028040_TILE_SURFACE_ENABLE(x) (((x) & 0x1) << 29) 19768c2ecf20Sopenharmony_ci#define G_028040_TILE_SURFACE_ENABLE(x) (((x) >> 29) & 0x1) 19778c2ecf20Sopenharmony_ci#define C_028040_TILE_SURFACE_ENABLE 0xDFFFFFFF 19788c2ecf20Sopenharmony_ci#define S_028040_ZRANGE_PRECISION(x) (((x) & 0x1) << 31) 19798c2ecf20Sopenharmony_ci#define G_028040_ZRANGE_PRECISION(x) (((x) >> 31) & 0x1) 19808c2ecf20Sopenharmony_ci#define C_028040_ZRANGE_PRECISION 0x7FFFFFFF 19818c2ecf20Sopenharmony_ci#define S_028040_TILE_SPLIT(x) (((x) & 0x7) << 8) 19828c2ecf20Sopenharmony_ci#define G_028040_TILE_SPLIT(x) (((x) >> 8) & 0x7) 19838c2ecf20Sopenharmony_ci#define S_028040_NUM_BANKS(x) (((x) & 0x3) << 12) 19848c2ecf20Sopenharmony_ci#define G_028040_NUM_BANKS(x) (((x) >> 12) & 0x3) 19858c2ecf20Sopenharmony_ci#define S_028040_BANK_WIDTH(x) (((x) & 0x3) << 16) 19868c2ecf20Sopenharmony_ci#define G_028040_BANK_WIDTH(x) (((x) >> 16) & 0x3) 19878c2ecf20Sopenharmony_ci#define S_028040_BANK_HEIGHT(x) (((x) & 0x3) << 20) 19888c2ecf20Sopenharmony_ci#define G_028040_BANK_HEIGHT(x) (((x) >> 20) & 0x3) 19898c2ecf20Sopenharmony_ci#define S_028040_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 24) 19908c2ecf20Sopenharmony_ci#define G_028040_MACRO_TILE_ASPECT(x) (((x) >> 24) & 0x3) 19918c2ecf20Sopenharmony_ci#define DB_STENCIL_INFO 0x28044 19928c2ecf20Sopenharmony_ci#define R_028044_DB_STENCIL_INFO 0x028044 19938c2ecf20Sopenharmony_ci#define S_028044_FORMAT(x) (((x) & 0x1) << 0) 19948c2ecf20Sopenharmony_ci#define G_028044_FORMAT(x) (((x) >> 0) & 0x1) 19958c2ecf20Sopenharmony_ci#define C_028044_FORMAT 0xFFFFFFFE 19968c2ecf20Sopenharmony_ci#define V_028044_STENCIL_INVALID 0 19978c2ecf20Sopenharmony_ci#define V_028044_STENCIL_8 1 19988c2ecf20Sopenharmony_ci#define G_028044_TILE_SPLIT(x) (((x) >> 8) & 0x7) 19998c2ecf20Sopenharmony_ci#define DB_Z_READ_BASE 0x28048 20008c2ecf20Sopenharmony_ci#define DB_STENCIL_READ_BASE 0x2804c 20018c2ecf20Sopenharmony_ci#define DB_Z_WRITE_BASE 0x28050 20028c2ecf20Sopenharmony_ci#define DB_STENCIL_WRITE_BASE 0x28054 20038c2ecf20Sopenharmony_ci#define DB_DEPTH_SIZE 0x28058 20048c2ecf20Sopenharmony_ci#define R_028058_DB_DEPTH_SIZE 0x028058 20058c2ecf20Sopenharmony_ci#define S_028058_PITCH_TILE_MAX(x) (((x) & 0x7FF) << 0) 20068c2ecf20Sopenharmony_ci#define G_028058_PITCH_TILE_MAX(x) (((x) >> 0) & 0x7FF) 20078c2ecf20Sopenharmony_ci#define C_028058_PITCH_TILE_MAX 0xFFFFF800 20088c2ecf20Sopenharmony_ci#define S_028058_HEIGHT_TILE_MAX(x) (((x) & 0x7FF) << 11) 20098c2ecf20Sopenharmony_ci#define G_028058_HEIGHT_TILE_MAX(x) (((x) >> 11) & 0x7FF) 20108c2ecf20Sopenharmony_ci#define C_028058_HEIGHT_TILE_MAX 0xFFC007FF 20118c2ecf20Sopenharmony_ci#define R_02805C_DB_DEPTH_SLICE 0x02805C 20128c2ecf20Sopenharmony_ci#define S_02805C_SLICE_TILE_MAX(x) (((x) & 0x3FFFFF) << 0) 20138c2ecf20Sopenharmony_ci#define G_02805C_SLICE_TILE_MAX(x) (((x) >> 0) & 0x3FFFFF) 20148c2ecf20Sopenharmony_ci#define C_02805C_SLICE_TILE_MAX 0xFFC00000 20158c2ecf20Sopenharmony_ci 20168c2ecf20Sopenharmony_ci#define SQ_PGM_START_PS 0x28840 20178c2ecf20Sopenharmony_ci#define SQ_PGM_START_VS 0x2885c 20188c2ecf20Sopenharmony_ci#define SQ_PGM_START_GS 0x28874 20198c2ecf20Sopenharmony_ci#define SQ_PGM_START_ES 0x2888c 20208c2ecf20Sopenharmony_ci#define SQ_PGM_START_FS 0x288a4 20218c2ecf20Sopenharmony_ci#define SQ_PGM_START_HS 0x288b8 20228c2ecf20Sopenharmony_ci#define SQ_PGM_START_LS 0x288d0 20238c2ecf20Sopenharmony_ci 20248c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_BASE_0 0x28AD8 20258c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_BASE_1 0x28AE8 20268c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_BASE_2 0x28AF8 20278c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_BASE_3 0x28B08 20288c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_SIZE_0 0x28AD0 20298c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_SIZE_1 0x28AE0 20308c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_SIZE_2 0x28AF0 20318c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_SIZE_3 0x28B00 20328c2ecf20Sopenharmony_ci#define VGT_STRMOUT_CONFIG 0x28b94 20338c2ecf20Sopenharmony_ci#define VGT_STRMOUT_BUFFER_CONFIG 0x28b98 20348c2ecf20Sopenharmony_ci 20358c2ecf20Sopenharmony_ci#define CB_TARGET_MASK 0x28238 20368c2ecf20Sopenharmony_ci#define CB_SHADER_MASK 0x2823c 20378c2ecf20Sopenharmony_ci 20388c2ecf20Sopenharmony_ci#define GDS_ADDR_BASE 0x28720 20398c2ecf20Sopenharmony_ci 20408c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_0 0x2872C 20418c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_1 0x28730 20428c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_2 0x28734 20438c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_3 0x28738 20448c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_4 0x2873C 20458c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_5 0x28740 20468c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_6 0x28744 20478c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_7 0x28748 20488c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_8 0x2874c 20498c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_9 0x28750 20508c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_10 0x28754 20518c2ecf20Sopenharmony_ci#define GDS_APPEND_COUNT_11 0x28758 20528c2ecf20Sopenharmony_ci 20538c2ecf20Sopenharmony_ci#define CB_IMMED0_BASE 0x28b9c 20548c2ecf20Sopenharmony_ci#define CB_IMMED1_BASE 0x28ba0 20558c2ecf20Sopenharmony_ci#define CB_IMMED2_BASE 0x28ba4 20568c2ecf20Sopenharmony_ci#define CB_IMMED3_BASE 0x28ba8 20578c2ecf20Sopenharmony_ci#define CB_IMMED4_BASE 0x28bac 20588c2ecf20Sopenharmony_ci#define CB_IMMED5_BASE 0x28bb0 20598c2ecf20Sopenharmony_ci#define CB_IMMED6_BASE 0x28bb4 20608c2ecf20Sopenharmony_ci#define CB_IMMED7_BASE 0x28bb8 20618c2ecf20Sopenharmony_ci#define CB_IMMED8_BASE 0x28bbc 20628c2ecf20Sopenharmony_ci#define CB_IMMED9_BASE 0x28bc0 20638c2ecf20Sopenharmony_ci#define CB_IMMED10_BASE 0x28bc4 20648c2ecf20Sopenharmony_ci#define CB_IMMED11_BASE 0x28bc8 20658c2ecf20Sopenharmony_ci 20668c2ecf20Sopenharmony_ci/* all 12 CB blocks have these regs */ 20678c2ecf20Sopenharmony_ci#define CB_COLOR0_BASE 0x28c60 20688c2ecf20Sopenharmony_ci#define CB_COLOR0_PITCH 0x28c64 20698c2ecf20Sopenharmony_ci#define CB_COLOR0_SLICE 0x28c68 20708c2ecf20Sopenharmony_ci#define CB_COLOR0_VIEW 0x28c6c 20718c2ecf20Sopenharmony_ci#define R_028C6C_CB_COLOR0_VIEW 0x00028C6C 20728c2ecf20Sopenharmony_ci#define S_028C6C_SLICE_START(x) (((x) & 0x7FF) << 0) 20738c2ecf20Sopenharmony_ci#define G_028C6C_SLICE_START(x) (((x) >> 0) & 0x7FF) 20748c2ecf20Sopenharmony_ci#define C_028C6C_SLICE_START 0xFFFFF800 20758c2ecf20Sopenharmony_ci#define S_028C6C_SLICE_MAX(x) (((x) & 0x7FF) << 13) 20768c2ecf20Sopenharmony_ci#define G_028C6C_SLICE_MAX(x) (((x) >> 13) & 0x7FF) 20778c2ecf20Sopenharmony_ci#define C_028C6C_SLICE_MAX 0xFF001FFF 20788c2ecf20Sopenharmony_ci#define R_028C70_CB_COLOR0_INFO 0x028C70 20798c2ecf20Sopenharmony_ci#define S_028C70_ENDIAN(x) (((x) & 0x3) << 0) 20808c2ecf20Sopenharmony_ci#define G_028C70_ENDIAN(x) (((x) >> 0) & 0x3) 20818c2ecf20Sopenharmony_ci#define C_028C70_ENDIAN 0xFFFFFFFC 20828c2ecf20Sopenharmony_ci#define S_028C70_FORMAT(x) (((x) & 0x3F) << 2) 20838c2ecf20Sopenharmony_ci#define G_028C70_FORMAT(x) (((x) >> 2) & 0x3F) 20848c2ecf20Sopenharmony_ci#define C_028C70_FORMAT 0xFFFFFF03 20858c2ecf20Sopenharmony_ci#define V_028C70_COLOR_INVALID 0x00000000 20868c2ecf20Sopenharmony_ci#define V_028C70_COLOR_8 0x00000001 20878c2ecf20Sopenharmony_ci#define V_028C70_COLOR_4_4 0x00000002 20888c2ecf20Sopenharmony_ci#define V_028C70_COLOR_3_3_2 0x00000003 20898c2ecf20Sopenharmony_ci#define V_028C70_COLOR_16 0x00000005 20908c2ecf20Sopenharmony_ci#define V_028C70_COLOR_16_FLOAT 0x00000006 20918c2ecf20Sopenharmony_ci#define V_028C70_COLOR_8_8 0x00000007 20928c2ecf20Sopenharmony_ci#define V_028C70_COLOR_5_6_5 0x00000008 20938c2ecf20Sopenharmony_ci#define V_028C70_COLOR_6_5_5 0x00000009 20948c2ecf20Sopenharmony_ci#define V_028C70_COLOR_1_5_5_5 0x0000000A 20958c2ecf20Sopenharmony_ci#define V_028C70_COLOR_4_4_4_4 0x0000000B 20968c2ecf20Sopenharmony_ci#define V_028C70_COLOR_5_5_5_1 0x0000000C 20978c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32 0x0000000D 20988c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32_FLOAT 0x0000000E 20998c2ecf20Sopenharmony_ci#define V_028C70_COLOR_16_16 0x0000000F 21008c2ecf20Sopenharmony_ci#define V_028C70_COLOR_16_16_FLOAT 0x00000010 21018c2ecf20Sopenharmony_ci#define V_028C70_COLOR_8_24 0x00000011 21028c2ecf20Sopenharmony_ci#define V_028C70_COLOR_8_24_FLOAT 0x00000012 21038c2ecf20Sopenharmony_ci#define V_028C70_COLOR_24_8 0x00000013 21048c2ecf20Sopenharmony_ci#define V_028C70_COLOR_24_8_FLOAT 0x00000014 21058c2ecf20Sopenharmony_ci#define V_028C70_COLOR_10_11_11 0x00000015 21068c2ecf20Sopenharmony_ci#define V_028C70_COLOR_10_11_11_FLOAT 0x00000016 21078c2ecf20Sopenharmony_ci#define V_028C70_COLOR_11_11_10 0x00000017 21088c2ecf20Sopenharmony_ci#define V_028C70_COLOR_11_11_10_FLOAT 0x00000018 21098c2ecf20Sopenharmony_ci#define V_028C70_COLOR_2_10_10_10 0x00000019 21108c2ecf20Sopenharmony_ci#define V_028C70_COLOR_8_8_8_8 0x0000001A 21118c2ecf20Sopenharmony_ci#define V_028C70_COLOR_10_10_10_2 0x0000001B 21128c2ecf20Sopenharmony_ci#define V_028C70_COLOR_X24_8_32_FLOAT 0x0000001C 21138c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32_32 0x0000001D 21148c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32_32_FLOAT 0x0000001E 21158c2ecf20Sopenharmony_ci#define V_028C70_COLOR_16_16_16_16 0x0000001F 21168c2ecf20Sopenharmony_ci#define V_028C70_COLOR_16_16_16_16_FLOAT 0x00000020 21178c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32_32_32_32 0x00000022 21188c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32_32_32_32_FLOAT 0x00000023 21198c2ecf20Sopenharmony_ci#define V_028C70_COLOR_32_32_32_FLOAT 0x00000030 21208c2ecf20Sopenharmony_ci#define S_028C70_ARRAY_MODE(x) (((x) & 0xF) << 8) 21218c2ecf20Sopenharmony_ci#define G_028C70_ARRAY_MODE(x) (((x) >> 8) & 0xF) 21228c2ecf20Sopenharmony_ci#define C_028C70_ARRAY_MODE 0xFFFFF0FF 21238c2ecf20Sopenharmony_ci#define V_028C70_ARRAY_LINEAR_GENERAL 0x00000000 21248c2ecf20Sopenharmony_ci#define V_028C70_ARRAY_LINEAR_ALIGNED 0x00000001 21258c2ecf20Sopenharmony_ci#define V_028C70_ARRAY_1D_TILED_THIN1 0x00000002 21268c2ecf20Sopenharmony_ci#define V_028C70_ARRAY_2D_TILED_THIN1 0x00000004 21278c2ecf20Sopenharmony_ci#define S_028C70_NUMBER_TYPE(x) (((x) & 0x7) << 12) 21288c2ecf20Sopenharmony_ci#define G_028C70_NUMBER_TYPE(x) (((x) >> 12) & 0x7) 21298c2ecf20Sopenharmony_ci#define C_028C70_NUMBER_TYPE 0xFFFF8FFF 21308c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_UNORM 0x00000000 21318c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_SNORM 0x00000001 21328c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_USCALED 0x00000002 21338c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_SSCALED 0x00000003 21348c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_UINT 0x00000004 21358c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_SINT 0x00000005 21368c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_SRGB 0x00000006 21378c2ecf20Sopenharmony_ci#define V_028C70_NUMBER_FLOAT 0x00000007 21388c2ecf20Sopenharmony_ci#define S_028C70_COMP_SWAP(x) (((x) & 0x3) << 15) 21398c2ecf20Sopenharmony_ci#define G_028C70_COMP_SWAP(x) (((x) >> 15) & 0x3) 21408c2ecf20Sopenharmony_ci#define C_028C70_COMP_SWAP 0xFFFE7FFF 21418c2ecf20Sopenharmony_ci#define V_028C70_SWAP_STD 0x00000000 21428c2ecf20Sopenharmony_ci#define V_028C70_SWAP_ALT 0x00000001 21438c2ecf20Sopenharmony_ci#define V_028C70_SWAP_STD_REV 0x00000002 21448c2ecf20Sopenharmony_ci#define V_028C70_SWAP_ALT_REV 0x00000003 21458c2ecf20Sopenharmony_ci#define S_028C70_FAST_CLEAR(x) (((x) & 0x1) << 17) 21468c2ecf20Sopenharmony_ci#define G_028C70_FAST_CLEAR(x) (((x) >> 17) & 0x1) 21478c2ecf20Sopenharmony_ci#define C_028C70_FAST_CLEAR 0xFFFDFFFF 21488c2ecf20Sopenharmony_ci#define S_028C70_COMPRESSION(x) (((x) & 0x3) << 18) 21498c2ecf20Sopenharmony_ci#define G_028C70_COMPRESSION(x) (((x) >> 18) & 0x3) 21508c2ecf20Sopenharmony_ci#define C_028C70_COMPRESSION 0xFFF3FFFF 21518c2ecf20Sopenharmony_ci#define S_028C70_BLEND_CLAMP(x) (((x) & 0x1) << 19) 21528c2ecf20Sopenharmony_ci#define G_028C70_BLEND_CLAMP(x) (((x) >> 19) & 0x1) 21538c2ecf20Sopenharmony_ci#define C_028C70_BLEND_CLAMP 0xFFF7FFFF 21548c2ecf20Sopenharmony_ci#define S_028C70_BLEND_BYPASS(x) (((x) & 0x1) << 20) 21558c2ecf20Sopenharmony_ci#define G_028C70_BLEND_BYPASS(x) (((x) >> 20) & 0x1) 21568c2ecf20Sopenharmony_ci#define C_028C70_BLEND_BYPASS 0xFFEFFFFF 21578c2ecf20Sopenharmony_ci#define S_028C70_SIMPLE_FLOAT(x) (((x) & 0x1) << 21) 21588c2ecf20Sopenharmony_ci#define G_028C70_SIMPLE_FLOAT(x) (((x) >> 21) & 0x1) 21598c2ecf20Sopenharmony_ci#define C_028C70_SIMPLE_FLOAT 0xFFDFFFFF 21608c2ecf20Sopenharmony_ci#define S_028C70_ROUND_MODE(x) (((x) & 0x1) << 22) 21618c2ecf20Sopenharmony_ci#define G_028C70_ROUND_MODE(x) (((x) >> 22) & 0x1) 21628c2ecf20Sopenharmony_ci#define C_028C70_ROUND_MODE 0xFFBFFFFF 21638c2ecf20Sopenharmony_ci#define S_028C70_TILE_COMPACT(x) (((x) & 0x1) << 23) 21648c2ecf20Sopenharmony_ci#define G_028C70_TILE_COMPACT(x) (((x) >> 23) & 0x1) 21658c2ecf20Sopenharmony_ci#define C_028C70_TILE_COMPACT 0xFF7FFFFF 21668c2ecf20Sopenharmony_ci#define S_028C70_SOURCE_FORMAT(x) (((x) & 0x3) << 24) 21678c2ecf20Sopenharmony_ci#define G_028C70_SOURCE_FORMAT(x) (((x) >> 24) & 0x3) 21688c2ecf20Sopenharmony_ci#define C_028C70_SOURCE_FORMAT 0xFCFFFFFF 21698c2ecf20Sopenharmony_ci#define V_028C70_EXPORT_4C_32BPC 0x0 21708c2ecf20Sopenharmony_ci#define V_028C70_EXPORT_4C_16BPC 0x1 21718c2ecf20Sopenharmony_ci#define V_028C70_EXPORT_2C_32BPC 0x2 /* Do not use */ 21728c2ecf20Sopenharmony_ci#define S_028C70_RAT(x) (((x) & 0x1) << 26) 21738c2ecf20Sopenharmony_ci#define G_028C70_RAT(x) (((x) >> 26) & 0x1) 21748c2ecf20Sopenharmony_ci#define C_028C70_RAT 0xFBFFFFFF 21758c2ecf20Sopenharmony_ci#define S_028C70_RESOURCE_TYPE(x) (((x) & 0x7) << 27) 21768c2ecf20Sopenharmony_ci#define G_028C70_RESOURCE_TYPE(x) (((x) >> 27) & 0x7) 21778c2ecf20Sopenharmony_ci#define C_028C70_RESOURCE_TYPE 0xC7FFFFFF 21788c2ecf20Sopenharmony_ci 21798c2ecf20Sopenharmony_ci#define CB_COLOR0_INFO 0x28c70 21808c2ecf20Sopenharmony_ci# define CB_FORMAT(x) ((x) << 2) 21818c2ecf20Sopenharmony_ci# define CB_ARRAY_MODE(x) ((x) << 8) 21828c2ecf20Sopenharmony_ci# define ARRAY_LINEAR_GENERAL 0 21838c2ecf20Sopenharmony_ci# define ARRAY_LINEAR_ALIGNED 1 21848c2ecf20Sopenharmony_ci# define ARRAY_1D_TILED_THIN1 2 21858c2ecf20Sopenharmony_ci# define ARRAY_2D_TILED_THIN1 4 21868c2ecf20Sopenharmony_ci# define CB_SOURCE_FORMAT(x) ((x) << 24) 21878c2ecf20Sopenharmony_ci# define CB_SF_EXPORT_FULL 0 21888c2ecf20Sopenharmony_ci# define CB_SF_EXPORT_NORM 1 21898c2ecf20Sopenharmony_ci#define R_028C74_CB_COLOR0_ATTRIB 0x028C74 21908c2ecf20Sopenharmony_ci#define S_028C74_NON_DISP_TILING_ORDER(x) (((x) & 0x1) << 4) 21918c2ecf20Sopenharmony_ci#define G_028C74_NON_DISP_TILING_ORDER(x) (((x) >> 4) & 0x1) 21928c2ecf20Sopenharmony_ci#define C_028C74_NON_DISP_TILING_ORDER 0xFFFFFFEF 21938c2ecf20Sopenharmony_ci#define S_028C74_TILE_SPLIT(x) (((x) & 0xf) << 5) 21948c2ecf20Sopenharmony_ci#define G_028C74_TILE_SPLIT(x) (((x) >> 5) & 0xf) 21958c2ecf20Sopenharmony_ci#define S_028C74_NUM_BANKS(x) (((x) & 0x3) << 10) 21968c2ecf20Sopenharmony_ci#define G_028C74_NUM_BANKS(x) (((x) >> 10) & 0x3) 21978c2ecf20Sopenharmony_ci#define S_028C74_BANK_WIDTH(x) (((x) & 0x3) << 13) 21988c2ecf20Sopenharmony_ci#define G_028C74_BANK_WIDTH(x) (((x) >> 13) & 0x3) 21998c2ecf20Sopenharmony_ci#define S_028C74_BANK_HEIGHT(x) (((x) & 0x3) << 16) 22008c2ecf20Sopenharmony_ci#define G_028C74_BANK_HEIGHT(x) (((x) >> 16) & 0x3) 22018c2ecf20Sopenharmony_ci#define S_028C74_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 19) 22028c2ecf20Sopenharmony_ci#define G_028C74_MACRO_TILE_ASPECT(x) (((x) >> 19) & 0x3) 22038c2ecf20Sopenharmony_ci#define CB_COLOR0_ATTRIB 0x28c74 22048c2ecf20Sopenharmony_ci# define CB_TILE_SPLIT(x) (((x) & 0x7) << 5) 22058c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_64B 0 22068c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_128B 1 22078c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_256B 2 22088c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_512B 3 22098c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_1KB 4 22108c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_2KB 5 22118c2ecf20Sopenharmony_ci# define ADDR_SURF_TILE_SPLIT_4KB 6 22128c2ecf20Sopenharmony_ci# define CB_NUM_BANKS(x) (((x) & 0x3) << 10) 22138c2ecf20Sopenharmony_ci# define ADDR_SURF_2_BANK 0 22148c2ecf20Sopenharmony_ci# define ADDR_SURF_4_BANK 1 22158c2ecf20Sopenharmony_ci# define ADDR_SURF_8_BANK 2 22168c2ecf20Sopenharmony_ci# define ADDR_SURF_16_BANK 3 22178c2ecf20Sopenharmony_ci# define CB_BANK_WIDTH(x) (((x) & 0x3) << 13) 22188c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_WIDTH_1 0 22198c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_WIDTH_2 1 22208c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_WIDTH_4 2 22218c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_WIDTH_8 3 22228c2ecf20Sopenharmony_ci# define CB_BANK_HEIGHT(x) (((x) & 0x3) << 16) 22238c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_HEIGHT_1 0 22248c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_HEIGHT_2 1 22258c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_HEIGHT_4 2 22268c2ecf20Sopenharmony_ci# define ADDR_SURF_BANK_HEIGHT_8 3 22278c2ecf20Sopenharmony_ci# define CB_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 19) 22288c2ecf20Sopenharmony_ci#define CB_COLOR0_DIM 0x28c78 22298c2ecf20Sopenharmony_ci/* only CB0-7 blocks have these regs */ 22308c2ecf20Sopenharmony_ci#define CB_COLOR0_CMASK 0x28c7c 22318c2ecf20Sopenharmony_ci#define CB_COLOR0_CMASK_SLICE 0x28c80 22328c2ecf20Sopenharmony_ci#define CB_COLOR0_FMASK 0x28c84 22338c2ecf20Sopenharmony_ci#define CB_COLOR0_FMASK_SLICE 0x28c88 22348c2ecf20Sopenharmony_ci#define CB_COLOR0_CLEAR_WORD0 0x28c8c 22358c2ecf20Sopenharmony_ci#define CB_COLOR0_CLEAR_WORD1 0x28c90 22368c2ecf20Sopenharmony_ci#define CB_COLOR0_CLEAR_WORD2 0x28c94 22378c2ecf20Sopenharmony_ci#define CB_COLOR0_CLEAR_WORD3 0x28c98 22388c2ecf20Sopenharmony_ci 22398c2ecf20Sopenharmony_ci#define CB_COLOR1_BASE 0x28c9c 22408c2ecf20Sopenharmony_ci#define CB_COLOR2_BASE 0x28cd8 22418c2ecf20Sopenharmony_ci#define CB_COLOR3_BASE 0x28d14 22428c2ecf20Sopenharmony_ci#define CB_COLOR4_BASE 0x28d50 22438c2ecf20Sopenharmony_ci#define CB_COLOR5_BASE 0x28d8c 22448c2ecf20Sopenharmony_ci#define CB_COLOR6_BASE 0x28dc8 22458c2ecf20Sopenharmony_ci#define CB_COLOR7_BASE 0x28e04 22468c2ecf20Sopenharmony_ci#define CB_COLOR8_BASE 0x28e40 22478c2ecf20Sopenharmony_ci#define CB_COLOR9_BASE 0x28e5c 22488c2ecf20Sopenharmony_ci#define CB_COLOR10_BASE 0x28e78 22498c2ecf20Sopenharmony_ci#define CB_COLOR11_BASE 0x28e94 22508c2ecf20Sopenharmony_ci 22518c2ecf20Sopenharmony_ci#define CB_COLOR1_PITCH 0x28ca0 22528c2ecf20Sopenharmony_ci#define CB_COLOR2_PITCH 0x28cdc 22538c2ecf20Sopenharmony_ci#define CB_COLOR3_PITCH 0x28d18 22548c2ecf20Sopenharmony_ci#define CB_COLOR4_PITCH 0x28d54 22558c2ecf20Sopenharmony_ci#define CB_COLOR5_PITCH 0x28d90 22568c2ecf20Sopenharmony_ci#define CB_COLOR6_PITCH 0x28dcc 22578c2ecf20Sopenharmony_ci#define CB_COLOR7_PITCH 0x28e08 22588c2ecf20Sopenharmony_ci#define CB_COLOR8_PITCH 0x28e44 22598c2ecf20Sopenharmony_ci#define CB_COLOR9_PITCH 0x28e60 22608c2ecf20Sopenharmony_ci#define CB_COLOR10_PITCH 0x28e7c 22618c2ecf20Sopenharmony_ci#define CB_COLOR11_PITCH 0x28e98 22628c2ecf20Sopenharmony_ci 22638c2ecf20Sopenharmony_ci#define CB_COLOR1_SLICE 0x28ca4 22648c2ecf20Sopenharmony_ci#define CB_COLOR2_SLICE 0x28ce0 22658c2ecf20Sopenharmony_ci#define CB_COLOR3_SLICE 0x28d1c 22668c2ecf20Sopenharmony_ci#define CB_COLOR4_SLICE 0x28d58 22678c2ecf20Sopenharmony_ci#define CB_COLOR5_SLICE 0x28d94 22688c2ecf20Sopenharmony_ci#define CB_COLOR6_SLICE 0x28dd0 22698c2ecf20Sopenharmony_ci#define CB_COLOR7_SLICE 0x28e0c 22708c2ecf20Sopenharmony_ci#define CB_COLOR8_SLICE 0x28e48 22718c2ecf20Sopenharmony_ci#define CB_COLOR9_SLICE 0x28e64 22728c2ecf20Sopenharmony_ci#define CB_COLOR10_SLICE 0x28e80 22738c2ecf20Sopenharmony_ci#define CB_COLOR11_SLICE 0x28e9c 22748c2ecf20Sopenharmony_ci 22758c2ecf20Sopenharmony_ci#define CB_COLOR1_VIEW 0x28ca8 22768c2ecf20Sopenharmony_ci#define CB_COLOR2_VIEW 0x28ce4 22778c2ecf20Sopenharmony_ci#define CB_COLOR3_VIEW 0x28d20 22788c2ecf20Sopenharmony_ci#define CB_COLOR4_VIEW 0x28d5c 22798c2ecf20Sopenharmony_ci#define CB_COLOR5_VIEW 0x28d98 22808c2ecf20Sopenharmony_ci#define CB_COLOR6_VIEW 0x28dd4 22818c2ecf20Sopenharmony_ci#define CB_COLOR7_VIEW 0x28e10 22828c2ecf20Sopenharmony_ci#define CB_COLOR8_VIEW 0x28e4c 22838c2ecf20Sopenharmony_ci#define CB_COLOR9_VIEW 0x28e68 22848c2ecf20Sopenharmony_ci#define CB_COLOR10_VIEW 0x28e84 22858c2ecf20Sopenharmony_ci#define CB_COLOR11_VIEW 0x28ea0 22868c2ecf20Sopenharmony_ci 22878c2ecf20Sopenharmony_ci#define CB_COLOR1_INFO 0x28cac 22888c2ecf20Sopenharmony_ci#define CB_COLOR2_INFO 0x28ce8 22898c2ecf20Sopenharmony_ci#define CB_COLOR3_INFO 0x28d24 22908c2ecf20Sopenharmony_ci#define CB_COLOR4_INFO 0x28d60 22918c2ecf20Sopenharmony_ci#define CB_COLOR5_INFO 0x28d9c 22928c2ecf20Sopenharmony_ci#define CB_COLOR6_INFO 0x28dd8 22938c2ecf20Sopenharmony_ci#define CB_COLOR7_INFO 0x28e14 22948c2ecf20Sopenharmony_ci#define CB_COLOR8_INFO 0x28e50 22958c2ecf20Sopenharmony_ci#define CB_COLOR9_INFO 0x28e6c 22968c2ecf20Sopenharmony_ci#define CB_COLOR10_INFO 0x28e88 22978c2ecf20Sopenharmony_ci#define CB_COLOR11_INFO 0x28ea4 22988c2ecf20Sopenharmony_ci 22998c2ecf20Sopenharmony_ci#define CB_COLOR1_ATTRIB 0x28cb0 23008c2ecf20Sopenharmony_ci#define CB_COLOR2_ATTRIB 0x28cec 23018c2ecf20Sopenharmony_ci#define CB_COLOR3_ATTRIB 0x28d28 23028c2ecf20Sopenharmony_ci#define CB_COLOR4_ATTRIB 0x28d64 23038c2ecf20Sopenharmony_ci#define CB_COLOR5_ATTRIB 0x28da0 23048c2ecf20Sopenharmony_ci#define CB_COLOR6_ATTRIB 0x28ddc 23058c2ecf20Sopenharmony_ci#define CB_COLOR7_ATTRIB 0x28e18 23068c2ecf20Sopenharmony_ci#define CB_COLOR8_ATTRIB 0x28e54 23078c2ecf20Sopenharmony_ci#define CB_COLOR9_ATTRIB 0x28e70 23088c2ecf20Sopenharmony_ci#define CB_COLOR10_ATTRIB 0x28e8c 23098c2ecf20Sopenharmony_ci#define CB_COLOR11_ATTRIB 0x28ea8 23108c2ecf20Sopenharmony_ci 23118c2ecf20Sopenharmony_ci#define CB_COLOR1_DIM 0x28cb4 23128c2ecf20Sopenharmony_ci#define CB_COLOR2_DIM 0x28cf0 23138c2ecf20Sopenharmony_ci#define CB_COLOR3_DIM 0x28d2c 23148c2ecf20Sopenharmony_ci#define CB_COLOR4_DIM 0x28d68 23158c2ecf20Sopenharmony_ci#define CB_COLOR5_DIM 0x28da4 23168c2ecf20Sopenharmony_ci#define CB_COLOR6_DIM 0x28de0 23178c2ecf20Sopenharmony_ci#define CB_COLOR7_DIM 0x28e1c 23188c2ecf20Sopenharmony_ci#define CB_COLOR8_DIM 0x28e58 23198c2ecf20Sopenharmony_ci#define CB_COLOR9_DIM 0x28e74 23208c2ecf20Sopenharmony_ci#define CB_COLOR10_DIM 0x28e90 23218c2ecf20Sopenharmony_ci#define CB_COLOR11_DIM 0x28eac 23228c2ecf20Sopenharmony_ci 23238c2ecf20Sopenharmony_ci#define CB_COLOR1_CMASK 0x28cb8 23248c2ecf20Sopenharmony_ci#define CB_COLOR2_CMASK 0x28cf4 23258c2ecf20Sopenharmony_ci#define CB_COLOR3_CMASK 0x28d30 23268c2ecf20Sopenharmony_ci#define CB_COLOR4_CMASK 0x28d6c 23278c2ecf20Sopenharmony_ci#define CB_COLOR5_CMASK 0x28da8 23288c2ecf20Sopenharmony_ci#define CB_COLOR6_CMASK 0x28de4 23298c2ecf20Sopenharmony_ci#define CB_COLOR7_CMASK 0x28e20 23308c2ecf20Sopenharmony_ci 23318c2ecf20Sopenharmony_ci#define CB_COLOR1_CMASK_SLICE 0x28cbc 23328c2ecf20Sopenharmony_ci#define CB_COLOR2_CMASK_SLICE 0x28cf8 23338c2ecf20Sopenharmony_ci#define CB_COLOR3_CMASK_SLICE 0x28d34 23348c2ecf20Sopenharmony_ci#define CB_COLOR4_CMASK_SLICE 0x28d70 23358c2ecf20Sopenharmony_ci#define CB_COLOR5_CMASK_SLICE 0x28dac 23368c2ecf20Sopenharmony_ci#define CB_COLOR6_CMASK_SLICE 0x28de8 23378c2ecf20Sopenharmony_ci#define CB_COLOR7_CMASK_SLICE 0x28e24 23388c2ecf20Sopenharmony_ci 23398c2ecf20Sopenharmony_ci#define CB_COLOR1_FMASK 0x28cc0 23408c2ecf20Sopenharmony_ci#define CB_COLOR2_FMASK 0x28cfc 23418c2ecf20Sopenharmony_ci#define CB_COLOR3_FMASK 0x28d38 23428c2ecf20Sopenharmony_ci#define CB_COLOR4_FMASK 0x28d74 23438c2ecf20Sopenharmony_ci#define CB_COLOR5_FMASK 0x28db0 23448c2ecf20Sopenharmony_ci#define CB_COLOR6_FMASK 0x28dec 23458c2ecf20Sopenharmony_ci#define CB_COLOR7_FMASK 0x28e28 23468c2ecf20Sopenharmony_ci 23478c2ecf20Sopenharmony_ci#define CB_COLOR1_FMASK_SLICE 0x28cc4 23488c2ecf20Sopenharmony_ci#define CB_COLOR2_FMASK_SLICE 0x28d00 23498c2ecf20Sopenharmony_ci#define CB_COLOR3_FMASK_SLICE 0x28d3c 23508c2ecf20Sopenharmony_ci#define CB_COLOR4_FMASK_SLICE 0x28d78 23518c2ecf20Sopenharmony_ci#define CB_COLOR5_FMASK_SLICE 0x28db4 23528c2ecf20Sopenharmony_ci#define CB_COLOR6_FMASK_SLICE 0x28df0 23538c2ecf20Sopenharmony_ci#define CB_COLOR7_FMASK_SLICE 0x28e2c 23548c2ecf20Sopenharmony_ci 23558c2ecf20Sopenharmony_ci#define CB_COLOR1_CLEAR_WORD0 0x28cc8 23568c2ecf20Sopenharmony_ci#define CB_COLOR2_CLEAR_WORD0 0x28d04 23578c2ecf20Sopenharmony_ci#define CB_COLOR3_CLEAR_WORD0 0x28d40 23588c2ecf20Sopenharmony_ci#define CB_COLOR4_CLEAR_WORD0 0x28d7c 23598c2ecf20Sopenharmony_ci#define CB_COLOR5_CLEAR_WORD0 0x28db8 23608c2ecf20Sopenharmony_ci#define CB_COLOR6_CLEAR_WORD0 0x28df4 23618c2ecf20Sopenharmony_ci#define CB_COLOR7_CLEAR_WORD0 0x28e30 23628c2ecf20Sopenharmony_ci 23638c2ecf20Sopenharmony_ci#define CB_COLOR1_CLEAR_WORD1 0x28ccc 23648c2ecf20Sopenharmony_ci#define CB_COLOR2_CLEAR_WORD1 0x28d08 23658c2ecf20Sopenharmony_ci#define CB_COLOR3_CLEAR_WORD1 0x28d44 23668c2ecf20Sopenharmony_ci#define CB_COLOR4_CLEAR_WORD1 0x28d80 23678c2ecf20Sopenharmony_ci#define CB_COLOR5_CLEAR_WORD1 0x28dbc 23688c2ecf20Sopenharmony_ci#define CB_COLOR6_CLEAR_WORD1 0x28df8 23698c2ecf20Sopenharmony_ci#define CB_COLOR7_CLEAR_WORD1 0x28e34 23708c2ecf20Sopenharmony_ci 23718c2ecf20Sopenharmony_ci#define CB_COLOR1_CLEAR_WORD2 0x28cd0 23728c2ecf20Sopenharmony_ci#define CB_COLOR2_CLEAR_WORD2 0x28d0c 23738c2ecf20Sopenharmony_ci#define CB_COLOR3_CLEAR_WORD2 0x28d48 23748c2ecf20Sopenharmony_ci#define CB_COLOR4_CLEAR_WORD2 0x28d84 23758c2ecf20Sopenharmony_ci#define CB_COLOR5_CLEAR_WORD2 0x28dc0 23768c2ecf20Sopenharmony_ci#define CB_COLOR6_CLEAR_WORD2 0x28dfc 23778c2ecf20Sopenharmony_ci#define CB_COLOR7_CLEAR_WORD2 0x28e38 23788c2ecf20Sopenharmony_ci 23798c2ecf20Sopenharmony_ci#define CB_COLOR1_CLEAR_WORD3 0x28cd4 23808c2ecf20Sopenharmony_ci#define CB_COLOR2_CLEAR_WORD3 0x28d10 23818c2ecf20Sopenharmony_ci#define CB_COLOR3_CLEAR_WORD3 0x28d4c 23828c2ecf20Sopenharmony_ci#define CB_COLOR4_CLEAR_WORD3 0x28d88 23838c2ecf20Sopenharmony_ci#define CB_COLOR5_CLEAR_WORD3 0x28dc4 23848c2ecf20Sopenharmony_ci#define CB_COLOR6_CLEAR_WORD3 0x28e00 23858c2ecf20Sopenharmony_ci#define CB_COLOR7_CLEAR_WORD3 0x28e3c 23868c2ecf20Sopenharmony_ci 23878c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD0_0 0x30000 23888c2ecf20Sopenharmony_ci# define TEX_DIM(x) ((x) << 0) 23898c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_1D 0 23908c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_2D 1 23918c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_3D 2 23928c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_CUBEMAP 3 23938c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_1D_ARRAY 4 23948c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_2D_ARRAY 5 23958c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_2D_MSAA 6 23968c2ecf20Sopenharmony_ci# define SQ_TEX_DIM_2D_ARRAY_MSAA 7 23978c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD1_0 0x30004 23988c2ecf20Sopenharmony_ci# define TEX_ARRAY_MODE(x) ((x) << 28) 23998c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD2_0 0x30008 24008c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD3_0 0x3000C 24018c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD4_0 0x30010 24028c2ecf20Sopenharmony_ci# define TEX_DST_SEL_X(x) ((x) << 16) 24038c2ecf20Sopenharmony_ci# define TEX_DST_SEL_Y(x) ((x) << 19) 24048c2ecf20Sopenharmony_ci# define TEX_DST_SEL_Z(x) ((x) << 22) 24058c2ecf20Sopenharmony_ci# define TEX_DST_SEL_W(x) ((x) << 25) 24068c2ecf20Sopenharmony_ci# define SQ_SEL_X 0 24078c2ecf20Sopenharmony_ci# define SQ_SEL_Y 1 24088c2ecf20Sopenharmony_ci# define SQ_SEL_Z 2 24098c2ecf20Sopenharmony_ci# define SQ_SEL_W 3 24108c2ecf20Sopenharmony_ci# define SQ_SEL_0 4 24118c2ecf20Sopenharmony_ci# define SQ_SEL_1 5 24128c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD5_0 0x30014 24138c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD6_0 0x30018 24148c2ecf20Sopenharmony_ci# define TEX_TILE_SPLIT(x) (((x) & 0x7) << 29) 24158c2ecf20Sopenharmony_ci#define SQ_TEX_RESOURCE_WORD7_0 0x3001c 24168c2ecf20Sopenharmony_ci# define MACRO_TILE_ASPECT(x) (((x) & 0x3) << 6) 24178c2ecf20Sopenharmony_ci# define TEX_BANK_WIDTH(x) (((x) & 0x3) << 8) 24188c2ecf20Sopenharmony_ci# define TEX_BANK_HEIGHT(x) (((x) & 0x3) << 10) 24198c2ecf20Sopenharmony_ci# define TEX_NUM_BANKS(x) (((x) & 0x3) << 16) 24208c2ecf20Sopenharmony_ci#define R_030000_SQ_TEX_RESOURCE_WORD0_0 0x030000 24218c2ecf20Sopenharmony_ci#define S_030000_DIM(x) (((x) & 0x7) << 0) 24228c2ecf20Sopenharmony_ci#define G_030000_DIM(x) (((x) >> 0) & 0x7) 24238c2ecf20Sopenharmony_ci#define C_030000_DIM 0xFFFFFFF8 24248c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_1D 0x00000000 24258c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_2D 0x00000001 24268c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_3D 0x00000002 24278c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_CUBEMAP 0x00000003 24288c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_1D_ARRAY 0x00000004 24298c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_2D_ARRAY 0x00000005 24308c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_2D_MSAA 0x00000006 24318c2ecf20Sopenharmony_ci#define V_030000_SQ_TEX_DIM_2D_ARRAY_MSAA 0x00000007 24328c2ecf20Sopenharmony_ci#define S_030000_NON_DISP_TILING_ORDER(x) (((x) & 0x1) << 5) 24338c2ecf20Sopenharmony_ci#define G_030000_NON_DISP_TILING_ORDER(x) (((x) >> 5) & 0x1) 24348c2ecf20Sopenharmony_ci#define C_030000_NON_DISP_TILING_ORDER 0xFFFFFFDF 24358c2ecf20Sopenharmony_ci#define S_030000_PITCH(x) (((x) & 0xFFF) << 6) 24368c2ecf20Sopenharmony_ci#define G_030000_PITCH(x) (((x) >> 6) & 0xFFF) 24378c2ecf20Sopenharmony_ci#define C_030000_PITCH 0xFFFC003F 24388c2ecf20Sopenharmony_ci#define S_030000_TEX_WIDTH(x) (((x) & 0x3FFF) << 18) 24398c2ecf20Sopenharmony_ci#define G_030000_TEX_WIDTH(x) (((x) >> 18) & 0x3FFF) 24408c2ecf20Sopenharmony_ci#define C_030000_TEX_WIDTH 0x0003FFFF 24418c2ecf20Sopenharmony_ci#define R_030004_SQ_TEX_RESOURCE_WORD1_0 0x030004 24428c2ecf20Sopenharmony_ci#define S_030004_TEX_HEIGHT(x) (((x) & 0x3FFF) << 0) 24438c2ecf20Sopenharmony_ci#define G_030004_TEX_HEIGHT(x) (((x) >> 0) & 0x3FFF) 24448c2ecf20Sopenharmony_ci#define C_030004_TEX_HEIGHT 0xFFFFC000 24458c2ecf20Sopenharmony_ci#define S_030004_TEX_DEPTH(x) (((x) & 0x1FFF) << 14) 24468c2ecf20Sopenharmony_ci#define G_030004_TEX_DEPTH(x) (((x) >> 14) & 0x1FFF) 24478c2ecf20Sopenharmony_ci#define C_030004_TEX_DEPTH 0xF8003FFF 24488c2ecf20Sopenharmony_ci#define S_030004_ARRAY_MODE(x) (((x) & 0xF) << 28) 24498c2ecf20Sopenharmony_ci#define G_030004_ARRAY_MODE(x) (((x) >> 28) & 0xF) 24508c2ecf20Sopenharmony_ci#define C_030004_ARRAY_MODE 0x0FFFFFFF 24518c2ecf20Sopenharmony_ci#define R_030008_SQ_TEX_RESOURCE_WORD2_0 0x030008 24528c2ecf20Sopenharmony_ci#define S_030008_BASE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 24538c2ecf20Sopenharmony_ci#define G_030008_BASE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 24548c2ecf20Sopenharmony_ci#define C_030008_BASE_ADDRESS 0x00000000 24558c2ecf20Sopenharmony_ci#define R_03000C_SQ_TEX_RESOURCE_WORD3_0 0x03000C 24568c2ecf20Sopenharmony_ci#define S_03000C_MIP_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 24578c2ecf20Sopenharmony_ci#define G_03000C_MIP_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 24588c2ecf20Sopenharmony_ci#define C_03000C_MIP_ADDRESS 0x00000000 24598c2ecf20Sopenharmony_ci#define R_030010_SQ_TEX_RESOURCE_WORD4_0 0x030010 24608c2ecf20Sopenharmony_ci#define S_030010_FORMAT_COMP_X(x) (((x) & 0x3) << 0) 24618c2ecf20Sopenharmony_ci#define G_030010_FORMAT_COMP_X(x) (((x) >> 0) & 0x3) 24628c2ecf20Sopenharmony_ci#define C_030010_FORMAT_COMP_X 0xFFFFFFFC 24638c2ecf20Sopenharmony_ci#define V_030010_SQ_FORMAT_COMP_UNSIGNED 0x00000000 24648c2ecf20Sopenharmony_ci#define V_030010_SQ_FORMAT_COMP_SIGNED 0x00000001 24658c2ecf20Sopenharmony_ci#define V_030010_SQ_FORMAT_COMP_UNSIGNED_BIASED 0x00000002 24668c2ecf20Sopenharmony_ci#define S_030010_FORMAT_COMP_Y(x) (((x) & 0x3) << 2) 24678c2ecf20Sopenharmony_ci#define G_030010_FORMAT_COMP_Y(x) (((x) >> 2) & 0x3) 24688c2ecf20Sopenharmony_ci#define C_030010_FORMAT_COMP_Y 0xFFFFFFF3 24698c2ecf20Sopenharmony_ci#define S_030010_FORMAT_COMP_Z(x) (((x) & 0x3) << 4) 24708c2ecf20Sopenharmony_ci#define G_030010_FORMAT_COMP_Z(x) (((x) >> 4) & 0x3) 24718c2ecf20Sopenharmony_ci#define C_030010_FORMAT_COMP_Z 0xFFFFFFCF 24728c2ecf20Sopenharmony_ci#define S_030010_FORMAT_COMP_W(x) (((x) & 0x3) << 6) 24738c2ecf20Sopenharmony_ci#define G_030010_FORMAT_COMP_W(x) (((x) >> 6) & 0x3) 24748c2ecf20Sopenharmony_ci#define C_030010_FORMAT_COMP_W 0xFFFFFF3F 24758c2ecf20Sopenharmony_ci#define S_030010_NUM_FORMAT_ALL(x) (((x) & 0x3) << 8) 24768c2ecf20Sopenharmony_ci#define G_030010_NUM_FORMAT_ALL(x) (((x) >> 8) & 0x3) 24778c2ecf20Sopenharmony_ci#define C_030010_NUM_FORMAT_ALL 0xFFFFFCFF 24788c2ecf20Sopenharmony_ci#define V_030010_SQ_NUM_FORMAT_NORM 0x00000000 24798c2ecf20Sopenharmony_ci#define V_030010_SQ_NUM_FORMAT_INT 0x00000001 24808c2ecf20Sopenharmony_ci#define V_030010_SQ_NUM_FORMAT_SCALED 0x00000002 24818c2ecf20Sopenharmony_ci#define S_030010_SRF_MODE_ALL(x) (((x) & 0x1) << 10) 24828c2ecf20Sopenharmony_ci#define G_030010_SRF_MODE_ALL(x) (((x) >> 10) & 0x1) 24838c2ecf20Sopenharmony_ci#define C_030010_SRF_MODE_ALL 0xFFFFFBFF 24848c2ecf20Sopenharmony_ci#define V_030010_SRF_MODE_ZERO_CLAMP_MINUS_ONE 0x00000000 24858c2ecf20Sopenharmony_ci#define V_030010_SRF_MODE_NO_ZERO 0x00000001 24868c2ecf20Sopenharmony_ci#define S_030010_FORCE_DEGAMMA(x) (((x) & 0x1) << 11) 24878c2ecf20Sopenharmony_ci#define G_030010_FORCE_DEGAMMA(x) (((x) >> 11) & 0x1) 24888c2ecf20Sopenharmony_ci#define C_030010_FORCE_DEGAMMA 0xFFFFF7FF 24898c2ecf20Sopenharmony_ci#define S_030010_ENDIAN_SWAP(x) (((x) & 0x3) << 12) 24908c2ecf20Sopenharmony_ci#define G_030010_ENDIAN_SWAP(x) (((x) >> 12) & 0x3) 24918c2ecf20Sopenharmony_ci#define C_030010_ENDIAN_SWAP 0xFFFFCFFF 24928c2ecf20Sopenharmony_ci#define S_030010_DST_SEL_X(x) (((x) & 0x7) << 16) 24938c2ecf20Sopenharmony_ci#define G_030010_DST_SEL_X(x) (((x) >> 16) & 0x7) 24948c2ecf20Sopenharmony_ci#define C_030010_DST_SEL_X 0xFFF8FFFF 24958c2ecf20Sopenharmony_ci#define V_030010_SQ_SEL_X 0x00000000 24968c2ecf20Sopenharmony_ci#define V_030010_SQ_SEL_Y 0x00000001 24978c2ecf20Sopenharmony_ci#define V_030010_SQ_SEL_Z 0x00000002 24988c2ecf20Sopenharmony_ci#define V_030010_SQ_SEL_W 0x00000003 24998c2ecf20Sopenharmony_ci#define V_030010_SQ_SEL_0 0x00000004 25008c2ecf20Sopenharmony_ci#define V_030010_SQ_SEL_1 0x00000005 25018c2ecf20Sopenharmony_ci#define S_030010_DST_SEL_Y(x) (((x) & 0x7) << 19) 25028c2ecf20Sopenharmony_ci#define G_030010_DST_SEL_Y(x) (((x) >> 19) & 0x7) 25038c2ecf20Sopenharmony_ci#define C_030010_DST_SEL_Y 0xFFC7FFFF 25048c2ecf20Sopenharmony_ci#define S_030010_DST_SEL_Z(x) (((x) & 0x7) << 22) 25058c2ecf20Sopenharmony_ci#define G_030010_DST_SEL_Z(x) (((x) >> 22) & 0x7) 25068c2ecf20Sopenharmony_ci#define C_030010_DST_SEL_Z 0xFE3FFFFF 25078c2ecf20Sopenharmony_ci#define S_030010_DST_SEL_W(x) (((x) & 0x7) << 25) 25088c2ecf20Sopenharmony_ci#define G_030010_DST_SEL_W(x) (((x) >> 25) & 0x7) 25098c2ecf20Sopenharmony_ci#define C_030010_DST_SEL_W 0xF1FFFFFF 25108c2ecf20Sopenharmony_ci#define S_030010_BASE_LEVEL(x) (((x) & 0xF) << 28) 25118c2ecf20Sopenharmony_ci#define G_030010_BASE_LEVEL(x) (((x) >> 28) & 0xF) 25128c2ecf20Sopenharmony_ci#define C_030010_BASE_LEVEL 0x0FFFFFFF 25138c2ecf20Sopenharmony_ci#define R_030014_SQ_TEX_RESOURCE_WORD5_0 0x030014 25148c2ecf20Sopenharmony_ci#define S_030014_LAST_LEVEL(x) (((x) & 0xF) << 0) 25158c2ecf20Sopenharmony_ci#define G_030014_LAST_LEVEL(x) (((x) >> 0) & 0xF) 25168c2ecf20Sopenharmony_ci#define C_030014_LAST_LEVEL 0xFFFFFFF0 25178c2ecf20Sopenharmony_ci#define S_030014_BASE_ARRAY(x) (((x) & 0x1FFF) << 4) 25188c2ecf20Sopenharmony_ci#define G_030014_BASE_ARRAY(x) (((x) >> 4) & 0x1FFF) 25198c2ecf20Sopenharmony_ci#define C_030014_BASE_ARRAY 0xFFFE000F 25208c2ecf20Sopenharmony_ci#define S_030014_LAST_ARRAY(x) (((x) & 0x1FFF) << 17) 25218c2ecf20Sopenharmony_ci#define G_030014_LAST_ARRAY(x) (((x) >> 17) & 0x1FFF) 25228c2ecf20Sopenharmony_ci#define C_030014_LAST_ARRAY 0xC001FFFF 25238c2ecf20Sopenharmony_ci#define R_030018_SQ_TEX_RESOURCE_WORD6_0 0x030018 25248c2ecf20Sopenharmony_ci#define S_030018_MAX_ANISO(x) (((x) & 0x7) << 0) 25258c2ecf20Sopenharmony_ci#define G_030018_MAX_ANISO(x) (((x) >> 0) & 0x7) 25268c2ecf20Sopenharmony_ci#define C_030018_MAX_ANISO 0xFFFFFFF8 25278c2ecf20Sopenharmony_ci#define S_030018_PERF_MODULATION(x) (((x) & 0x7) << 3) 25288c2ecf20Sopenharmony_ci#define G_030018_PERF_MODULATION(x) (((x) >> 3) & 0x7) 25298c2ecf20Sopenharmony_ci#define C_030018_PERF_MODULATION 0xFFFFFFC7 25308c2ecf20Sopenharmony_ci#define S_030018_INTERLACED(x) (((x) & 0x1) << 6) 25318c2ecf20Sopenharmony_ci#define G_030018_INTERLACED(x) (((x) >> 6) & 0x1) 25328c2ecf20Sopenharmony_ci#define C_030018_INTERLACED 0xFFFFFFBF 25338c2ecf20Sopenharmony_ci#define S_030018_TILE_SPLIT(x) (((x) & 0x7) << 29) 25348c2ecf20Sopenharmony_ci#define G_030018_TILE_SPLIT(x) (((x) >> 29) & 0x7) 25358c2ecf20Sopenharmony_ci#define R_03001C_SQ_TEX_RESOURCE_WORD7_0 0x03001C 25368c2ecf20Sopenharmony_ci#define S_03001C_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 6) 25378c2ecf20Sopenharmony_ci#define G_03001C_MACRO_TILE_ASPECT(x) (((x) >> 6) & 0x3) 25388c2ecf20Sopenharmony_ci#define S_03001C_BANK_WIDTH(x) (((x) & 0x3) << 8) 25398c2ecf20Sopenharmony_ci#define G_03001C_BANK_WIDTH(x) (((x) >> 8) & 0x3) 25408c2ecf20Sopenharmony_ci#define S_03001C_BANK_HEIGHT(x) (((x) & 0x3) << 10) 25418c2ecf20Sopenharmony_ci#define G_03001C_BANK_HEIGHT(x) (((x) >> 10) & 0x3) 25428c2ecf20Sopenharmony_ci#define S_03001C_NUM_BANKS(x) (((x) & 0x3) << 16) 25438c2ecf20Sopenharmony_ci#define G_03001C_NUM_BANKS(x) (((x) >> 16) & 0x3) 25448c2ecf20Sopenharmony_ci#define S_03001C_TYPE(x) (((x) & 0x3) << 30) 25458c2ecf20Sopenharmony_ci#define G_03001C_TYPE(x) (((x) >> 30) & 0x3) 25468c2ecf20Sopenharmony_ci#define C_03001C_TYPE 0x3FFFFFFF 25478c2ecf20Sopenharmony_ci#define V_03001C_SQ_TEX_VTX_INVALID_TEXTURE 0x00000000 25488c2ecf20Sopenharmony_ci#define V_03001C_SQ_TEX_VTX_INVALID_BUFFER 0x00000001 25498c2ecf20Sopenharmony_ci#define V_03001C_SQ_TEX_VTX_VALID_TEXTURE 0x00000002 25508c2ecf20Sopenharmony_ci#define V_03001C_SQ_TEX_VTX_VALID_BUFFER 0x00000003 25518c2ecf20Sopenharmony_ci#define S_03001C_DATA_FORMAT(x) (((x) & 0x3F) << 0) 25528c2ecf20Sopenharmony_ci#define G_03001C_DATA_FORMAT(x) (((x) >> 0) & 0x3F) 25538c2ecf20Sopenharmony_ci#define C_03001C_DATA_FORMAT 0xFFFFFFC0 25548c2ecf20Sopenharmony_ci 25558c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD0_0 0x30000 25568c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD1_0 0x30004 25578c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD2_0 0x30008 25588c2ecf20Sopenharmony_ci# define SQ_VTXC_BASE_ADDR_HI(x) ((x) << 0) 25598c2ecf20Sopenharmony_ci# define SQ_VTXC_STRIDE(x) ((x) << 8) 25608c2ecf20Sopenharmony_ci# define SQ_VTXC_ENDIAN_SWAP(x) ((x) << 30) 25618c2ecf20Sopenharmony_ci# define SQ_ENDIAN_NONE 0 25628c2ecf20Sopenharmony_ci# define SQ_ENDIAN_8IN16 1 25638c2ecf20Sopenharmony_ci# define SQ_ENDIAN_8IN32 2 25648c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD3_0 0x3000C 25658c2ecf20Sopenharmony_ci# define SQ_VTCX_SEL_X(x) ((x) << 3) 25668c2ecf20Sopenharmony_ci# define SQ_VTCX_SEL_Y(x) ((x) << 6) 25678c2ecf20Sopenharmony_ci# define SQ_VTCX_SEL_Z(x) ((x) << 9) 25688c2ecf20Sopenharmony_ci# define SQ_VTCX_SEL_W(x) ((x) << 12) 25698c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD4_0 0x30010 25708c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD5_0 0x30014 25718c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD6_0 0x30018 25728c2ecf20Sopenharmony_ci#define SQ_VTX_CONSTANT_WORD7_0 0x3001c 25738c2ecf20Sopenharmony_ci 25748c2ecf20Sopenharmony_ci#define TD_PS_BORDER_COLOR_INDEX 0xA400 25758c2ecf20Sopenharmony_ci#define TD_PS_BORDER_COLOR_RED 0xA404 25768c2ecf20Sopenharmony_ci#define TD_PS_BORDER_COLOR_GREEN 0xA408 25778c2ecf20Sopenharmony_ci#define TD_PS_BORDER_COLOR_BLUE 0xA40C 25788c2ecf20Sopenharmony_ci#define TD_PS_BORDER_COLOR_ALPHA 0xA410 25798c2ecf20Sopenharmony_ci#define TD_VS_BORDER_COLOR_INDEX 0xA414 25808c2ecf20Sopenharmony_ci#define TD_VS_BORDER_COLOR_RED 0xA418 25818c2ecf20Sopenharmony_ci#define TD_VS_BORDER_COLOR_GREEN 0xA41C 25828c2ecf20Sopenharmony_ci#define TD_VS_BORDER_COLOR_BLUE 0xA420 25838c2ecf20Sopenharmony_ci#define TD_VS_BORDER_COLOR_ALPHA 0xA424 25848c2ecf20Sopenharmony_ci#define TD_GS_BORDER_COLOR_INDEX 0xA428 25858c2ecf20Sopenharmony_ci#define TD_GS_BORDER_COLOR_RED 0xA42C 25868c2ecf20Sopenharmony_ci#define TD_GS_BORDER_COLOR_GREEN 0xA430 25878c2ecf20Sopenharmony_ci#define TD_GS_BORDER_COLOR_BLUE 0xA434 25888c2ecf20Sopenharmony_ci#define TD_GS_BORDER_COLOR_ALPHA 0xA438 25898c2ecf20Sopenharmony_ci#define TD_HS_BORDER_COLOR_INDEX 0xA43C 25908c2ecf20Sopenharmony_ci#define TD_HS_BORDER_COLOR_RED 0xA440 25918c2ecf20Sopenharmony_ci#define TD_HS_BORDER_COLOR_GREEN 0xA444 25928c2ecf20Sopenharmony_ci#define TD_HS_BORDER_COLOR_BLUE 0xA448 25938c2ecf20Sopenharmony_ci#define TD_HS_BORDER_COLOR_ALPHA 0xA44C 25948c2ecf20Sopenharmony_ci#define TD_LS_BORDER_COLOR_INDEX 0xA450 25958c2ecf20Sopenharmony_ci#define TD_LS_BORDER_COLOR_RED 0xA454 25968c2ecf20Sopenharmony_ci#define TD_LS_BORDER_COLOR_GREEN 0xA458 25978c2ecf20Sopenharmony_ci#define TD_LS_BORDER_COLOR_BLUE 0xA45C 25988c2ecf20Sopenharmony_ci#define TD_LS_BORDER_COLOR_ALPHA 0xA460 25998c2ecf20Sopenharmony_ci#define TD_CS_BORDER_COLOR_INDEX 0xA464 26008c2ecf20Sopenharmony_ci#define TD_CS_BORDER_COLOR_RED 0xA468 26018c2ecf20Sopenharmony_ci#define TD_CS_BORDER_COLOR_GREEN 0xA46C 26028c2ecf20Sopenharmony_ci#define TD_CS_BORDER_COLOR_BLUE 0xA470 26038c2ecf20Sopenharmony_ci#define TD_CS_BORDER_COLOR_ALPHA 0xA474 26048c2ecf20Sopenharmony_ci 26058c2ecf20Sopenharmony_ci/* cayman 3D regs */ 26068c2ecf20Sopenharmony_ci#define CAYMAN_VGT_OFFCHIP_LDS_BASE 0x89B4 26078c2ecf20Sopenharmony_ci#define CAYMAN_SQ_EX_ALLOC_TABLE_SLOTS 0x8E48 26088c2ecf20Sopenharmony_ci#define CAYMAN_DB_EQAA 0x28804 26098c2ecf20Sopenharmony_ci#define CAYMAN_DB_DEPTH_INFO 0x2803C 26108c2ecf20Sopenharmony_ci#define CAYMAN_PA_SC_AA_CONFIG 0x28BE0 26118c2ecf20Sopenharmony_ci#define CAYMAN_MSAA_NUM_SAMPLES_SHIFT 0 26128c2ecf20Sopenharmony_ci#define CAYMAN_MSAA_NUM_SAMPLES_MASK 0x7 26138c2ecf20Sopenharmony_ci#define CAYMAN_SX_SCATTER_EXPORT_BASE 0x28358 26148c2ecf20Sopenharmony_ci/* cayman packet3 addition */ 26158c2ecf20Sopenharmony_ci#define CAYMAN_PACKET3_DEALLOC_STATE 0x14 26168c2ecf20Sopenharmony_ci 26178c2ecf20Sopenharmony_ci/* DMA regs common on r6xx/r7xx/evergreen/ni */ 26188c2ecf20Sopenharmony_ci#define DMA_RB_CNTL 0xd000 26198c2ecf20Sopenharmony_ci# define DMA_RB_ENABLE (1 << 0) 26208c2ecf20Sopenharmony_ci# define DMA_RB_SIZE(x) ((x) << 1) /* log2 */ 26218c2ecf20Sopenharmony_ci# define DMA_RB_SWAP_ENABLE (1 << 9) /* 8IN32 */ 26228c2ecf20Sopenharmony_ci# define DMA_RPTR_WRITEBACK_ENABLE (1 << 12) 26238c2ecf20Sopenharmony_ci# define DMA_RPTR_WRITEBACK_SWAP_ENABLE (1 << 13) /* 8IN32 */ 26248c2ecf20Sopenharmony_ci# define DMA_RPTR_WRITEBACK_TIMER(x) ((x) << 16) /* log2 */ 26258c2ecf20Sopenharmony_ci#define DMA_STATUS_REG 0xd034 26268c2ecf20Sopenharmony_ci# define DMA_IDLE (1 << 0) 26278c2ecf20Sopenharmony_ci 26288c2ecf20Sopenharmony_ci#endif 2629