162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright 2008 Advanced Micro Devices, Inc. 362306a36Sopenharmony_ci * Copyright 2008 Red Hat Inc. 462306a36Sopenharmony_ci * Copyright 2009 Jerome Glisse. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 762306a36Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 862306a36Sopenharmony_ci * to deal in the Software without restriction, including without limitation 962306a36Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1062306a36Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 1162306a36Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 1462306a36Sopenharmony_ci * all copies or substantial portions of the Software. 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1762306a36Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1862306a36Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1962306a36Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 2062306a36Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2162306a36Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2262306a36Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * Authors: Dave Airlie 2562306a36Sopenharmony_ci * Alex Deucher 2662306a36Sopenharmony_ci * Jerome Glisse 2762306a36Sopenharmony_ci */ 2862306a36Sopenharmony_ci#ifndef __RV515D_H__ 2962306a36Sopenharmony_ci#define __RV515D_H__ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci/* 3262306a36Sopenharmony_ci * RV515 registers 3362306a36Sopenharmony_ci */ 3462306a36Sopenharmony_ci#define PCIE_INDEX 0x0030 3562306a36Sopenharmony_ci#define PCIE_DATA 0x0034 3662306a36Sopenharmony_ci#define MC_IND_INDEX 0x0070 3762306a36Sopenharmony_ci#define MC_IND_WR_EN (1 << 24) 3862306a36Sopenharmony_ci#define MC_IND_DATA 0x0074 3962306a36Sopenharmony_ci#define RBBM_SOFT_RESET 0x00F0 4062306a36Sopenharmony_ci#define CONFIG_MEMSIZE 0x00F8 4162306a36Sopenharmony_ci#define HDP_FB_LOCATION 0x0134 4262306a36Sopenharmony_ci#define CP_CSQ_CNTL 0x0740 4362306a36Sopenharmony_ci#define CP_CSQ_MODE 0x0744 4462306a36Sopenharmony_ci#define CP_CSQ_ADDR 0x07F0 4562306a36Sopenharmony_ci#define CP_CSQ_DATA 0x07F4 4662306a36Sopenharmony_ci#define CP_CSQ_STAT 0x07F8 4762306a36Sopenharmony_ci#define CP_CSQ2_STAT 0x07FC 4862306a36Sopenharmony_ci#define RBBM_STATUS 0x0E40 4962306a36Sopenharmony_ci#define DST_PIPE_CONFIG 0x170C 5062306a36Sopenharmony_ci#define WAIT_UNTIL 0x1720 5162306a36Sopenharmony_ci#define WAIT_2D_IDLE (1 << 14) 5262306a36Sopenharmony_ci#define WAIT_3D_IDLE (1 << 15) 5362306a36Sopenharmony_ci#define WAIT_2D_IDLECLEAN (1 << 16) 5462306a36Sopenharmony_ci#define WAIT_3D_IDLECLEAN (1 << 17) 5562306a36Sopenharmony_ci#define ISYNC_CNTL 0x1724 5662306a36Sopenharmony_ci#define ISYNC_ANY2D_IDLE3D (1 << 0) 5762306a36Sopenharmony_ci#define ISYNC_ANY3D_IDLE2D (1 << 1) 5862306a36Sopenharmony_ci#define ISYNC_TRIG2D_IDLE3D (1 << 2) 5962306a36Sopenharmony_ci#define ISYNC_TRIG3D_IDLE2D (1 << 3) 6062306a36Sopenharmony_ci#define ISYNC_WAIT_IDLEGUI (1 << 4) 6162306a36Sopenharmony_ci#define ISYNC_CPSCRATCH_IDLEGUI (1 << 5) 6262306a36Sopenharmony_ci#define VAP_INDEX_OFFSET 0x208C 6362306a36Sopenharmony_ci#define VAP_PVS_STATE_FLUSH_REG 0x2284 6462306a36Sopenharmony_ci#define GB_ENABLE 0x4008 6562306a36Sopenharmony_ci#define GB_MSPOS0 0x4010 6662306a36Sopenharmony_ci#define MS_X0_SHIFT 0 6762306a36Sopenharmony_ci#define MS_Y0_SHIFT 4 6862306a36Sopenharmony_ci#define MS_X1_SHIFT 8 6962306a36Sopenharmony_ci#define MS_Y1_SHIFT 12 7062306a36Sopenharmony_ci#define MS_X2_SHIFT 16 7162306a36Sopenharmony_ci#define MS_Y2_SHIFT 20 7262306a36Sopenharmony_ci#define MSBD0_Y_SHIFT 24 7362306a36Sopenharmony_ci#define MSBD0_X_SHIFT 28 7462306a36Sopenharmony_ci#define GB_MSPOS1 0x4014 7562306a36Sopenharmony_ci#define MS_X3_SHIFT 0 7662306a36Sopenharmony_ci#define MS_Y3_SHIFT 4 7762306a36Sopenharmony_ci#define MS_X4_SHIFT 8 7862306a36Sopenharmony_ci#define MS_Y4_SHIFT 12 7962306a36Sopenharmony_ci#define MS_X5_SHIFT 16 8062306a36Sopenharmony_ci#define MS_Y5_SHIFT 20 8162306a36Sopenharmony_ci#define MSBD1_SHIFT 24 8262306a36Sopenharmony_ci#define GB_TILE_CONFIG 0x4018 8362306a36Sopenharmony_ci#define ENABLE_TILING (1 << 0) 8462306a36Sopenharmony_ci#define PIPE_COUNT_MASK 0x0000000E 8562306a36Sopenharmony_ci#define PIPE_COUNT_SHIFT 1 8662306a36Sopenharmony_ci#define TILE_SIZE_8 (0 << 4) 8762306a36Sopenharmony_ci#define TILE_SIZE_16 (1 << 4) 8862306a36Sopenharmony_ci#define TILE_SIZE_32 (2 << 4) 8962306a36Sopenharmony_ci#define SUBPIXEL_1_12 (0 << 16) 9062306a36Sopenharmony_ci#define SUBPIXEL_1_16 (1 << 16) 9162306a36Sopenharmony_ci#define GB_SELECT 0x401C 9262306a36Sopenharmony_ci#define GB_AA_CONFIG 0x4020 9362306a36Sopenharmony_ci#define GB_PIPE_SELECT 0x402C 9462306a36Sopenharmony_ci#define GA_ENHANCE 0x4274 9562306a36Sopenharmony_ci#define GA_DEADLOCK_CNTL (1 << 0) 9662306a36Sopenharmony_ci#define GA_FASTSYNC_CNTL (1 << 1) 9762306a36Sopenharmony_ci#define GA_POLY_MODE 0x4288 9862306a36Sopenharmony_ci#define FRONT_PTYPE_POINT (0 << 4) 9962306a36Sopenharmony_ci#define FRONT_PTYPE_LINE (1 << 4) 10062306a36Sopenharmony_ci#define FRONT_PTYPE_TRIANGE (2 << 4) 10162306a36Sopenharmony_ci#define BACK_PTYPE_POINT (0 << 7) 10262306a36Sopenharmony_ci#define BACK_PTYPE_LINE (1 << 7) 10362306a36Sopenharmony_ci#define BACK_PTYPE_TRIANGE (2 << 7) 10462306a36Sopenharmony_ci#define GA_ROUND_MODE 0x428C 10562306a36Sopenharmony_ci#define GEOMETRY_ROUND_TRUNC (0 << 0) 10662306a36Sopenharmony_ci#define GEOMETRY_ROUND_NEAREST (1 << 0) 10762306a36Sopenharmony_ci#define COLOR_ROUND_TRUNC (0 << 2) 10862306a36Sopenharmony_ci#define COLOR_ROUND_NEAREST (1 << 2) 10962306a36Sopenharmony_ci#define SU_REG_DEST 0x42C8 11062306a36Sopenharmony_ci#define RB3D_DSTCACHE_CTLSTAT 0x4E4C 11162306a36Sopenharmony_ci#define RB3D_DC_FLUSH (2 << 0) 11262306a36Sopenharmony_ci#define RB3D_DC_FREE (2 << 2) 11362306a36Sopenharmony_ci#define RB3D_DC_FINISH (1 << 4) 11462306a36Sopenharmony_ci#define ZB_ZCACHE_CTLSTAT 0x4F18 11562306a36Sopenharmony_ci#define ZC_FLUSH (1 << 0) 11662306a36Sopenharmony_ci#define ZC_FREE (1 << 1) 11762306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT 0x6520 11862306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_MASK 0x00000003 11962306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_SHIFT 0 12062306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_D1HALF_D2HALF 0 12162306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q 1 12262306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_D1_ONLY 2 12362306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q 3 12462306a36Sopenharmony_ci#define DC_LB_MEMORY_SPLIT_SHIFT_MODE (1 << 2) 12562306a36Sopenharmony_ci#define DC_LB_DISP1_END_ADR_SHIFT 4 12662306a36Sopenharmony_ci#define DC_LB_DISP1_END_ADR_MASK 0x00007FF0 12762306a36Sopenharmony_ci#define D1MODE_PRIORITY_A_CNT 0x6548 12862306a36Sopenharmony_ci#define MODE_PRIORITY_MARK_MASK 0x00007FFF 12962306a36Sopenharmony_ci#define MODE_PRIORITY_OFF (1 << 16) 13062306a36Sopenharmony_ci#define MODE_PRIORITY_ALWAYS_ON (1 << 20) 13162306a36Sopenharmony_ci#define MODE_PRIORITY_FORCE_MASK (1 << 24) 13262306a36Sopenharmony_ci#define D1MODE_PRIORITY_B_CNT 0x654C 13362306a36Sopenharmony_ci#define LB_MAX_REQ_OUTSTANDING 0x6D58 13462306a36Sopenharmony_ci#define LB_D1_MAX_REQ_OUTSTANDING_MASK 0x0000000F 13562306a36Sopenharmony_ci#define LB_D1_MAX_REQ_OUTSTANDING_SHIFT 0 13662306a36Sopenharmony_ci#define LB_D2_MAX_REQ_OUTSTANDING_MASK 0x000F0000 13762306a36Sopenharmony_ci#define LB_D2_MAX_REQ_OUTSTANDING_SHIFT 16 13862306a36Sopenharmony_ci#define D2MODE_PRIORITY_A_CNT 0x6D48 13962306a36Sopenharmony_ci#define D2MODE_PRIORITY_B_CNT 0x6D4C 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci/* ix[MC] registers */ 14262306a36Sopenharmony_ci#define MC_FB_LOCATION 0x01 14362306a36Sopenharmony_ci#define MC_FB_START_MASK 0x0000FFFF 14462306a36Sopenharmony_ci#define MC_FB_START_SHIFT 0 14562306a36Sopenharmony_ci#define MC_FB_TOP_MASK 0xFFFF0000 14662306a36Sopenharmony_ci#define MC_FB_TOP_SHIFT 16 14762306a36Sopenharmony_ci#define MC_AGP_LOCATION 0x02 14862306a36Sopenharmony_ci#define MC_AGP_START_MASK 0x0000FFFF 14962306a36Sopenharmony_ci#define MC_AGP_START_SHIFT 0 15062306a36Sopenharmony_ci#define MC_AGP_TOP_MASK 0xFFFF0000 15162306a36Sopenharmony_ci#define MC_AGP_TOP_SHIFT 16 15262306a36Sopenharmony_ci#define MC_AGP_BASE 0x03 15362306a36Sopenharmony_ci#define MC_AGP_BASE_2 0x04 15462306a36Sopenharmony_ci#define MC_CNTL 0x5 15562306a36Sopenharmony_ci#define MEM_NUM_CHANNELS_MASK 0x00000003 15662306a36Sopenharmony_ci#define MC_STATUS 0x08 15762306a36Sopenharmony_ci#define MC_STATUS_IDLE (1 << 4) 15862306a36Sopenharmony_ci#define MC_MISC_LAT_TIMER 0x09 15962306a36Sopenharmony_ci#define MC_CPR_INIT_LAT_MASK 0x0000000F 16062306a36Sopenharmony_ci#define MC_VF_INIT_LAT_MASK 0x000000F0 16162306a36Sopenharmony_ci#define MC_DISP0R_INIT_LAT_MASK 0x00000F00 16262306a36Sopenharmony_ci#define MC_DISP0R_INIT_LAT_SHIFT 8 16362306a36Sopenharmony_ci#define MC_DISP1R_INIT_LAT_MASK 0x0000F000 16462306a36Sopenharmony_ci#define MC_DISP1R_INIT_LAT_SHIFT 12 16562306a36Sopenharmony_ci#define MC_FIXED_INIT_LAT_MASK 0x000F0000 16662306a36Sopenharmony_ci#define MC_E2R_INIT_LAT_MASK 0x00F00000 16762306a36Sopenharmony_ci#define SAME_PAGE_PRIO_MASK 0x0F000000 16862306a36Sopenharmony_ci#define MC_GLOBW_INIT_LAT_MASK 0xF0000000 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci/* 17262306a36Sopenharmony_ci * PM4 packet 17362306a36Sopenharmony_ci */ 17462306a36Sopenharmony_ci#define CP_PACKET0 0x00000000 17562306a36Sopenharmony_ci#define PACKET0_BASE_INDEX_SHIFT 0 17662306a36Sopenharmony_ci#define PACKET0_BASE_INDEX_MASK (0x1ffff << 0) 17762306a36Sopenharmony_ci#define PACKET0_COUNT_SHIFT 16 17862306a36Sopenharmony_ci#define PACKET0_COUNT_MASK (0x3fff << 16) 17962306a36Sopenharmony_ci#define CP_PACKET1 0x40000000 18062306a36Sopenharmony_ci#define CP_PACKET2 0x80000000 18162306a36Sopenharmony_ci#define PACKET2_PAD_SHIFT 0 18262306a36Sopenharmony_ci#define PACKET2_PAD_MASK (0x3fffffff << 0) 18362306a36Sopenharmony_ci#define CP_PACKET3 0xC0000000 18462306a36Sopenharmony_ci#define PACKET3_IT_OPCODE_SHIFT 8 18562306a36Sopenharmony_ci#define PACKET3_IT_OPCODE_MASK (0xff << 8) 18662306a36Sopenharmony_ci#define PACKET3_COUNT_SHIFT 16 18762306a36Sopenharmony_ci#define PACKET3_COUNT_MASK (0x3fff << 16) 18862306a36Sopenharmony_ci/* PACKET3 op code */ 18962306a36Sopenharmony_ci#define PACKET3_NOP 0x10 19062306a36Sopenharmony_ci#define PACKET3_3D_DRAW_VBUF 0x28 19162306a36Sopenharmony_ci#define PACKET3_3D_DRAW_IMMD 0x29 19262306a36Sopenharmony_ci#define PACKET3_3D_DRAW_INDX 0x2A 19362306a36Sopenharmony_ci#define PACKET3_3D_LOAD_VBPNTR 0x2F 19462306a36Sopenharmony_ci#define PACKET3_INDX_BUFFER 0x33 19562306a36Sopenharmony_ci#define PACKET3_3D_DRAW_VBUF_2 0x34 19662306a36Sopenharmony_ci#define PACKET3_3D_DRAW_IMMD_2 0x35 19762306a36Sopenharmony_ci#define PACKET3_3D_DRAW_INDX_2 0x36 19862306a36Sopenharmony_ci#define PACKET3_BITBLT_MULTI 0x9B 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci#define PACKET0(reg, n) (CP_PACKET0 | \ 20162306a36Sopenharmony_ci REG_SET(PACKET0_BASE_INDEX, (reg) >> 2) | \ 20262306a36Sopenharmony_ci REG_SET(PACKET0_COUNT, (n))) 20362306a36Sopenharmony_ci#define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v))) 20462306a36Sopenharmony_ci#define PACKET3(op, n) (CP_PACKET3 | \ 20562306a36Sopenharmony_ci REG_SET(PACKET3_IT_OPCODE, (op)) | \ 20662306a36Sopenharmony_ci REG_SET(PACKET3_COUNT, (n))) 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci/* Registers */ 20962306a36Sopenharmony_ci#define R_0000F0_RBBM_SOFT_RESET 0x0000F0 21062306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_CP(x) (((x) & 0x1) << 0) 21162306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_CP(x) (((x) >> 0) & 0x1) 21262306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_CP 0xFFFFFFFE 21362306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_HI(x) (((x) & 0x1) << 1) 21462306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_HI(x) (((x) >> 1) & 0x1) 21562306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_HI 0xFFFFFFFD 21662306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_VAP(x) (((x) & 0x1) << 2) 21762306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_VAP(x) (((x) >> 2) & 0x1) 21862306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_VAP 0xFFFFFFFB 21962306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_RE(x) (((x) & 0x1) << 3) 22062306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_RE(x) (((x) >> 3) & 0x1) 22162306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_RE 0xFFFFFFF7 22262306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_PP(x) (((x) & 0x1) << 4) 22362306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_PP(x) (((x) >> 4) & 0x1) 22462306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_PP 0xFFFFFFEF 22562306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_E2(x) (((x) & 0x1) << 5) 22662306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_E2(x) (((x) >> 5) & 0x1) 22762306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_E2 0xFFFFFFDF 22862306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_RB(x) (((x) & 0x1) << 6) 22962306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_RB(x) (((x) >> 6) & 0x1) 23062306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_RB 0xFFFFFFBF 23162306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_HDP(x) (((x) & 0x1) << 7) 23262306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_HDP(x) (((x) >> 7) & 0x1) 23362306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_HDP 0xFFFFFF7F 23462306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_MC(x) (((x) & 0x1) << 8) 23562306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_MC(x) (((x) >> 8) & 0x1) 23662306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_MC 0xFFFFFEFF 23762306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_AIC(x) (((x) & 0x1) << 9) 23862306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_AIC(x) (((x) >> 9) & 0x1) 23962306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_AIC 0xFFFFFDFF 24062306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_VIP(x) (((x) & 0x1) << 10) 24162306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_VIP(x) (((x) >> 10) & 0x1) 24262306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_VIP 0xFFFFFBFF 24362306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_DISP(x) (((x) & 0x1) << 11) 24462306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_DISP(x) (((x) >> 11) & 0x1) 24562306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_DISP 0xFFFFF7FF 24662306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_CG(x) (((x) & 0x1) << 12) 24762306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_CG(x) (((x) >> 12) & 0x1) 24862306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_CG 0xFFFFEFFF 24962306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_GA(x) (((x) & 0x1) << 13) 25062306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_GA(x) (((x) >> 13) & 0x1) 25162306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_GA 0xFFFFDFFF 25262306a36Sopenharmony_ci#define S_0000F0_SOFT_RESET_IDCT(x) (((x) & 0x1) << 14) 25362306a36Sopenharmony_ci#define G_0000F0_SOFT_RESET_IDCT(x) (((x) >> 14) & 0x1) 25462306a36Sopenharmony_ci#define C_0000F0_SOFT_RESET_IDCT 0xFFFFBFFF 25562306a36Sopenharmony_ci#define R_0000F8_CONFIG_MEMSIZE 0x0000F8 25662306a36Sopenharmony_ci#define S_0000F8_CONFIG_MEMSIZE(x) (((x) & 0xFFFFFFFF) << 0) 25762306a36Sopenharmony_ci#define G_0000F8_CONFIG_MEMSIZE(x) (((x) >> 0) & 0xFFFFFFFF) 25862306a36Sopenharmony_ci#define C_0000F8_CONFIG_MEMSIZE 0x00000000 25962306a36Sopenharmony_ci#define R_000134_HDP_FB_LOCATION 0x000134 26062306a36Sopenharmony_ci#define S_000134_HDP_FB_START(x) (((x) & 0xFFFF) << 0) 26162306a36Sopenharmony_ci#define G_000134_HDP_FB_START(x) (((x) >> 0) & 0xFFFF) 26262306a36Sopenharmony_ci#define C_000134_HDP_FB_START 0xFFFF0000 26362306a36Sopenharmony_ci#define R_000300_VGA_RENDER_CONTROL 0x000300 26462306a36Sopenharmony_ci#define S_000300_VGA_BLINK_RATE(x) (((x) & 0x1F) << 0) 26562306a36Sopenharmony_ci#define G_000300_VGA_BLINK_RATE(x) (((x) >> 0) & 0x1F) 26662306a36Sopenharmony_ci#define C_000300_VGA_BLINK_RATE 0xFFFFFFE0 26762306a36Sopenharmony_ci#define S_000300_VGA_BLINK_MODE(x) (((x) & 0x3) << 5) 26862306a36Sopenharmony_ci#define G_000300_VGA_BLINK_MODE(x) (((x) >> 5) & 0x3) 26962306a36Sopenharmony_ci#define C_000300_VGA_BLINK_MODE 0xFFFFFF9F 27062306a36Sopenharmony_ci#define S_000300_VGA_CURSOR_BLINK_INVERT(x) (((x) & 0x1) << 7) 27162306a36Sopenharmony_ci#define G_000300_VGA_CURSOR_BLINK_INVERT(x) (((x) >> 7) & 0x1) 27262306a36Sopenharmony_ci#define C_000300_VGA_CURSOR_BLINK_INVERT 0xFFFFFF7F 27362306a36Sopenharmony_ci#define S_000300_VGA_EXTD_ADDR_COUNT_ENABLE(x) (((x) & 0x1) << 8) 27462306a36Sopenharmony_ci#define G_000300_VGA_EXTD_ADDR_COUNT_ENABLE(x) (((x) >> 8) & 0x1) 27562306a36Sopenharmony_ci#define C_000300_VGA_EXTD_ADDR_COUNT_ENABLE 0xFFFFFEFF 27662306a36Sopenharmony_ci#define S_000300_VGA_VSTATUS_CNTL(x) (((x) & 0x3) << 16) 27762306a36Sopenharmony_ci#define G_000300_VGA_VSTATUS_CNTL(x) (((x) >> 16) & 0x3) 27862306a36Sopenharmony_ci#define C_000300_VGA_VSTATUS_CNTL 0xFFFCFFFF 27962306a36Sopenharmony_ci#define S_000300_VGA_LOCK_8DOT(x) (((x) & 0x1) << 24) 28062306a36Sopenharmony_ci#define G_000300_VGA_LOCK_8DOT(x) (((x) >> 24) & 0x1) 28162306a36Sopenharmony_ci#define C_000300_VGA_LOCK_8DOT 0xFEFFFFFF 28262306a36Sopenharmony_ci#define S_000300_VGAREG_LINECMP_COMPATIBILITY_SEL(x) (((x) & 0x1) << 25) 28362306a36Sopenharmony_ci#define G_000300_VGAREG_LINECMP_COMPATIBILITY_SEL(x) (((x) >> 25) & 0x1) 28462306a36Sopenharmony_ci#define C_000300_VGAREG_LINECMP_COMPATIBILITY_SEL 0xFDFFFFFF 28562306a36Sopenharmony_ci#define R_000310_VGA_MEMORY_BASE_ADDRESS 0x000310 28662306a36Sopenharmony_ci#define S_000310_VGA_MEMORY_BASE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 28762306a36Sopenharmony_ci#define G_000310_VGA_MEMORY_BASE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 28862306a36Sopenharmony_ci#define C_000310_VGA_MEMORY_BASE_ADDRESS 0x00000000 28962306a36Sopenharmony_ci#define R_000328_VGA_HDP_CONTROL 0x000328 29062306a36Sopenharmony_ci#define S_000328_VGA_MEM_PAGE_SELECT_EN(x) (((x) & 0x1) << 0) 29162306a36Sopenharmony_ci#define G_000328_VGA_MEM_PAGE_SELECT_EN(x) (((x) >> 0) & 0x1) 29262306a36Sopenharmony_ci#define C_000328_VGA_MEM_PAGE_SELECT_EN 0xFFFFFFFE 29362306a36Sopenharmony_ci#define S_000328_VGA_RBBM_LOCK_DISABLE(x) (((x) & 0x1) << 8) 29462306a36Sopenharmony_ci#define G_000328_VGA_RBBM_LOCK_DISABLE(x) (((x) >> 8) & 0x1) 29562306a36Sopenharmony_ci#define C_000328_VGA_RBBM_LOCK_DISABLE 0xFFFFFEFF 29662306a36Sopenharmony_ci#define S_000328_VGA_SOFT_RESET(x) (((x) & 0x1) << 16) 29762306a36Sopenharmony_ci#define G_000328_VGA_SOFT_RESET(x) (((x) >> 16) & 0x1) 29862306a36Sopenharmony_ci#define C_000328_VGA_SOFT_RESET 0xFFFEFFFF 29962306a36Sopenharmony_ci#define S_000328_VGA_TEST_RESET_CONTROL(x) (((x) & 0x1) << 24) 30062306a36Sopenharmony_ci#define G_000328_VGA_TEST_RESET_CONTROL(x) (((x) >> 24) & 0x1) 30162306a36Sopenharmony_ci#define C_000328_VGA_TEST_RESET_CONTROL 0xFEFFFFFF 30262306a36Sopenharmony_ci#define R_000330_D1VGA_CONTROL 0x000330 30362306a36Sopenharmony_ci#define S_000330_D1VGA_MODE_ENABLE(x) (((x) & 0x1) << 0) 30462306a36Sopenharmony_ci#define G_000330_D1VGA_MODE_ENABLE(x) (((x) >> 0) & 0x1) 30562306a36Sopenharmony_ci#define C_000330_D1VGA_MODE_ENABLE 0xFFFFFFFE 30662306a36Sopenharmony_ci#define S_000330_D1VGA_TIMING_SELECT(x) (((x) & 0x1) << 8) 30762306a36Sopenharmony_ci#define G_000330_D1VGA_TIMING_SELECT(x) (((x) >> 8) & 0x1) 30862306a36Sopenharmony_ci#define C_000330_D1VGA_TIMING_SELECT 0xFFFFFEFF 30962306a36Sopenharmony_ci#define S_000330_D1VGA_SYNC_POLARITY_SELECT(x) (((x) & 0x1) << 9) 31062306a36Sopenharmony_ci#define G_000330_D1VGA_SYNC_POLARITY_SELECT(x) (((x) >> 9) & 0x1) 31162306a36Sopenharmony_ci#define C_000330_D1VGA_SYNC_POLARITY_SELECT 0xFFFFFDFF 31262306a36Sopenharmony_ci#define S_000330_D1VGA_OVERSCAN_TIMING_SELECT(x) (((x) & 0x1) << 10) 31362306a36Sopenharmony_ci#define G_000330_D1VGA_OVERSCAN_TIMING_SELECT(x) (((x) >> 10) & 0x1) 31462306a36Sopenharmony_ci#define C_000330_D1VGA_OVERSCAN_TIMING_SELECT 0xFFFFFBFF 31562306a36Sopenharmony_ci#define S_000330_D1VGA_OVERSCAN_COLOR_EN(x) (((x) & 0x1) << 16) 31662306a36Sopenharmony_ci#define G_000330_D1VGA_OVERSCAN_COLOR_EN(x) (((x) >> 16) & 0x1) 31762306a36Sopenharmony_ci#define C_000330_D1VGA_OVERSCAN_COLOR_EN 0xFFFEFFFF 31862306a36Sopenharmony_ci#define S_000330_D1VGA_ROTATE(x) (((x) & 0x3) << 24) 31962306a36Sopenharmony_ci#define G_000330_D1VGA_ROTATE(x) (((x) >> 24) & 0x3) 32062306a36Sopenharmony_ci#define C_000330_D1VGA_ROTATE 0xFCFFFFFF 32162306a36Sopenharmony_ci#define R_000338_D2VGA_CONTROL 0x000338 32262306a36Sopenharmony_ci#define S_000338_D2VGA_MODE_ENABLE(x) (((x) & 0x1) << 0) 32362306a36Sopenharmony_ci#define G_000338_D2VGA_MODE_ENABLE(x) (((x) >> 0) & 0x1) 32462306a36Sopenharmony_ci#define C_000338_D2VGA_MODE_ENABLE 0xFFFFFFFE 32562306a36Sopenharmony_ci#define S_000338_D2VGA_TIMING_SELECT(x) (((x) & 0x1) << 8) 32662306a36Sopenharmony_ci#define G_000338_D2VGA_TIMING_SELECT(x) (((x) >> 8) & 0x1) 32762306a36Sopenharmony_ci#define C_000338_D2VGA_TIMING_SELECT 0xFFFFFEFF 32862306a36Sopenharmony_ci#define S_000338_D2VGA_SYNC_POLARITY_SELECT(x) (((x) & 0x1) << 9) 32962306a36Sopenharmony_ci#define G_000338_D2VGA_SYNC_POLARITY_SELECT(x) (((x) >> 9) & 0x1) 33062306a36Sopenharmony_ci#define C_000338_D2VGA_SYNC_POLARITY_SELECT 0xFFFFFDFF 33162306a36Sopenharmony_ci#define S_000338_D2VGA_OVERSCAN_TIMING_SELECT(x) (((x) & 0x1) << 10) 33262306a36Sopenharmony_ci#define G_000338_D2VGA_OVERSCAN_TIMING_SELECT(x) (((x) >> 10) & 0x1) 33362306a36Sopenharmony_ci#define C_000338_D2VGA_OVERSCAN_TIMING_SELECT 0xFFFFFBFF 33462306a36Sopenharmony_ci#define S_000338_D2VGA_OVERSCAN_COLOR_EN(x) (((x) & 0x1) << 16) 33562306a36Sopenharmony_ci#define G_000338_D2VGA_OVERSCAN_COLOR_EN(x) (((x) >> 16) & 0x1) 33662306a36Sopenharmony_ci#define C_000338_D2VGA_OVERSCAN_COLOR_EN 0xFFFEFFFF 33762306a36Sopenharmony_ci#define S_000338_D2VGA_ROTATE(x) (((x) & 0x3) << 24) 33862306a36Sopenharmony_ci#define G_000338_D2VGA_ROTATE(x) (((x) >> 24) & 0x3) 33962306a36Sopenharmony_ci#define C_000338_D2VGA_ROTATE 0xFCFFFFFF 34062306a36Sopenharmony_ci#define R_0007C0_CP_STAT 0x0007C0 34162306a36Sopenharmony_ci#define S_0007C0_MRU_BUSY(x) (((x) & 0x1) << 0) 34262306a36Sopenharmony_ci#define G_0007C0_MRU_BUSY(x) (((x) >> 0) & 0x1) 34362306a36Sopenharmony_ci#define C_0007C0_MRU_BUSY 0xFFFFFFFE 34462306a36Sopenharmony_ci#define S_0007C0_MWU_BUSY(x) (((x) & 0x1) << 1) 34562306a36Sopenharmony_ci#define G_0007C0_MWU_BUSY(x) (((x) >> 1) & 0x1) 34662306a36Sopenharmony_ci#define C_0007C0_MWU_BUSY 0xFFFFFFFD 34762306a36Sopenharmony_ci#define S_0007C0_RSIU_BUSY(x) (((x) & 0x1) << 2) 34862306a36Sopenharmony_ci#define G_0007C0_RSIU_BUSY(x) (((x) >> 2) & 0x1) 34962306a36Sopenharmony_ci#define C_0007C0_RSIU_BUSY 0xFFFFFFFB 35062306a36Sopenharmony_ci#define S_0007C0_RCIU_BUSY(x) (((x) & 0x1) << 3) 35162306a36Sopenharmony_ci#define G_0007C0_RCIU_BUSY(x) (((x) >> 3) & 0x1) 35262306a36Sopenharmony_ci#define C_0007C0_RCIU_BUSY 0xFFFFFFF7 35362306a36Sopenharmony_ci#define S_0007C0_CSF_PRIMARY_BUSY(x) (((x) & 0x1) << 9) 35462306a36Sopenharmony_ci#define G_0007C0_CSF_PRIMARY_BUSY(x) (((x) >> 9) & 0x1) 35562306a36Sopenharmony_ci#define C_0007C0_CSF_PRIMARY_BUSY 0xFFFFFDFF 35662306a36Sopenharmony_ci#define S_0007C0_CSF_INDIRECT_BUSY(x) (((x) & 0x1) << 10) 35762306a36Sopenharmony_ci#define G_0007C0_CSF_INDIRECT_BUSY(x) (((x) >> 10) & 0x1) 35862306a36Sopenharmony_ci#define C_0007C0_CSF_INDIRECT_BUSY 0xFFFFFBFF 35962306a36Sopenharmony_ci#define S_0007C0_CSQ_PRIMARY_BUSY(x) (((x) & 0x1) << 11) 36062306a36Sopenharmony_ci#define G_0007C0_CSQ_PRIMARY_BUSY(x) (((x) >> 11) & 0x1) 36162306a36Sopenharmony_ci#define C_0007C0_CSQ_PRIMARY_BUSY 0xFFFFF7FF 36262306a36Sopenharmony_ci#define S_0007C0_CSQ_INDIRECT_BUSY(x) (((x) & 0x1) << 12) 36362306a36Sopenharmony_ci#define G_0007C0_CSQ_INDIRECT_BUSY(x) (((x) >> 12) & 0x1) 36462306a36Sopenharmony_ci#define C_0007C0_CSQ_INDIRECT_BUSY 0xFFFFEFFF 36562306a36Sopenharmony_ci#define S_0007C0_CSI_BUSY(x) (((x) & 0x1) << 13) 36662306a36Sopenharmony_ci#define G_0007C0_CSI_BUSY(x) (((x) >> 13) & 0x1) 36762306a36Sopenharmony_ci#define C_0007C0_CSI_BUSY 0xFFFFDFFF 36862306a36Sopenharmony_ci#define S_0007C0_CSF_INDIRECT2_BUSY(x) (((x) & 0x1) << 14) 36962306a36Sopenharmony_ci#define G_0007C0_CSF_INDIRECT2_BUSY(x) (((x) >> 14) & 0x1) 37062306a36Sopenharmony_ci#define C_0007C0_CSF_INDIRECT2_BUSY 0xFFFFBFFF 37162306a36Sopenharmony_ci#define S_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) & 0x1) << 15) 37262306a36Sopenharmony_ci#define G_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) >> 15) & 0x1) 37362306a36Sopenharmony_ci#define C_0007C0_CSQ_INDIRECT2_BUSY 0xFFFF7FFF 37462306a36Sopenharmony_ci#define S_0007C0_GUIDMA_BUSY(x) (((x) & 0x1) << 28) 37562306a36Sopenharmony_ci#define G_0007C0_GUIDMA_BUSY(x) (((x) >> 28) & 0x1) 37662306a36Sopenharmony_ci#define C_0007C0_GUIDMA_BUSY 0xEFFFFFFF 37762306a36Sopenharmony_ci#define S_0007C0_VIDDMA_BUSY(x) (((x) & 0x1) << 29) 37862306a36Sopenharmony_ci#define G_0007C0_VIDDMA_BUSY(x) (((x) >> 29) & 0x1) 37962306a36Sopenharmony_ci#define C_0007C0_VIDDMA_BUSY 0xDFFFFFFF 38062306a36Sopenharmony_ci#define S_0007C0_CMDSTRM_BUSY(x) (((x) & 0x1) << 30) 38162306a36Sopenharmony_ci#define G_0007C0_CMDSTRM_BUSY(x) (((x) >> 30) & 0x1) 38262306a36Sopenharmony_ci#define C_0007C0_CMDSTRM_BUSY 0xBFFFFFFF 38362306a36Sopenharmony_ci#define S_0007C0_CP_BUSY(x) (((x) & 0x1) << 31) 38462306a36Sopenharmony_ci#define G_0007C0_CP_BUSY(x) (((x) >> 31) & 0x1) 38562306a36Sopenharmony_ci#define C_0007C0_CP_BUSY 0x7FFFFFFF 38662306a36Sopenharmony_ci#define R_000E40_RBBM_STATUS 0x000E40 38762306a36Sopenharmony_ci#define S_000E40_CMDFIFO_AVAIL(x) (((x) & 0x7F) << 0) 38862306a36Sopenharmony_ci#define G_000E40_CMDFIFO_AVAIL(x) (((x) >> 0) & 0x7F) 38962306a36Sopenharmony_ci#define C_000E40_CMDFIFO_AVAIL 0xFFFFFF80 39062306a36Sopenharmony_ci#define S_000E40_HIRQ_ON_RBB(x) (((x) & 0x1) << 8) 39162306a36Sopenharmony_ci#define G_000E40_HIRQ_ON_RBB(x) (((x) >> 8) & 0x1) 39262306a36Sopenharmony_ci#define C_000E40_HIRQ_ON_RBB 0xFFFFFEFF 39362306a36Sopenharmony_ci#define S_000E40_CPRQ_ON_RBB(x) (((x) & 0x1) << 9) 39462306a36Sopenharmony_ci#define G_000E40_CPRQ_ON_RBB(x) (((x) >> 9) & 0x1) 39562306a36Sopenharmony_ci#define C_000E40_CPRQ_ON_RBB 0xFFFFFDFF 39662306a36Sopenharmony_ci#define S_000E40_CFRQ_ON_RBB(x) (((x) & 0x1) << 10) 39762306a36Sopenharmony_ci#define G_000E40_CFRQ_ON_RBB(x) (((x) >> 10) & 0x1) 39862306a36Sopenharmony_ci#define C_000E40_CFRQ_ON_RBB 0xFFFFFBFF 39962306a36Sopenharmony_ci#define S_000E40_HIRQ_IN_RTBUF(x) (((x) & 0x1) << 11) 40062306a36Sopenharmony_ci#define G_000E40_HIRQ_IN_RTBUF(x) (((x) >> 11) & 0x1) 40162306a36Sopenharmony_ci#define C_000E40_HIRQ_IN_RTBUF 0xFFFFF7FF 40262306a36Sopenharmony_ci#define S_000E40_CPRQ_IN_RTBUF(x) (((x) & 0x1) << 12) 40362306a36Sopenharmony_ci#define G_000E40_CPRQ_IN_RTBUF(x) (((x) >> 12) & 0x1) 40462306a36Sopenharmony_ci#define C_000E40_CPRQ_IN_RTBUF 0xFFFFEFFF 40562306a36Sopenharmony_ci#define S_000E40_CFRQ_IN_RTBUF(x) (((x) & 0x1) << 13) 40662306a36Sopenharmony_ci#define G_000E40_CFRQ_IN_RTBUF(x) (((x) >> 13) & 0x1) 40762306a36Sopenharmony_ci#define C_000E40_CFRQ_IN_RTBUF 0xFFFFDFFF 40862306a36Sopenharmony_ci#define S_000E40_CF_PIPE_BUSY(x) (((x) & 0x1) << 14) 40962306a36Sopenharmony_ci#define G_000E40_CF_PIPE_BUSY(x) (((x) >> 14) & 0x1) 41062306a36Sopenharmony_ci#define C_000E40_CF_PIPE_BUSY 0xFFFFBFFF 41162306a36Sopenharmony_ci#define S_000E40_ENG_EV_BUSY(x) (((x) & 0x1) << 15) 41262306a36Sopenharmony_ci#define G_000E40_ENG_EV_BUSY(x) (((x) >> 15) & 0x1) 41362306a36Sopenharmony_ci#define C_000E40_ENG_EV_BUSY 0xFFFF7FFF 41462306a36Sopenharmony_ci#define S_000E40_CP_CMDSTRM_BUSY(x) (((x) & 0x1) << 16) 41562306a36Sopenharmony_ci#define G_000E40_CP_CMDSTRM_BUSY(x) (((x) >> 16) & 0x1) 41662306a36Sopenharmony_ci#define C_000E40_CP_CMDSTRM_BUSY 0xFFFEFFFF 41762306a36Sopenharmony_ci#define S_000E40_E2_BUSY(x) (((x) & 0x1) << 17) 41862306a36Sopenharmony_ci#define G_000E40_E2_BUSY(x) (((x) >> 17) & 0x1) 41962306a36Sopenharmony_ci#define C_000E40_E2_BUSY 0xFFFDFFFF 42062306a36Sopenharmony_ci#define S_000E40_RB2D_BUSY(x) (((x) & 0x1) << 18) 42162306a36Sopenharmony_ci#define G_000E40_RB2D_BUSY(x) (((x) >> 18) & 0x1) 42262306a36Sopenharmony_ci#define C_000E40_RB2D_BUSY 0xFFFBFFFF 42362306a36Sopenharmony_ci#define S_000E40_RB3D_BUSY(x) (((x) & 0x1) << 19) 42462306a36Sopenharmony_ci#define G_000E40_RB3D_BUSY(x) (((x) >> 19) & 0x1) 42562306a36Sopenharmony_ci#define C_000E40_RB3D_BUSY 0xFFF7FFFF 42662306a36Sopenharmony_ci#define S_000E40_VAP_BUSY(x) (((x) & 0x1) << 20) 42762306a36Sopenharmony_ci#define G_000E40_VAP_BUSY(x) (((x) >> 20) & 0x1) 42862306a36Sopenharmony_ci#define C_000E40_VAP_BUSY 0xFFEFFFFF 42962306a36Sopenharmony_ci#define S_000E40_RE_BUSY(x) (((x) & 0x1) << 21) 43062306a36Sopenharmony_ci#define G_000E40_RE_BUSY(x) (((x) >> 21) & 0x1) 43162306a36Sopenharmony_ci#define C_000E40_RE_BUSY 0xFFDFFFFF 43262306a36Sopenharmony_ci#define S_000E40_TAM_BUSY(x) (((x) & 0x1) << 22) 43362306a36Sopenharmony_ci#define G_000E40_TAM_BUSY(x) (((x) >> 22) & 0x1) 43462306a36Sopenharmony_ci#define C_000E40_TAM_BUSY 0xFFBFFFFF 43562306a36Sopenharmony_ci#define S_000E40_TDM_BUSY(x) (((x) & 0x1) << 23) 43662306a36Sopenharmony_ci#define G_000E40_TDM_BUSY(x) (((x) >> 23) & 0x1) 43762306a36Sopenharmony_ci#define C_000E40_TDM_BUSY 0xFF7FFFFF 43862306a36Sopenharmony_ci#define S_000E40_PB_BUSY(x) (((x) & 0x1) << 24) 43962306a36Sopenharmony_ci#define G_000E40_PB_BUSY(x) (((x) >> 24) & 0x1) 44062306a36Sopenharmony_ci#define C_000E40_PB_BUSY 0xFEFFFFFF 44162306a36Sopenharmony_ci#define S_000E40_TIM_BUSY(x) (((x) & 0x1) << 25) 44262306a36Sopenharmony_ci#define G_000E40_TIM_BUSY(x) (((x) >> 25) & 0x1) 44362306a36Sopenharmony_ci#define C_000E40_TIM_BUSY 0xFDFFFFFF 44462306a36Sopenharmony_ci#define S_000E40_GA_BUSY(x) (((x) & 0x1) << 26) 44562306a36Sopenharmony_ci#define G_000E40_GA_BUSY(x) (((x) >> 26) & 0x1) 44662306a36Sopenharmony_ci#define C_000E40_GA_BUSY 0xFBFFFFFF 44762306a36Sopenharmony_ci#define S_000E40_CBA2D_BUSY(x) (((x) & 0x1) << 27) 44862306a36Sopenharmony_ci#define G_000E40_CBA2D_BUSY(x) (((x) >> 27) & 0x1) 44962306a36Sopenharmony_ci#define C_000E40_CBA2D_BUSY 0xF7FFFFFF 45062306a36Sopenharmony_ci#define S_000E40_RBBM_HIBUSY(x) (((x) & 0x1) << 28) 45162306a36Sopenharmony_ci#define G_000E40_RBBM_HIBUSY(x) (((x) >> 28) & 0x1) 45262306a36Sopenharmony_ci#define C_000E40_RBBM_HIBUSY 0xEFFFFFFF 45362306a36Sopenharmony_ci#define S_000E40_SKID_CFBUSY(x) (((x) & 0x1) << 29) 45462306a36Sopenharmony_ci#define G_000E40_SKID_CFBUSY(x) (((x) >> 29) & 0x1) 45562306a36Sopenharmony_ci#define C_000E40_SKID_CFBUSY 0xDFFFFFFF 45662306a36Sopenharmony_ci#define S_000E40_VAP_VF_BUSY(x) (((x) & 0x1) << 30) 45762306a36Sopenharmony_ci#define G_000E40_VAP_VF_BUSY(x) (((x) >> 30) & 0x1) 45862306a36Sopenharmony_ci#define C_000E40_VAP_VF_BUSY 0xBFFFFFFF 45962306a36Sopenharmony_ci#define S_000E40_GUI_ACTIVE(x) (((x) & 0x1) << 31) 46062306a36Sopenharmony_ci#define G_000E40_GUI_ACTIVE(x) (((x) >> 31) & 0x1) 46162306a36Sopenharmony_ci#define C_000E40_GUI_ACTIVE 0x7FFFFFFF 46262306a36Sopenharmony_ci#define R_006080_D1CRTC_CONTROL 0x006080 46362306a36Sopenharmony_ci#define S_006080_D1CRTC_MASTER_EN(x) (((x) & 0x1) << 0) 46462306a36Sopenharmony_ci#define G_006080_D1CRTC_MASTER_EN(x) (((x) >> 0) & 0x1) 46562306a36Sopenharmony_ci#define C_006080_D1CRTC_MASTER_EN 0xFFFFFFFE 46662306a36Sopenharmony_ci#define S_006080_D1CRTC_SYNC_RESET_SEL(x) (((x) & 0x1) << 4) 46762306a36Sopenharmony_ci#define G_006080_D1CRTC_SYNC_RESET_SEL(x) (((x) >> 4) & 0x1) 46862306a36Sopenharmony_ci#define C_006080_D1CRTC_SYNC_RESET_SEL 0xFFFFFFEF 46962306a36Sopenharmony_ci#define S_006080_D1CRTC_DISABLE_POINT_CNTL(x) (((x) & 0x3) << 8) 47062306a36Sopenharmony_ci#define G_006080_D1CRTC_DISABLE_POINT_CNTL(x) (((x) >> 8) & 0x3) 47162306a36Sopenharmony_ci#define C_006080_D1CRTC_DISABLE_POINT_CNTL 0xFFFFFCFF 47262306a36Sopenharmony_ci#define S_006080_D1CRTC_CURRENT_MASTER_EN_STATE(x) (((x) & 0x1) << 16) 47362306a36Sopenharmony_ci#define G_006080_D1CRTC_CURRENT_MASTER_EN_STATE(x) (((x) >> 16) & 0x1) 47462306a36Sopenharmony_ci#define C_006080_D1CRTC_CURRENT_MASTER_EN_STATE 0xFFFEFFFF 47562306a36Sopenharmony_ci#define S_006080_D1CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) & 0x1) << 24) 47662306a36Sopenharmony_ci#define G_006080_D1CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) >> 24) & 0x1) 47762306a36Sopenharmony_ci#define C_006080_D1CRTC_DISP_READ_REQUEST_DISABLE 0xFEFFFFFF 47862306a36Sopenharmony_ci#define R_0060E8_D1CRTC_UPDATE_LOCK 0x0060E8 47962306a36Sopenharmony_ci#define S_0060E8_D1CRTC_UPDATE_LOCK(x) (((x) & 0x1) << 0) 48062306a36Sopenharmony_ci#define G_0060E8_D1CRTC_UPDATE_LOCK(x) (((x) >> 0) & 0x1) 48162306a36Sopenharmony_ci#define C_0060E8_D1CRTC_UPDATE_LOCK 0xFFFFFFFE 48262306a36Sopenharmony_ci#define R_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS 0x006110 48362306a36Sopenharmony_ci#define S_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 48462306a36Sopenharmony_ci#define G_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 48562306a36Sopenharmony_ci#define C_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS 0x00000000 48662306a36Sopenharmony_ci#define R_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS 0x006118 48762306a36Sopenharmony_ci#define S_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 48862306a36Sopenharmony_ci#define G_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 48962306a36Sopenharmony_ci#define C_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS 0x00000000 49062306a36Sopenharmony_ci#define R_006880_D2CRTC_CONTROL 0x006880 49162306a36Sopenharmony_ci#define S_006880_D2CRTC_MASTER_EN(x) (((x) & 0x1) << 0) 49262306a36Sopenharmony_ci#define G_006880_D2CRTC_MASTER_EN(x) (((x) >> 0) & 0x1) 49362306a36Sopenharmony_ci#define C_006880_D2CRTC_MASTER_EN 0xFFFFFFFE 49462306a36Sopenharmony_ci#define S_006880_D2CRTC_SYNC_RESET_SEL(x) (((x) & 0x1) << 4) 49562306a36Sopenharmony_ci#define G_006880_D2CRTC_SYNC_RESET_SEL(x) (((x) >> 4) & 0x1) 49662306a36Sopenharmony_ci#define C_006880_D2CRTC_SYNC_RESET_SEL 0xFFFFFFEF 49762306a36Sopenharmony_ci#define S_006880_D2CRTC_DISABLE_POINT_CNTL(x) (((x) & 0x3) << 8) 49862306a36Sopenharmony_ci#define G_006880_D2CRTC_DISABLE_POINT_CNTL(x) (((x) >> 8) & 0x3) 49962306a36Sopenharmony_ci#define C_006880_D2CRTC_DISABLE_POINT_CNTL 0xFFFFFCFF 50062306a36Sopenharmony_ci#define S_006880_D2CRTC_CURRENT_MASTER_EN_STATE(x) (((x) & 0x1) << 16) 50162306a36Sopenharmony_ci#define G_006880_D2CRTC_CURRENT_MASTER_EN_STATE(x) (((x) >> 16) & 0x1) 50262306a36Sopenharmony_ci#define C_006880_D2CRTC_CURRENT_MASTER_EN_STATE 0xFFFEFFFF 50362306a36Sopenharmony_ci#define S_006880_D2CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) & 0x1) << 24) 50462306a36Sopenharmony_ci#define G_006880_D2CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) >> 24) & 0x1) 50562306a36Sopenharmony_ci#define C_006880_D2CRTC_DISP_READ_REQUEST_DISABLE 0xFEFFFFFF 50662306a36Sopenharmony_ci#define R_0068E8_D2CRTC_UPDATE_LOCK 0x0068E8 50762306a36Sopenharmony_ci#define S_0068E8_D2CRTC_UPDATE_LOCK(x) (((x) & 0x1) << 0) 50862306a36Sopenharmony_ci#define G_0068E8_D2CRTC_UPDATE_LOCK(x) (((x) >> 0) & 0x1) 50962306a36Sopenharmony_ci#define C_0068E8_D2CRTC_UPDATE_LOCK 0xFFFFFFFE 51062306a36Sopenharmony_ci#define R_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS 0x006910 51162306a36Sopenharmony_ci#define S_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 51262306a36Sopenharmony_ci#define G_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 51362306a36Sopenharmony_ci#define C_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS 0x00000000 51462306a36Sopenharmony_ci#define R_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS 0x006918 51562306a36Sopenharmony_ci#define S_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0) 51662306a36Sopenharmony_ci#define G_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF) 51762306a36Sopenharmony_ci#define C_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS 0x00000000 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ci 52062306a36Sopenharmony_ci#define R_000001_MC_FB_LOCATION 0x000001 52162306a36Sopenharmony_ci#define S_000001_MC_FB_START(x) (((x) & 0xFFFF) << 0) 52262306a36Sopenharmony_ci#define G_000001_MC_FB_START(x) (((x) >> 0) & 0xFFFF) 52362306a36Sopenharmony_ci#define C_000001_MC_FB_START 0xFFFF0000 52462306a36Sopenharmony_ci#define S_000001_MC_FB_TOP(x) (((x) & 0xFFFF) << 16) 52562306a36Sopenharmony_ci#define G_000001_MC_FB_TOP(x) (((x) >> 16) & 0xFFFF) 52662306a36Sopenharmony_ci#define C_000001_MC_FB_TOP 0x0000FFFF 52762306a36Sopenharmony_ci#define R_000002_MC_AGP_LOCATION 0x000002 52862306a36Sopenharmony_ci#define S_000002_MC_AGP_START(x) (((x) & 0xFFFF) << 0) 52962306a36Sopenharmony_ci#define G_000002_MC_AGP_START(x) (((x) >> 0) & 0xFFFF) 53062306a36Sopenharmony_ci#define C_000002_MC_AGP_START 0xFFFF0000 53162306a36Sopenharmony_ci#define S_000002_MC_AGP_TOP(x) (((x) & 0xFFFF) << 16) 53262306a36Sopenharmony_ci#define G_000002_MC_AGP_TOP(x) (((x) >> 16) & 0xFFFF) 53362306a36Sopenharmony_ci#define C_000002_MC_AGP_TOP 0x0000FFFF 53462306a36Sopenharmony_ci#define R_000003_MC_AGP_BASE 0x000003 53562306a36Sopenharmony_ci#define S_000003_AGP_BASE_ADDR(x) (((x) & 0xFFFFFFFF) << 0) 53662306a36Sopenharmony_ci#define G_000003_AGP_BASE_ADDR(x) (((x) >> 0) & 0xFFFFFFFF) 53762306a36Sopenharmony_ci#define C_000003_AGP_BASE_ADDR 0x00000000 53862306a36Sopenharmony_ci#define R_000004_MC_AGP_BASE_2 0x000004 53962306a36Sopenharmony_ci#define S_000004_AGP_BASE_ADDR_2(x) (((x) & 0xF) << 0) 54062306a36Sopenharmony_ci#define G_000004_AGP_BASE_ADDR_2(x) (((x) >> 0) & 0xF) 54162306a36Sopenharmony_ci#define C_000004_AGP_BASE_ADDR_2 0xFFFFFFF0 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci 54462306a36Sopenharmony_ci#define R_00000F_CP_DYN_CNTL 0x00000F 54562306a36Sopenharmony_ci#define S_00000F_CP_FORCEON(x) (((x) & 0x1) << 0) 54662306a36Sopenharmony_ci#define G_00000F_CP_FORCEON(x) (((x) >> 0) & 0x1) 54762306a36Sopenharmony_ci#define C_00000F_CP_FORCEON 0xFFFFFFFE 54862306a36Sopenharmony_ci#define S_00000F_CP_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 1) 54962306a36Sopenharmony_ci#define G_00000F_CP_MAX_DYN_STOP_LAT(x) (((x) >> 1) & 0x1) 55062306a36Sopenharmony_ci#define C_00000F_CP_MAX_DYN_STOP_LAT 0xFFFFFFFD 55162306a36Sopenharmony_ci#define S_00000F_CP_CLOCK_STATUS(x) (((x) & 0x1) << 2) 55262306a36Sopenharmony_ci#define G_00000F_CP_CLOCK_STATUS(x) (((x) >> 2) & 0x1) 55362306a36Sopenharmony_ci#define C_00000F_CP_CLOCK_STATUS 0xFFFFFFFB 55462306a36Sopenharmony_ci#define S_00000F_CP_PROG_SHUTOFF(x) (((x) & 0x1) << 3) 55562306a36Sopenharmony_ci#define G_00000F_CP_PROG_SHUTOFF(x) (((x) >> 3) & 0x1) 55662306a36Sopenharmony_ci#define C_00000F_CP_PROG_SHUTOFF 0xFFFFFFF7 55762306a36Sopenharmony_ci#define S_00000F_CP_PROG_DELAY_VALUE(x) (((x) & 0xFF) << 4) 55862306a36Sopenharmony_ci#define G_00000F_CP_PROG_DELAY_VALUE(x) (((x) >> 4) & 0xFF) 55962306a36Sopenharmony_ci#define C_00000F_CP_PROG_DELAY_VALUE 0xFFFFF00F 56062306a36Sopenharmony_ci#define S_00000F_CP_LOWER_POWER_IDLE(x) (((x) & 0xFF) << 12) 56162306a36Sopenharmony_ci#define G_00000F_CP_LOWER_POWER_IDLE(x) (((x) >> 12) & 0xFF) 56262306a36Sopenharmony_ci#define C_00000F_CP_LOWER_POWER_IDLE 0xFFF00FFF 56362306a36Sopenharmony_ci#define S_00000F_CP_LOWER_POWER_IGNORE(x) (((x) & 0x1) << 20) 56462306a36Sopenharmony_ci#define G_00000F_CP_LOWER_POWER_IGNORE(x) (((x) >> 20) & 0x1) 56562306a36Sopenharmony_ci#define C_00000F_CP_LOWER_POWER_IGNORE 0xFFEFFFFF 56662306a36Sopenharmony_ci#define S_00000F_CP_NORMAL_POWER_IGNORE(x) (((x) & 0x1) << 21) 56762306a36Sopenharmony_ci#define G_00000F_CP_NORMAL_POWER_IGNORE(x) (((x) >> 21) & 0x1) 56862306a36Sopenharmony_ci#define C_00000F_CP_NORMAL_POWER_IGNORE 0xFFDFFFFF 56962306a36Sopenharmony_ci#define S_00000F_SPARE(x) (((x) & 0x3) << 22) 57062306a36Sopenharmony_ci#define G_00000F_SPARE(x) (((x) >> 22) & 0x3) 57162306a36Sopenharmony_ci#define C_00000F_SPARE 0xFF3FFFFF 57262306a36Sopenharmony_ci#define S_00000F_CP_NORMAL_POWER_BUSY(x) (((x) & 0xFF) << 24) 57362306a36Sopenharmony_ci#define G_00000F_CP_NORMAL_POWER_BUSY(x) (((x) >> 24) & 0xFF) 57462306a36Sopenharmony_ci#define C_00000F_CP_NORMAL_POWER_BUSY 0x00FFFFFF 57562306a36Sopenharmony_ci#define R_000011_E2_DYN_CNTL 0x000011 57662306a36Sopenharmony_ci#define S_000011_E2_FORCEON(x) (((x) & 0x1) << 0) 57762306a36Sopenharmony_ci#define G_000011_E2_FORCEON(x) (((x) >> 0) & 0x1) 57862306a36Sopenharmony_ci#define C_000011_E2_FORCEON 0xFFFFFFFE 57962306a36Sopenharmony_ci#define S_000011_E2_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 1) 58062306a36Sopenharmony_ci#define G_000011_E2_MAX_DYN_STOP_LAT(x) (((x) >> 1) & 0x1) 58162306a36Sopenharmony_ci#define C_000011_E2_MAX_DYN_STOP_LAT 0xFFFFFFFD 58262306a36Sopenharmony_ci#define S_000011_E2_CLOCK_STATUS(x) (((x) & 0x1) << 2) 58362306a36Sopenharmony_ci#define G_000011_E2_CLOCK_STATUS(x) (((x) >> 2) & 0x1) 58462306a36Sopenharmony_ci#define C_000011_E2_CLOCK_STATUS 0xFFFFFFFB 58562306a36Sopenharmony_ci#define S_000011_E2_PROG_SHUTOFF(x) (((x) & 0x1) << 3) 58662306a36Sopenharmony_ci#define G_000011_E2_PROG_SHUTOFF(x) (((x) >> 3) & 0x1) 58762306a36Sopenharmony_ci#define C_000011_E2_PROG_SHUTOFF 0xFFFFFFF7 58862306a36Sopenharmony_ci#define S_000011_E2_PROG_DELAY_VALUE(x) (((x) & 0xFF) << 4) 58962306a36Sopenharmony_ci#define G_000011_E2_PROG_DELAY_VALUE(x) (((x) >> 4) & 0xFF) 59062306a36Sopenharmony_ci#define C_000011_E2_PROG_DELAY_VALUE 0xFFFFF00F 59162306a36Sopenharmony_ci#define S_000011_E2_LOWER_POWER_IDLE(x) (((x) & 0xFF) << 12) 59262306a36Sopenharmony_ci#define G_000011_E2_LOWER_POWER_IDLE(x) (((x) >> 12) & 0xFF) 59362306a36Sopenharmony_ci#define C_000011_E2_LOWER_POWER_IDLE 0xFFF00FFF 59462306a36Sopenharmony_ci#define S_000011_E2_LOWER_POWER_IGNORE(x) (((x) & 0x1) << 20) 59562306a36Sopenharmony_ci#define G_000011_E2_LOWER_POWER_IGNORE(x) (((x) >> 20) & 0x1) 59662306a36Sopenharmony_ci#define C_000011_E2_LOWER_POWER_IGNORE 0xFFEFFFFF 59762306a36Sopenharmony_ci#define S_000011_E2_NORMAL_POWER_IGNORE(x) (((x) & 0x1) << 21) 59862306a36Sopenharmony_ci#define G_000011_E2_NORMAL_POWER_IGNORE(x) (((x) >> 21) & 0x1) 59962306a36Sopenharmony_ci#define C_000011_E2_NORMAL_POWER_IGNORE 0xFFDFFFFF 60062306a36Sopenharmony_ci#define S_000011_SPARE(x) (((x) & 0x3) << 22) 60162306a36Sopenharmony_ci#define G_000011_SPARE(x) (((x) >> 22) & 0x3) 60262306a36Sopenharmony_ci#define C_000011_SPARE 0xFF3FFFFF 60362306a36Sopenharmony_ci#define S_000011_E2_NORMAL_POWER_BUSY(x) (((x) & 0xFF) << 24) 60462306a36Sopenharmony_ci#define G_000011_E2_NORMAL_POWER_BUSY(x) (((x) >> 24) & 0xFF) 60562306a36Sopenharmony_ci#define C_000011_E2_NORMAL_POWER_BUSY 0x00FFFFFF 60662306a36Sopenharmony_ci#define R_000013_IDCT_DYN_CNTL 0x000013 60762306a36Sopenharmony_ci#define S_000013_IDCT_FORCEON(x) (((x) & 0x1) << 0) 60862306a36Sopenharmony_ci#define G_000013_IDCT_FORCEON(x) (((x) >> 0) & 0x1) 60962306a36Sopenharmony_ci#define C_000013_IDCT_FORCEON 0xFFFFFFFE 61062306a36Sopenharmony_ci#define S_000013_IDCT_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 1) 61162306a36Sopenharmony_ci#define G_000013_IDCT_MAX_DYN_STOP_LAT(x) (((x) >> 1) & 0x1) 61262306a36Sopenharmony_ci#define C_000013_IDCT_MAX_DYN_STOP_LAT 0xFFFFFFFD 61362306a36Sopenharmony_ci#define S_000013_IDCT_CLOCK_STATUS(x) (((x) & 0x1) << 2) 61462306a36Sopenharmony_ci#define G_000013_IDCT_CLOCK_STATUS(x) (((x) >> 2) & 0x1) 61562306a36Sopenharmony_ci#define C_000013_IDCT_CLOCK_STATUS 0xFFFFFFFB 61662306a36Sopenharmony_ci#define S_000013_IDCT_PROG_SHUTOFF(x) (((x) & 0x1) << 3) 61762306a36Sopenharmony_ci#define G_000013_IDCT_PROG_SHUTOFF(x) (((x) >> 3) & 0x1) 61862306a36Sopenharmony_ci#define C_000013_IDCT_PROG_SHUTOFF 0xFFFFFFF7 61962306a36Sopenharmony_ci#define S_000013_IDCT_PROG_DELAY_VALUE(x) (((x) & 0xFF) << 4) 62062306a36Sopenharmony_ci#define G_000013_IDCT_PROG_DELAY_VALUE(x) (((x) >> 4) & 0xFF) 62162306a36Sopenharmony_ci#define C_000013_IDCT_PROG_DELAY_VALUE 0xFFFFF00F 62262306a36Sopenharmony_ci#define S_000013_IDCT_LOWER_POWER_IDLE(x) (((x) & 0xFF) << 12) 62362306a36Sopenharmony_ci#define G_000013_IDCT_LOWER_POWER_IDLE(x) (((x) >> 12) & 0xFF) 62462306a36Sopenharmony_ci#define C_000013_IDCT_LOWER_POWER_IDLE 0xFFF00FFF 62562306a36Sopenharmony_ci#define S_000013_IDCT_LOWER_POWER_IGNORE(x) (((x) & 0x1) << 20) 62662306a36Sopenharmony_ci#define G_000013_IDCT_LOWER_POWER_IGNORE(x) (((x) >> 20) & 0x1) 62762306a36Sopenharmony_ci#define C_000013_IDCT_LOWER_POWER_IGNORE 0xFFEFFFFF 62862306a36Sopenharmony_ci#define S_000013_IDCT_NORMAL_POWER_IGNORE(x) (((x) & 0x1) << 21) 62962306a36Sopenharmony_ci#define G_000013_IDCT_NORMAL_POWER_IGNORE(x) (((x) >> 21) & 0x1) 63062306a36Sopenharmony_ci#define C_000013_IDCT_NORMAL_POWER_IGNORE 0xFFDFFFFF 63162306a36Sopenharmony_ci#define S_000013_SPARE(x) (((x) & 0x3) << 22) 63262306a36Sopenharmony_ci#define G_000013_SPARE(x) (((x) >> 22) & 0x3) 63362306a36Sopenharmony_ci#define C_000013_SPARE 0xFF3FFFFF 63462306a36Sopenharmony_ci#define S_000013_IDCT_NORMAL_POWER_BUSY(x) (((x) & 0xFF) << 24) 63562306a36Sopenharmony_ci#define G_000013_IDCT_NORMAL_POWER_BUSY(x) (((x) >> 24) & 0xFF) 63662306a36Sopenharmony_ci#define C_000013_IDCT_NORMAL_POWER_BUSY 0x00FFFFFF 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_ci#endif 639