162306a36Sopenharmony_ci#ifndef MDP4_XML 262306a36Sopenharmony_ci#define MDP4_XML 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci/* Autogenerated file, DO NOT EDIT manually! 562306a36Sopenharmony_ci 662306a36Sopenharmony_ciThis file was generated by the rules-ng-ng headergen tool in this git repository: 762306a36Sopenharmony_cihttp://github.com/freedreno/envytools/ 862306a36Sopenharmony_cigit clone https://github.com/freedreno/envytools.git 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciThe rules-ng-ng source files this header was generated from are: 1162306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) 1262306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) 1362306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) 1462306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) 1562306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) 1662306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) 1762306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) 1862306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) 1962306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) 2062306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) 2162306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) 2262306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) 2362306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) 2462306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) 2562306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) 2662306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) 2762306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) 2862306a36Sopenharmony_ci- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciCopyright (C) 2013-2022 by the following authors: 3162306a36Sopenharmony_ci- Rob Clark <robdclark@gmail.com> (robclark) 3262306a36Sopenharmony_ci- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin) 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciPermission is hereby granted, free of charge, to any person obtaining 3562306a36Sopenharmony_cia copy of this software and associated documentation files (the 3662306a36Sopenharmony_ci"Software"), to deal in the Software without restriction, including 3762306a36Sopenharmony_ciwithout limitation the rights to use, copy, modify, merge, publish, 3862306a36Sopenharmony_cidistribute, sublicense, and/or sell copies of the Software, and to 3962306a36Sopenharmony_cipermit persons to whom the Software is furnished to do so, subject to 4062306a36Sopenharmony_cithe following conditions: 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciThe above copyright notice and this permission notice (including the 4362306a36Sopenharmony_cinext paragraph) shall be included in all copies or substantial 4462306a36Sopenharmony_ciportions of the Software. 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 4762306a36Sopenharmony_ciEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 4862306a36Sopenharmony_ciMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 4962306a36Sopenharmony_ciIN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE 5062306a36Sopenharmony_ciLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 5162306a36Sopenharmony_ciOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 5262306a36Sopenharmony_ciWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5362306a36Sopenharmony_ci*/ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cienum mdp4_pipe { 5762306a36Sopenharmony_ci VG1 = 0, 5862306a36Sopenharmony_ci VG2 = 1, 5962306a36Sopenharmony_ci RGB1 = 2, 6062306a36Sopenharmony_ci RGB2 = 3, 6162306a36Sopenharmony_ci RGB3 = 4, 6262306a36Sopenharmony_ci VG3 = 5, 6362306a36Sopenharmony_ci VG4 = 6, 6462306a36Sopenharmony_ci}; 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_cienum mdp4_mixer { 6762306a36Sopenharmony_ci MIXER0 = 0, 6862306a36Sopenharmony_ci MIXER1 = 1, 6962306a36Sopenharmony_ci MIXER2 = 2, 7062306a36Sopenharmony_ci}; 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_cienum mdp4_intf { 7362306a36Sopenharmony_ci INTF_LCDC_DTV = 0, 7462306a36Sopenharmony_ci INTF_DSI_VIDEO = 1, 7562306a36Sopenharmony_ci INTF_DSI_CMD = 2, 7662306a36Sopenharmony_ci INTF_EBI2_TV = 3, 7762306a36Sopenharmony_ci}; 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_cienum mdp4_cursor_format { 8062306a36Sopenharmony_ci CURSOR_ARGB = 1, 8162306a36Sopenharmony_ci CURSOR_XRGB = 2, 8262306a36Sopenharmony_ci}; 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_cienum mdp4_frame_format { 8562306a36Sopenharmony_ci FRAME_LINEAR = 0, 8662306a36Sopenharmony_ci FRAME_TILE_ARGB_4X4 = 1, 8762306a36Sopenharmony_ci FRAME_TILE_YCBCR_420 = 2, 8862306a36Sopenharmony_ci}; 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_cienum mdp4_scale_unit { 9162306a36Sopenharmony_ci SCALE_FIR = 0, 9262306a36Sopenharmony_ci SCALE_MN_PHASE = 1, 9362306a36Sopenharmony_ci SCALE_PIXEL_RPT = 2, 9462306a36Sopenharmony_ci}; 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_cienum mdp4_dma { 9762306a36Sopenharmony_ci DMA_P = 0, 9862306a36Sopenharmony_ci DMA_S = 1, 9962306a36Sopenharmony_ci DMA_E = 2, 10062306a36Sopenharmony_ci}; 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci#define MDP4_IRQ_OVERLAY0_DONE 0x00000001 10362306a36Sopenharmony_ci#define MDP4_IRQ_OVERLAY1_DONE 0x00000002 10462306a36Sopenharmony_ci#define MDP4_IRQ_DMA_S_DONE 0x00000004 10562306a36Sopenharmony_ci#define MDP4_IRQ_DMA_E_DONE 0x00000008 10662306a36Sopenharmony_ci#define MDP4_IRQ_DMA_P_DONE 0x00000010 10762306a36Sopenharmony_ci#define MDP4_IRQ_VG1_HISTOGRAM 0x00000020 10862306a36Sopenharmony_ci#define MDP4_IRQ_VG2_HISTOGRAM 0x00000040 10962306a36Sopenharmony_ci#define MDP4_IRQ_PRIMARY_VSYNC 0x00000080 11062306a36Sopenharmony_ci#define MDP4_IRQ_PRIMARY_INTF_UDERRUN 0x00000100 11162306a36Sopenharmony_ci#define MDP4_IRQ_EXTERNAL_VSYNC 0x00000200 11262306a36Sopenharmony_ci#define MDP4_IRQ_EXTERNAL_INTF_UDERRUN 0x00000400 11362306a36Sopenharmony_ci#define MDP4_IRQ_PRIMARY_RDPTR 0x00000800 11462306a36Sopenharmony_ci#define MDP4_IRQ_DMA_P_HISTOGRAM 0x00020000 11562306a36Sopenharmony_ci#define MDP4_IRQ_DMA_S_HISTOGRAM 0x04000000 11662306a36Sopenharmony_ci#define MDP4_IRQ_OVERLAY2_DONE 0x40000000 11762306a36Sopenharmony_ci#define REG_MDP4_VERSION 0x00000000 11862306a36Sopenharmony_ci#define MDP4_VERSION_MINOR__MASK 0x00ff0000 11962306a36Sopenharmony_ci#define MDP4_VERSION_MINOR__SHIFT 16 12062306a36Sopenharmony_cistatic inline uint32_t MDP4_VERSION_MINOR(uint32_t val) 12162306a36Sopenharmony_ci{ 12262306a36Sopenharmony_ci return ((val) << MDP4_VERSION_MINOR__SHIFT) & MDP4_VERSION_MINOR__MASK; 12362306a36Sopenharmony_ci} 12462306a36Sopenharmony_ci#define MDP4_VERSION_MAJOR__MASK 0xff000000 12562306a36Sopenharmony_ci#define MDP4_VERSION_MAJOR__SHIFT 24 12662306a36Sopenharmony_cistatic inline uint32_t MDP4_VERSION_MAJOR(uint32_t val) 12762306a36Sopenharmony_ci{ 12862306a36Sopenharmony_ci return ((val) << MDP4_VERSION_MAJOR__SHIFT) & MDP4_VERSION_MAJOR__MASK; 12962306a36Sopenharmony_ci} 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define REG_MDP4_OVLP0_KICK 0x00000004 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci#define REG_MDP4_OVLP1_KICK 0x00000008 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ci#define REG_MDP4_OVLP2_KICK 0x000000d0 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define REG_MDP4_DMA_P_KICK 0x0000000c 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#define REG_MDP4_DMA_S_KICK 0x00000010 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci#define REG_MDP4_DMA_E_KICK 0x00000014 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ci#define REG_MDP4_DISP_STATUS 0x00000018 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci#define REG_MDP4_DISP_INTF_SEL 0x00000038 14662306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_PRIM__MASK 0x00000003 14762306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_PRIM__SHIFT 0 14862306a36Sopenharmony_cistatic inline uint32_t MDP4_DISP_INTF_SEL_PRIM(enum mdp4_intf val) 14962306a36Sopenharmony_ci{ 15062306a36Sopenharmony_ci return ((val) << MDP4_DISP_INTF_SEL_PRIM__SHIFT) & MDP4_DISP_INTF_SEL_PRIM__MASK; 15162306a36Sopenharmony_ci} 15262306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_SEC__MASK 0x0000000c 15362306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_SEC__SHIFT 2 15462306a36Sopenharmony_cistatic inline uint32_t MDP4_DISP_INTF_SEL_SEC(enum mdp4_intf val) 15562306a36Sopenharmony_ci{ 15662306a36Sopenharmony_ci return ((val) << MDP4_DISP_INTF_SEL_SEC__SHIFT) & MDP4_DISP_INTF_SEL_SEC__MASK; 15762306a36Sopenharmony_ci} 15862306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_EXT__MASK 0x00000030 15962306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_EXT__SHIFT 4 16062306a36Sopenharmony_cistatic inline uint32_t MDP4_DISP_INTF_SEL_EXT(enum mdp4_intf val) 16162306a36Sopenharmony_ci{ 16262306a36Sopenharmony_ci return ((val) << MDP4_DISP_INTF_SEL_EXT__SHIFT) & MDP4_DISP_INTF_SEL_EXT__MASK; 16362306a36Sopenharmony_ci} 16462306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_DSI_VIDEO 0x00000040 16562306a36Sopenharmony_ci#define MDP4_DISP_INTF_SEL_DSI_CMD 0x00000080 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci#define REG_MDP4_RESET_STATUS 0x0000003c 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ci#define REG_MDP4_READ_CNFG 0x0000004c 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci#define REG_MDP4_INTR_ENABLE 0x00000050 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_ci#define REG_MDP4_INTR_STATUS 0x00000054 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define REG_MDP4_INTR_CLEAR 0x00000058 17662306a36Sopenharmony_ci 17762306a36Sopenharmony_ci#define REG_MDP4_EBI2_LCD0 0x00000060 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#define REG_MDP4_EBI2_LCD1 0x00000064 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci#define REG_MDP4_PORTMAP_MODE 0x00000070 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci#define REG_MDP4_CS_CONTROLLER0 0x000000c0 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci#define REG_MDP4_CS_CONTROLLER1 0x000000c4 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ci#define REG_MDP4_LAYERMIXER2_IN_CFG 0x000100f0 18862306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE0__MASK 0x00000007 18962306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE0__SHIFT 0 19062306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE0(enum mdp_mixer_stage_id val) 19162306a36Sopenharmony_ci{ 19262306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE0__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE0__MASK; 19362306a36Sopenharmony_ci} 19462306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE0_MIXER1 0x00000008 19562306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE1__MASK 0x00000070 19662306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE1__SHIFT 4 19762306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE1(enum mdp_mixer_stage_id val) 19862306a36Sopenharmony_ci{ 19962306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE1__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE1__MASK; 20062306a36Sopenharmony_ci} 20162306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE1_MIXER1 0x00000080 20262306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE2__MASK 0x00000700 20362306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE2__SHIFT 8 20462306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE2(enum mdp_mixer_stage_id val) 20562306a36Sopenharmony_ci{ 20662306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE2__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE2__MASK; 20762306a36Sopenharmony_ci} 20862306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE2_MIXER1 0x00000800 20962306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE3__MASK 0x00007000 21062306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE3__SHIFT 12 21162306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE3(enum mdp_mixer_stage_id val) 21262306a36Sopenharmony_ci{ 21362306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE3__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE3__MASK; 21462306a36Sopenharmony_ci} 21562306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE3_MIXER1 0x00008000 21662306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE4__MASK 0x00070000 21762306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE4__SHIFT 16 21862306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE4(enum mdp_mixer_stage_id val) 21962306a36Sopenharmony_ci{ 22062306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE4__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE4__MASK; 22162306a36Sopenharmony_ci} 22262306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE4_MIXER1 0x00080000 22362306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE5__MASK 0x00700000 22462306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE5__SHIFT 20 22562306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE5(enum mdp_mixer_stage_id val) 22662306a36Sopenharmony_ci{ 22762306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE5__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE5__MASK; 22862306a36Sopenharmony_ci} 22962306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE5_MIXER1 0x00800000 23062306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE6__MASK 0x07000000 23162306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE6__SHIFT 24 23262306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE6(enum mdp_mixer_stage_id val) 23362306a36Sopenharmony_ci{ 23462306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE6__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE6__MASK; 23562306a36Sopenharmony_ci} 23662306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE6_MIXER1 0x08000000 23762306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE7__MASK 0x70000000 23862306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE7__SHIFT 28 23962306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER2_IN_CFG_PIPE7(enum mdp_mixer_stage_id val) 24062306a36Sopenharmony_ci{ 24162306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER2_IN_CFG_PIPE7__SHIFT) & MDP4_LAYERMIXER2_IN_CFG_PIPE7__MASK; 24262306a36Sopenharmony_ci} 24362306a36Sopenharmony_ci#define MDP4_LAYERMIXER2_IN_CFG_PIPE7_MIXER1 0x80000000 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci#define REG_MDP4_LAYERMIXER_IN_CFG_UPDATE_METHOD 0x000100fc 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_ci#define REG_MDP4_LAYERMIXER_IN_CFG 0x00010100 24862306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE0__MASK 0x00000007 24962306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE0__SHIFT 0 25062306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE0(enum mdp_mixer_stage_id val) 25162306a36Sopenharmony_ci{ 25262306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE0__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE0__MASK; 25362306a36Sopenharmony_ci} 25462306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE0_MIXER1 0x00000008 25562306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE1__MASK 0x00000070 25662306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE1__SHIFT 4 25762306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE1(enum mdp_mixer_stage_id val) 25862306a36Sopenharmony_ci{ 25962306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE1__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE1__MASK; 26062306a36Sopenharmony_ci} 26162306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE1_MIXER1 0x00000080 26262306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE2__MASK 0x00000700 26362306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE2__SHIFT 8 26462306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE2(enum mdp_mixer_stage_id val) 26562306a36Sopenharmony_ci{ 26662306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE2__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE2__MASK; 26762306a36Sopenharmony_ci} 26862306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE2_MIXER1 0x00000800 26962306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE3__MASK 0x00007000 27062306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE3__SHIFT 12 27162306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE3(enum mdp_mixer_stage_id val) 27262306a36Sopenharmony_ci{ 27362306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE3__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE3__MASK; 27462306a36Sopenharmony_ci} 27562306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE3_MIXER1 0x00008000 27662306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE4__MASK 0x00070000 27762306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE4__SHIFT 16 27862306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE4(enum mdp_mixer_stage_id val) 27962306a36Sopenharmony_ci{ 28062306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE4__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE4__MASK; 28162306a36Sopenharmony_ci} 28262306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE4_MIXER1 0x00080000 28362306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE5__MASK 0x00700000 28462306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE5__SHIFT 20 28562306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE5(enum mdp_mixer_stage_id val) 28662306a36Sopenharmony_ci{ 28762306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE5__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE5__MASK; 28862306a36Sopenharmony_ci} 28962306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE5_MIXER1 0x00800000 29062306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE6__MASK 0x07000000 29162306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE6__SHIFT 24 29262306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE6(enum mdp_mixer_stage_id val) 29362306a36Sopenharmony_ci{ 29462306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE6__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE6__MASK; 29562306a36Sopenharmony_ci} 29662306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE6_MIXER1 0x08000000 29762306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE7__MASK 0x70000000 29862306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE7__SHIFT 28 29962306a36Sopenharmony_cistatic inline uint32_t MDP4_LAYERMIXER_IN_CFG_PIPE7(enum mdp_mixer_stage_id val) 30062306a36Sopenharmony_ci{ 30162306a36Sopenharmony_ci return ((val) << MDP4_LAYERMIXER_IN_CFG_PIPE7__SHIFT) & MDP4_LAYERMIXER_IN_CFG_PIPE7__MASK; 30262306a36Sopenharmony_ci} 30362306a36Sopenharmony_ci#define MDP4_LAYERMIXER_IN_CFG_PIPE7_MIXER1 0x80000000 30462306a36Sopenharmony_ci 30562306a36Sopenharmony_ci#define REG_MDP4_VG2_SRC_FORMAT 0x00030050 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci#define REG_MDP4_VG2_CONST_COLOR 0x00031008 30862306a36Sopenharmony_ci 30962306a36Sopenharmony_ci#define REG_MDP4_OVERLAY_FLUSH 0x00018000 31062306a36Sopenharmony_ci#define MDP4_OVERLAY_FLUSH_OVLP0 0x00000001 31162306a36Sopenharmony_ci#define MDP4_OVERLAY_FLUSH_OVLP1 0x00000002 31262306a36Sopenharmony_ci#define MDP4_OVERLAY_FLUSH_VG1 0x00000004 31362306a36Sopenharmony_ci#define MDP4_OVERLAY_FLUSH_VG2 0x00000008 31462306a36Sopenharmony_ci#define MDP4_OVERLAY_FLUSH_RGB1 0x00000010 31562306a36Sopenharmony_ci#define MDP4_OVERLAY_FLUSH_RGB2 0x00000020 31662306a36Sopenharmony_ci 31762306a36Sopenharmony_cistatic inline uint32_t __offset_OVLP(uint32_t idx) 31862306a36Sopenharmony_ci{ 31962306a36Sopenharmony_ci switch (idx) { 32062306a36Sopenharmony_ci case 0: return 0x00010000; 32162306a36Sopenharmony_ci case 1: return 0x00018000; 32262306a36Sopenharmony_ci case 2: return 0x00088000; 32362306a36Sopenharmony_ci default: return INVALID_IDX(idx); 32462306a36Sopenharmony_ci } 32562306a36Sopenharmony_ci} 32662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP(uint32_t i0) { return 0x00000000 + __offset_OVLP(i0); } 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CFG(uint32_t i0) { return 0x00000004 + __offset_OVLP(i0); } 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_SIZE(uint32_t i0) { return 0x00000008 + __offset_OVLP(i0); } 33162306a36Sopenharmony_ci#define MDP4_OVLP_SIZE_HEIGHT__MASK 0xffff0000 33262306a36Sopenharmony_ci#define MDP4_OVLP_SIZE_HEIGHT__SHIFT 16 33362306a36Sopenharmony_cistatic inline uint32_t MDP4_OVLP_SIZE_HEIGHT(uint32_t val) 33462306a36Sopenharmony_ci{ 33562306a36Sopenharmony_ci return ((val) << MDP4_OVLP_SIZE_HEIGHT__SHIFT) & MDP4_OVLP_SIZE_HEIGHT__MASK; 33662306a36Sopenharmony_ci} 33762306a36Sopenharmony_ci#define MDP4_OVLP_SIZE_WIDTH__MASK 0x0000ffff 33862306a36Sopenharmony_ci#define MDP4_OVLP_SIZE_WIDTH__SHIFT 0 33962306a36Sopenharmony_cistatic inline uint32_t MDP4_OVLP_SIZE_WIDTH(uint32_t val) 34062306a36Sopenharmony_ci{ 34162306a36Sopenharmony_ci return ((val) << MDP4_OVLP_SIZE_WIDTH__SHIFT) & MDP4_OVLP_SIZE_WIDTH__MASK; 34262306a36Sopenharmony_ci} 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_BASE(uint32_t i0) { return 0x0000000c + __offset_OVLP(i0); } 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STRIDE(uint32_t i0) { return 0x00000010 + __offset_OVLP(i0); } 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_OPMODE(uint32_t i0) { return 0x00000014 + __offset_OVLP(i0); } 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_cistatic inline uint32_t __offset_STAGE(uint32_t idx) 35162306a36Sopenharmony_ci{ 35262306a36Sopenharmony_ci switch (idx) { 35362306a36Sopenharmony_ci case 0: return 0x00000104; 35462306a36Sopenharmony_ci case 1: return 0x00000124; 35562306a36Sopenharmony_ci case 2: return 0x00000144; 35662306a36Sopenharmony_ci case 3: return 0x00000160; 35762306a36Sopenharmony_ci default: return INVALID_IDX(idx); 35862306a36Sopenharmony_ci } 35962306a36Sopenharmony_ci} 36062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_OVLP(i0) + __offset_STAGE(i1); } 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_OP(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_OVLP(i0) + __offset_STAGE(i1); } 36362306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_FG_ALPHA__MASK 0x00000003 36462306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_FG_ALPHA__SHIFT 0 36562306a36Sopenharmony_cistatic inline uint32_t MDP4_OVLP_STAGE_OP_FG_ALPHA(enum mdp_alpha_type val) 36662306a36Sopenharmony_ci{ 36762306a36Sopenharmony_ci return ((val) << MDP4_OVLP_STAGE_OP_FG_ALPHA__SHIFT) & MDP4_OVLP_STAGE_OP_FG_ALPHA__MASK; 36862306a36Sopenharmony_ci} 36962306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_FG_INV_ALPHA 0x00000004 37062306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_FG_MOD_ALPHA 0x00000008 37162306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_BG_ALPHA__MASK 0x00000030 37262306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_BG_ALPHA__SHIFT 4 37362306a36Sopenharmony_cistatic inline uint32_t MDP4_OVLP_STAGE_OP_BG_ALPHA(enum mdp_alpha_type val) 37462306a36Sopenharmony_ci{ 37562306a36Sopenharmony_ci return ((val) << MDP4_OVLP_STAGE_OP_BG_ALPHA__SHIFT) & MDP4_OVLP_STAGE_OP_BG_ALPHA__MASK; 37662306a36Sopenharmony_ci} 37762306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_BG_INV_ALPHA 0x00000040 37862306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_BG_MOD_ALPHA 0x00000080 37962306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_FG_TRANSP 0x00000100 38062306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_OP_BG_TRANSP 0x00000200 38162306a36Sopenharmony_ci 38262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_FG_ALPHA(uint32_t i0, uint32_t i1) { return 0x00000004 + __offset_OVLP(i0) + __offset_STAGE(i1); } 38362306a36Sopenharmony_ci 38462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_BG_ALPHA(uint32_t i0, uint32_t i1) { return 0x00000008 + __offset_OVLP(i0) + __offset_STAGE(i1); } 38562306a36Sopenharmony_ci 38662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_TRANSP_LOW0(uint32_t i0, uint32_t i1) { return 0x0000000c + __offset_OVLP(i0) + __offset_STAGE(i1); } 38762306a36Sopenharmony_ci 38862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_TRANSP_LOW1(uint32_t i0, uint32_t i1) { return 0x00000010 + __offset_OVLP(i0) + __offset_STAGE(i1); } 38962306a36Sopenharmony_ci 39062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_TRANSP_HIGH0(uint32_t i0, uint32_t i1) { return 0x00000014 + __offset_OVLP(i0) + __offset_STAGE(i1); } 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_TRANSP_HIGH1(uint32_t i0, uint32_t i1) { return 0x00000018 + __offset_OVLP(i0) + __offset_STAGE(i1); } 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_cistatic inline uint32_t __offset_STAGE_CO3(uint32_t idx) 39562306a36Sopenharmony_ci{ 39662306a36Sopenharmony_ci switch (idx) { 39762306a36Sopenharmony_ci case 0: return 0x00001004; 39862306a36Sopenharmony_ci case 1: return 0x00001404; 39962306a36Sopenharmony_ci case 2: return 0x00001804; 40062306a36Sopenharmony_ci case 3: return 0x00001b84; 40162306a36Sopenharmony_ci default: return INVALID_IDX(idx); 40262306a36Sopenharmony_ci } 40362306a36Sopenharmony_ci} 40462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_CO3(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_OVLP(i0) + __offset_STAGE_CO3(i1); } 40562306a36Sopenharmony_ci 40662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_STAGE_CO3_SEL(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_OVLP(i0) + __offset_STAGE_CO3(i1); } 40762306a36Sopenharmony_ci#define MDP4_OVLP_STAGE_CO3_SEL_FG_ALPHA 0x00000001 40862306a36Sopenharmony_ci 40962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_TRANSP_LOW0(uint32_t i0) { return 0x00000180 + __offset_OVLP(i0); } 41062306a36Sopenharmony_ci 41162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_TRANSP_LOW1(uint32_t i0) { return 0x00000184 + __offset_OVLP(i0); } 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_TRANSP_HIGH0(uint32_t i0) { return 0x00000188 + __offset_OVLP(i0); } 41462306a36Sopenharmony_ci 41562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_TRANSP_HIGH1(uint32_t i0) { return 0x0000018c + __offset_OVLP(i0); } 41662306a36Sopenharmony_ci 41762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_CONFIG(uint32_t i0) { return 0x00000200 + __offset_OVLP(i0); } 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC(uint32_t i0) { return 0x00002000 + __offset_OVLP(i0); } 42062306a36Sopenharmony_ci 42162306a36Sopenharmony_ci 42262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_MV(uint32_t i0, uint32_t i1) { return 0x00002400 + __offset_OVLP(i0) + 0x4*i1; } 42362306a36Sopenharmony_ci 42462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_MV_VAL(uint32_t i0, uint32_t i1) { return 0x00002400 + __offset_OVLP(i0) + 0x4*i1; } 42562306a36Sopenharmony_ci 42662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_PRE_BV(uint32_t i0, uint32_t i1) { return 0x00002500 + __offset_OVLP(i0) + 0x4*i1; } 42762306a36Sopenharmony_ci 42862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_PRE_BV_VAL(uint32_t i0, uint32_t i1) { return 0x00002500 + __offset_OVLP(i0) + 0x4*i1; } 42962306a36Sopenharmony_ci 43062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_POST_BV(uint32_t i0, uint32_t i1) { return 0x00002580 + __offset_OVLP(i0) + 0x4*i1; } 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_POST_BV_VAL(uint32_t i0, uint32_t i1) { return 0x00002580 + __offset_OVLP(i0) + 0x4*i1; } 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_PRE_LV(uint32_t i0, uint32_t i1) { return 0x00002600 + __offset_OVLP(i0) + 0x4*i1; } 43562306a36Sopenharmony_ci 43662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_PRE_LV_VAL(uint32_t i0, uint32_t i1) { return 0x00002600 + __offset_OVLP(i0) + 0x4*i1; } 43762306a36Sopenharmony_ci 43862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_POST_LV(uint32_t i0, uint32_t i1) { return 0x00002680 + __offset_OVLP(i0) + 0x4*i1; } 43962306a36Sopenharmony_ci 44062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_OVLP_CSC_POST_LV_VAL(uint32_t i0, uint32_t i1) { return 0x00002680 + __offset_OVLP(i0) + 0x4*i1; } 44162306a36Sopenharmony_ci 44262306a36Sopenharmony_ci#define REG_MDP4_DMA_P_OP_MODE 0x00090070 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_LUTN(uint32_t i0) { return 0x00094800 + 0x400*i0; } 44562306a36Sopenharmony_ci 44662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_LUTN_LUT(uint32_t i0, uint32_t i1) { return 0x00094800 + 0x400*i0 + 0x4*i1; } 44762306a36Sopenharmony_ci 44862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_LUTN_LUT_VAL(uint32_t i0, uint32_t i1) { return 0x00094800 + 0x400*i0 + 0x4*i1; } 44962306a36Sopenharmony_ci 45062306a36Sopenharmony_ci#define REG_MDP4_DMA_S_OP_MODE 0x000a0028 45162306a36Sopenharmony_ci 45262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_E_QUANT(uint32_t i0) { return 0x000b0070 + 0x4*i0; } 45362306a36Sopenharmony_ci 45462306a36Sopenharmony_cistatic inline uint32_t __offset_DMA(enum mdp4_dma idx) 45562306a36Sopenharmony_ci{ 45662306a36Sopenharmony_ci switch (idx) { 45762306a36Sopenharmony_ci case DMA_P: return 0x00090000; 45862306a36Sopenharmony_ci case DMA_S: return 0x000a0000; 45962306a36Sopenharmony_ci case DMA_E: return 0x000b0000; 46062306a36Sopenharmony_ci default: return INVALID_IDX(idx); 46162306a36Sopenharmony_ci } 46262306a36Sopenharmony_ci} 46362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA(enum mdp4_dma i0) { return 0x00000000 + __offset_DMA(i0); } 46462306a36Sopenharmony_ci 46562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CONFIG(enum mdp4_dma i0) { return 0x00000000 + __offset_DMA(i0); } 46662306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_G_BPC__MASK 0x00000003 46762306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_G_BPC__SHIFT 0 46862306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CONFIG_G_BPC(enum mdp_bpc val) 46962306a36Sopenharmony_ci{ 47062306a36Sopenharmony_ci return ((val) << MDP4_DMA_CONFIG_G_BPC__SHIFT) & MDP4_DMA_CONFIG_G_BPC__MASK; 47162306a36Sopenharmony_ci} 47262306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_B_BPC__MASK 0x0000000c 47362306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_B_BPC__SHIFT 2 47462306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CONFIG_B_BPC(enum mdp_bpc val) 47562306a36Sopenharmony_ci{ 47662306a36Sopenharmony_ci return ((val) << MDP4_DMA_CONFIG_B_BPC__SHIFT) & MDP4_DMA_CONFIG_B_BPC__MASK; 47762306a36Sopenharmony_ci} 47862306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_R_BPC__MASK 0x00000030 47962306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_R_BPC__SHIFT 4 48062306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CONFIG_R_BPC(enum mdp_bpc val) 48162306a36Sopenharmony_ci{ 48262306a36Sopenharmony_ci return ((val) << MDP4_DMA_CONFIG_R_BPC__SHIFT) & MDP4_DMA_CONFIG_R_BPC__MASK; 48362306a36Sopenharmony_ci} 48462306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_PACK_ALIGN_MSB 0x00000080 48562306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_PACK__MASK 0x0000ff00 48662306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_PACK__SHIFT 8 48762306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CONFIG_PACK(uint32_t val) 48862306a36Sopenharmony_ci{ 48962306a36Sopenharmony_ci return ((val) << MDP4_DMA_CONFIG_PACK__SHIFT) & MDP4_DMA_CONFIG_PACK__MASK; 49062306a36Sopenharmony_ci} 49162306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_DEFLKR_EN 0x01000000 49262306a36Sopenharmony_ci#define MDP4_DMA_CONFIG_DITHER_EN 0x01000000 49362306a36Sopenharmony_ci 49462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_SRC_SIZE(enum mdp4_dma i0) { return 0x00000004 + __offset_DMA(i0); } 49562306a36Sopenharmony_ci#define MDP4_DMA_SRC_SIZE_HEIGHT__MASK 0xffff0000 49662306a36Sopenharmony_ci#define MDP4_DMA_SRC_SIZE_HEIGHT__SHIFT 16 49762306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_SRC_SIZE_HEIGHT(uint32_t val) 49862306a36Sopenharmony_ci{ 49962306a36Sopenharmony_ci return ((val) << MDP4_DMA_SRC_SIZE_HEIGHT__SHIFT) & MDP4_DMA_SRC_SIZE_HEIGHT__MASK; 50062306a36Sopenharmony_ci} 50162306a36Sopenharmony_ci#define MDP4_DMA_SRC_SIZE_WIDTH__MASK 0x0000ffff 50262306a36Sopenharmony_ci#define MDP4_DMA_SRC_SIZE_WIDTH__SHIFT 0 50362306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_SRC_SIZE_WIDTH(uint32_t val) 50462306a36Sopenharmony_ci{ 50562306a36Sopenharmony_ci return ((val) << MDP4_DMA_SRC_SIZE_WIDTH__SHIFT) & MDP4_DMA_SRC_SIZE_WIDTH__MASK; 50662306a36Sopenharmony_ci} 50762306a36Sopenharmony_ci 50862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_SRC_BASE(enum mdp4_dma i0) { return 0x00000008 + __offset_DMA(i0); } 50962306a36Sopenharmony_ci 51062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_SRC_STRIDE(enum mdp4_dma i0) { return 0x0000000c + __offset_DMA(i0); } 51162306a36Sopenharmony_ci 51262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_DST_SIZE(enum mdp4_dma i0) { return 0x00000010 + __offset_DMA(i0); } 51362306a36Sopenharmony_ci#define MDP4_DMA_DST_SIZE_HEIGHT__MASK 0xffff0000 51462306a36Sopenharmony_ci#define MDP4_DMA_DST_SIZE_HEIGHT__SHIFT 16 51562306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_DST_SIZE_HEIGHT(uint32_t val) 51662306a36Sopenharmony_ci{ 51762306a36Sopenharmony_ci return ((val) << MDP4_DMA_DST_SIZE_HEIGHT__SHIFT) & MDP4_DMA_DST_SIZE_HEIGHT__MASK; 51862306a36Sopenharmony_ci} 51962306a36Sopenharmony_ci#define MDP4_DMA_DST_SIZE_WIDTH__MASK 0x0000ffff 52062306a36Sopenharmony_ci#define MDP4_DMA_DST_SIZE_WIDTH__SHIFT 0 52162306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_DST_SIZE_WIDTH(uint32_t val) 52262306a36Sopenharmony_ci{ 52362306a36Sopenharmony_ci return ((val) << MDP4_DMA_DST_SIZE_WIDTH__SHIFT) & MDP4_DMA_DST_SIZE_WIDTH__MASK; 52462306a36Sopenharmony_ci} 52562306a36Sopenharmony_ci 52662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CURSOR_SIZE(enum mdp4_dma i0) { return 0x00000044 + __offset_DMA(i0); } 52762306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_SIZE_WIDTH__MASK 0x0000007f 52862306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_SIZE_WIDTH__SHIFT 0 52962306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CURSOR_SIZE_WIDTH(uint32_t val) 53062306a36Sopenharmony_ci{ 53162306a36Sopenharmony_ci return ((val) << MDP4_DMA_CURSOR_SIZE_WIDTH__SHIFT) & MDP4_DMA_CURSOR_SIZE_WIDTH__MASK; 53262306a36Sopenharmony_ci} 53362306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_SIZE_HEIGHT__MASK 0x007f0000 53462306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_SIZE_HEIGHT__SHIFT 16 53562306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CURSOR_SIZE_HEIGHT(uint32_t val) 53662306a36Sopenharmony_ci{ 53762306a36Sopenharmony_ci return ((val) << MDP4_DMA_CURSOR_SIZE_HEIGHT__SHIFT) & MDP4_DMA_CURSOR_SIZE_HEIGHT__MASK; 53862306a36Sopenharmony_ci} 53962306a36Sopenharmony_ci 54062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CURSOR_BASE(enum mdp4_dma i0) { return 0x00000048 + __offset_DMA(i0); } 54162306a36Sopenharmony_ci 54262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CURSOR_POS(enum mdp4_dma i0) { return 0x0000004c + __offset_DMA(i0); } 54362306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_POS_X__MASK 0x0000ffff 54462306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_POS_X__SHIFT 0 54562306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CURSOR_POS_X(uint32_t val) 54662306a36Sopenharmony_ci{ 54762306a36Sopenharmony_ci return ((val) << MDP4_DMA_CURSOR_POS_X__SHIFT) & MDP4_DMA_CURSOR_POS_X__MASK; 54862306a36Sopenharmony_ci} 54962306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_POS_Y__MASK 0xffff0000 55062306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_POS_Y__SHIFT 16 55162306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CURSOR_POS_Y(uint32_t val) 55262306a36Sopenharmony_ci{ 55362306a36Sopenharmony_ci return ((val) << MDP4_DMA_CURSOR_POS_Y__SHIFT) & MDP4_DMA_CURSOR_POS_Y__MASK; 55462306a36Sopenharmony_ci} 55562306a36Sopenharmony_ci 55662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CURSOR_BLEND_CONFIG(enum mdp4_dma i0) { return 0x00000060 + __offset_DMA(i0); } 55762306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_BLEND_CONFIG_CURSOR_EN 0x00000001 55862306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_BLEND_CONFIG_FORMAT__MASK 0x00000006 55962306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_BLEND_CONFIG_FORMAT__SHIFT 1 56062306a36Sopenharmony_cistatic inline uint32_t MDP4_DMA_CURSOR_BLEND_CONFIG_FORMAT(enum mdp4_cursor_format val) 56162306a36Sopenharmony_ci{ 56262306a36Sopenharmony_ci return ((val) << MDP4_DMA_CURSOR_BLEND_CONFIG_FORMAT__SHIFT) & MDP4_DMA_CURSOR_BLEND_CONFIG_FORMAT__MASK; 56362306a36Sopenharmony_ci} 56462306a36Sopenharmony_ci#define MDP4_DMA_CURSOR_BLEND_CONFIG_TRANSP_EN 0x00000008 56562306a36Sopenharmony_ci 56662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CURSOR_BLEND_PARAM(enum mdp4_dma i0) { return 0x00000064 + __offset_DMA(i0); } 56762306a36Sopenharmony_ci 56862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_BLEND_TRANS_LOW(enum mdp4_dma i0) { return 0x00000068 + __offset_DMA(i0); } 56962306a36Sopenharmony_ci 57062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_BLEND_TRANS_HIGH(enum mdp4_dma i0) { return 0x0000006c + __offset_DMA(i0); } 57162306a36Sopenharmony_ci 57262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_FETCH_CONFIG(enum mdp4_dma i0) { return 0x00001004 + __offset_DMA(i0); } 57362306a36Sopenharmony_ci 57462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC(enum mdp4_dma i0) { return 0x00003000 + __offset_DMA(i0); } 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_ci 57762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_MV(enum mdp4_dma i0, uint32_t i1) { return 0x00003400 + __offset_DMA(i0) + 0x4*i1; } 57862306a36Sopenharmony_ci 57962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_MV_VAL(enum mdp4_dma i0, uint32_t i1) { return 0x00003400 + __offset_DMA(i0) + 0x4*i1; } 58062306a36Sopenharmony_ci 58162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_PRE_BV(enum mdp4_dma i0, uint32_t i1) { return 0x00003500 + __offset_DMA(i0) + 0x4*i1; } 58262306a36Sopenharmony_ci 58362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_PRE_BV_VAL(enum mdp4_dma i0, uint32_t i1) { return 0x00003500 + __offset_DMA(i0) + 0x4*i1; } 58462306a36Sopenharmony_ci 58562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_POST_BV(enum mdp4_dma i0, uint32_t i1) { return 0x00003580 + __offset_DMA(i0) + 0x4*i1; } 58662306a36Sopenharmony_ci 58762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_POST_BV_VAL(enum mdp4_dma i0, uint32_t i1) { return 0x00003580 + __offset_DMA(i0) + 0x4*i1; } 58862306a36Sopenharmony_ci 58962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_PRE_LV(enum mdp4_dma i0, uint32_t i1) { return 0x00003600 + __offset_DMA(i0) + 0x4*i1; } 59062306a36Sopenharmony_ci 59162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_PRE_LV_VAL(enum mdp4_dma i0, uint32_t i1) { return 0x00003600 + __offset_DMA(i0) + 0x4*i1; } 59262306a36Sopenharmony_ci 59362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_POST_LV(enum mdp4_dma i0, uint32_t i1) { return 0x00003680 + __offset_DMA(i0) + 0x4*i1; } 59462306a36Sopenharmony_ci 59562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_DMA_CSC_POST_LV_VAL(enum mdp4_dma i0, uint32_t i1) { return 0x00003680 + __offset_DMA(i0) + 0x4*i1; } 59662306a36Sopenharmony_ci 59762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE(enum mdp4_pipe i0) { return 0x00020000 + 0x10000*i0; } 59862306a36Sopenharmony_ci 59962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRC_SIZE(enum mdp4_pipe i0) { return 0x00020000 + 0x10000*i0; } 60062306a36Sopenharmony_ci#define MDP4_PIPE_SRC_SIZE_HEIGHT__MASK 0xffff0000 60162306a36Sopenharmony_ci#define MDP4_PIPE_SRC_SIZE_HEIGHT__SHIFT 16 60262306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_SIZE_HEIGHT(uint32_t val) 60362306a36Sopenharmony_ci{ 60462306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_SIZE_HEIGHT__SHIFT) & MDP4_PIPE_SRC_SIZE_HEIGHT__MASK; 60562306a36Sopenharmony_ci} 60662306a36Sopenharmony_ci#define MDP4_PIPE_SRC_SIZE_WIDTH__MASK 0x0000ffff 60762306a36Sopenharmony_ci#define MDP4_PIPE_SRC_SIZE_WIDTH__SHIFT 0 60862306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_SIZE_WIDTH(uint32_t val) 60962306a36Sopenharmony_ci{ 61062306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_SIZE_WIDTH__SHIFT) & MDP4_PIPE_SRC_SIZE_WIDTH__MASK; 61162306a36Sopenharmony_ci} 61262306a36Sopenharmony_ci 61362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRC_XY(enum mdp4_pipe i0) { return 0x00020004 + 0x10000*i0; } 61462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_XY_Y__MASK 0xffff0000 61562306a36Sopenharmony_ci#define MDP4_PIPE_SRC_XY_Y__SHIFT 16 61662306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_XY_Y(uint32_t val) 61762306a36Sopenharmony_ci{ 61862306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_XY_Y__SHIFT) & MDP4_PIPE_SRC_XY_Y__MASK; 61962306a36Sopenharmony_ci} 62062306a36Sopenharmony_ci#define MDP4_PIPE_SRC_XY_X__MASK 0x0000ffff 62162306a36Sopenharmony_ci#define MDP4_PIPE_SRC_XY_X__SHIFT 0 62262306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_XY_X(uint32_t val) 62362306a36Sopenharmony_ci{ 62462306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_XY_X__SHIFT) & MDP4_PIPE_SRC_XY_X__MASK; 62562306a36Sopenharmony_ci} 62662306a36Sopenharmony_ci 62762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_DST_SIZE(enum mdp4_pipe i0) { return 0x00020008 + 0x10000*i0; } 62862306a36Sopenharmony_ci#define MDP4_PIPE_DST_SIZE_HEIGHT__MASK 0xffff0000 62962306a36Sopenharmony_ci#define MDP4_PIPE_DST_SIZE_HEIGHT__SHIFT 16 63062306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_DST_SIZE_HEIGHT(uint32_t val) 63162306a36Sopenharmony_ci{ 63262306a36Sopenharmony_ci return ((val) << MDP4_PIPE_DST_SIZE_HEIGHT__SHIFT) & MDP4_PIPE_DST_SIZE_HEIGHT__MASK; 63362306a36Sopenharmony_ci} 63462306a36Sopenharmony_ci#define MDP4_PIPE_DST_SIZE_WIDTH__MASK 0x0000ffff 63562306a36Sopenharmony_ci#define MDP4_PIPE_DST_SIZE_WIDTH__SHIFT 0 63662306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_DST_SIZE_WIDTH(uint32_t val) 63762306a36Sopenharmony_ci{ 63862306a36Sopenharmony_ci return ((val) << MDP4_PIPE_DST_SIZE_WIDTH__SHIFT) & MDP4_PIPE_DST_SIZE_WIDTH__MASK; 63962306a36Sopenharmony_ci} 64062306a36Sopenharmony_ci 64162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_DST_XY(enum mdp4_pipe i0) { return 0x0002000c + 0x10000*i0; } 64262306a36Sopenharmony_ci#define MDP4_PIPE_DST_XY_Y__MASK 0xffff0000 64362306a36Sopenharmony_ci#define MDP4_PIPE_DST_XY_Y__SHIFT 16 64462306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_DST_XY_Y(uint32_t val) 64562306a36Sopenharmony_ci{ 64662306a36Sopenharmony_ci return ((val) << MDP4_PIPE_DST_XY_Y__SHIFT) & MDP4_PIPE_DST_XY_Y__MASK; 64762306a36Sopenharmony_ci} 64862306a36Sopenharmony_ci#define MDP4_PIPE_DST_XY_X__MASK 0x0000ffff 64962306a36Sopenharmony_ci#define MDP4_PIPE_DST_XY_X__SHIFT 0 65062306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_DST_XY_X(uint32_t val) 65162306a36Sopenharmony_ci{ 65262306a36Sopenharmony_ci return ((val) << MDP4_PIPE_DST_XY_X__SHIFT) & MDP4_PIPE_DST_XY_X__MASK; 65362306a36Sopenharmony_ci} 65462306a36Sopenharmony_ci 65562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRCP0_BASE(enum mdp4_pipe i0) { return 0x00020010 + 0x10000*i0; } 65662306a36Sopenharmony_ci 65762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRCP1_BASE(enum mdp4_pipe i0) { return 0x00020014 + 0x10000*i0; } 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRCP2_BASE(enum mdp4_pipe i0) { return 0x00020018 + 0x10000*i0; } 66062306a36Sopenharmony_ci 66162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRCP3_BASE(enum mdp4_pipe i0) { return 0x0002001c + 0x10000*i0; } 66262306a36Sopenharmony_ci 66362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRC_STRIDE_A(enum mdp4_pipe i0) { return 0x00020040 + 0x10000*i0; } 66462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_A_P0__MASK 0x0000ffff 66562306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_A_P0__SHIFT 0 66662306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_STRIDE_A_P0(uint32_t val) 66762306a36Sopenharmony_ci{ 66862306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_STRIDE_A_P0__SHIFT) & MDP4_PIPE_SRC_STRIDE_A_P0__MASK; 66962306a36Sopenharmony_ci} 67062306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_A_P1__MASK 0xffff0000 67162306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_A_P1__SHIFT 16 67262306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_STRIDE_A_P1(uint32_t val) 67362306a36Sopenharmony_ci{ 67462306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_STRIDE_A_P1__SHIFT) & MDP4_PIPE_SRC_STRIDE_A_P1__MASK; 67562306a36Sopenharmony_ci} 67662306a36Sopenharmony_ci 67762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRC_STRIDE_B(enum mdp4_pipe i0) { return 0x00020044 + 0x10000*i0; } 67862306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_B_P2__MASK 0x0000ffff 67962306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_B_P2__SHIFT 0 68062306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_STRIDE_B_P2(uint32_t val) 68162306a36Sopenharmony_ci{ 68262306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_STRIDE_B_P2__SHIFT) & MDP4_PIPE_SRC_STRIDE_B_P2__MASK; 68362306a36Sopenharmony_ci} 68462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_B_P3__MASK 0xffff0000 68562306a36Sopenharmony_ci#define MDP4_PIPE_SRC_STRIDE_B_P3__SHIFT 16 68662306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_STRIDE_B_P3(uint32_t val) 68762306a36Sopenharmony_ci{ 68862306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_STRIDE_B_P3__SHIFT) & MDP4_PIPE_SRC_STRIDE_B_P3__MASK; 68962306a36Sopenharmony_ci} 69062306a36Sopenharmony_ci 69162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SSTILE_FRAME_SIZE(enum mdp4_pipe i0) { return 0x00020048 + 0x10000*i0; } 69262306a36Sopenharmony_ci#define MDP4_PIPE_SSTILE_FRAME_SIZE_HEIGHT__MASK 0xffff0000 69362306a36Sopenharmony_ci#define MDP4_PIPE_SSTILE_FRAME_SIZE_HEIGHT__SHIFT 16 69462306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SSTILE_FRAME_SIZE_HEIGHT(uint32_t val) 69562306a36Sopenharmony_ci{ 69662306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SSTILE_FRAME_SIZE_HEIGHT__SHIFT) & MDP4_PIPE_SSTILE_FRAME_SIZE_HEIGHT__MASK; 69762306a36Sopenharmony_ci} 69862306a36Sopenharmony_ci#define MDP4_PIPE_SSTILE_FRAME_SIZE_WIDTH__MASK 0x0000ffff 69962306a36Sopenharmony_ci#define MDP4_PIPE_SSTILE_FRAME_SIZE_WIDTH__SHIFT 0 70062306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SSTILE_FRAME_SIZE_WIDTH(uint32_t val) 70162306a36Sopenharmony_ci{ 70262306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SSTILE_FRAME_SIZE_WIDTH__SHIFT) & MDP4_PIPE_SSTILE_FRAME_SIZE_WIDTH__MASK; 70362306a36Sopenharmony_ci} 70462306a36Sopenharmony_ci 70562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRC_FORMAT(enum mdp4_pipe i0) { return 0x00020050 + 0x10000*i0; } 70662306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_G_BPC__MASK 0x00000003 70762306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_G_BPC__SHIFT 0 70862306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_G_BPC(enum mdp_bpc val) 70962306a36Sopenharmony_ci{ 71062306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_G_BPC__SHIFT) & MDP4_PIPE_SRC_FORMAT_G_BPC__MASK; 71162306a36Sopenharmony_ci} 71262306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_B_BPC__MASK 0x0000000c 71362306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_B_BPC__SHIFT 2 71462306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_B_BPC(enum mdp_bpc val) 71562306a36Sopenharmony_ci{ 71662306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_B_BPC__SHIFT) & MDP4_PIPE_SRC_FORMAT_B_BPC__MASK; 71762306a36Sopenharmony_ci} 71862306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_R_BPC__MASK 0x00000030 71962306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_R_BPC__SHIFT 4 72062306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_R_BPC(enum mdp_bpc val) 72162306a36Sopenharmony_ci{ 72262306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_R_BPC__SHIFT) & MDP4_PIPE_SRC_FORMAT_R_BPC__MASK; 72362306a36Sopenharmony_ci} 72462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_A_BPC__MASK 0x000000c0 72562306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_A_BPC__SHIFT 6 72662306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_A_BPC(enum mdp_bpc_alpha val) 72762306a36Sopenharmony_ci{ 72862306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_A_BPC__SHIFT) & MDP4_PIPE_SRC_FORMAT_A_BPC__MASK; 72962306a36Sopenharmony_ci} 73062306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_ALPHA_ENABLE 0x00000100 73162306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_CPP__MASK 0x00000600 73262306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_CPP__SHIFT 9 73362306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_CPP(uint32_t val) 73462306a36Sopenharmony_ci{ 73562306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_CPP__SHIFT) & MDP4_PIPE_SRC_FORMAT_CPP__MASK; 73662306a36Sopenharmony_ci} 73762306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_ROTATED_90 0x00001000 73862306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_UNPACK_COUNT__MASK 0x00006000 73962306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_UNPACK_COUNT__SHIFT 13 74062306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_UNPACK_COUNT(uint32_t val) 74162306a36Sopenharmony_ci{ 74262306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_UNPACK_COUNT__SHIFT) & MDP4_PIPE_SRC_FORMAT_UNPACK_COUNT__MASK; 74362306a36Sopenharmony_ci} 74462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_UNPACK_TIGHT 0x00020000 74562306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_UNPACK_ALIGN_MSB 0x00040000 74662306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_FETCH_PLANES__MASK 0x00180000 74762306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_FETCH_PLANES__SHIFT 19 74862306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_FETCH_PLANES(uint32_t val) 74962306a36Sopenharmony_ci{ 75062306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_FETCH_PLANES__SHIFT) & MDP4_PIPE_SRC_FORMAT_FETCH_PLANES__MASK; 75162306a36Sopenharmony_ci} 75262306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_SOLID_FILL 0x00400000 75362306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_CHROMA_SAMP__MASK 0x0c000000 75462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_CHROMA_SAMP__SHIFT 26 75562306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_CHROMA_SAMP(enum mdp_chroma_samp_type val) 75662306a36Sopenharmony_ci{ 75762306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_CHROMA_SAMP__SHIFT) & MDP4_PIPE_SRC_FORMAT_CHROMA_SAMP__MASK; 75862306a36Sopenharmony_ci} 75962306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_FRAME_FORMAT__MASK 0x60000000 76062306a36Sopenharmony_ci#define MDP4_PIPE_SRC_FORMAT_FRAME_FORMAT__SHIFT 29 76162306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_FORMAT_FRAME_FORMAT(enum mdp4_frame_format val) 76262306a36Sopenharmony_ci{ 76362306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_FORMAT_FRAME_FORMAT__SHIFT) & MDP4_PIPE_SRC_FORMAT_FRAME_FORMAT__MASK; 76462306a36Sopenharmony_ci} 76562306a36Sopenharmony_ci 76662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SRC_UNPACK(enum mdp4_pipe i0) { return 0x00020054 + 0x10000*i0; } 76762306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM0__MASK 0x000000ff 76862306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM0__SHIFT 0 76962306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_UNPACK_ELEM0(uint32_t val) 77062306a36Sopenharmony_ci{ 77162306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_UNPACK_ELEM0__SHIFT) & MDP4_PIPE_SRC_UNPACK_ELEM0__MASK; 77262306a36Sopenharmony_ci} 77362306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM1__MASK 0x0000ff00 77462306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM1__SHIFT 8 77562306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_UNPACK_ELEM1(uint32_t val) 77662306a36Sopenharmony_ci{ 77762306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_UNPACK_ELEM1__SHIFT) & MDP4_PIPE_SRC_UNPACK_ELEM1__MASK; 77862306a36Sopenharmony_ci} 77962306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM2__MASK 0x00ff0000 78062306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM2__SHIFT 16 78162306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_UNPACK_ELEM2(uint32_t val) 78262306a36Sopenharmony_ci{ 78362306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_UNPACK_ELEM2__SHIFT) & MDP4_PIPE_SRC_UNPACK_ELEM2__MASK; 78462306a36Sopenharmony_ci} 78562306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM3__MASK 0xff000000 78662306a36Sopenharmony_ci#define MDP4_PIPE_SRC_UNPACK_ELEM3__SHIFT 24 78762306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_SRC_UNPACK_ELEM3(uint32_t val) 78862306a36Sopenharmony_ci{ 78962306a36Sopenharmony_ci return ((val) << MDP4_PIPE_SRC_UNPACK_ELEM3__SHIFT) & MDP4_PIPE_SRC_UNPACK_ELEM3__MASK; 79062306a36Sopenharmony_ci} 79162306a36Sopenharmony_ci 79262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_OP_MODE(enum mdp4_pipe i0) { return 0x00020058 + 0x10000*i0; } 79362306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SCALEX_EN 0x00000001 79462306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SCALEY_EN 0x00000002 79562306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SCALEX_UNIT_SEL__MASK 0x0000000c 79662306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SCALEX_UNIT_SEL__SHIFT 2 79762306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_OP_MODE_SCALEX_UNIT_SEL(enum mdp4_scale_unit val) 79862306a36Sopenharmony_ci{ 79962306a36Sopenharmony_ci return ((val) << MDP4_PIPE_OP_MODE_SCALEX_UNIT_SEL__SHIFT) & MDP4_PIPE_OP_MODE_SCALEX_UNIT_SEL__MASK; 80062306a36Sopenharmony_ci} 80162306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SCALEY_UNIT_SEL__MASK 0x00000030 80262306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SCALEY_UNIT_SEL__SHIFT 4 80362306a36Sopenharmony_cistatic inline uint32_t MDP4_PIPE_OP_MODE_SCALEY_UNIT_SEL(enum mdp4_scale_unit val) 80462306a36Sopenharmony_ci{ 80562306a36Sopenharmony_ci return ((val) << MDP4_PIPE_OP_MODE_SCALEY_UNIT_SEL__SHIFT) & MDP4_PIPE_OP_MODE_SCALEY_UNIT_SEL__MASK; 80662306a36Sopenharmony_ci} 80762306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_SRC_YCBCR 0x00000200 80862306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_DST_YCBCR 0x00000400 80962306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_CSC_EN 0x00000800 81062306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_FLIP_LR 0x00002000 81162306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_FLIP_UD 0x00004000 81262306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_DITHER_EN 0x00008000 81362306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_IGC_LUT_EN 0x00010000 81462306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_DEINT_EN 0x00040000 81562306a36Sopenharmony_ci#define MDP4_PIPE_OP_MODE_DEINT_ODD_REF 0x00080000 81662306a36Sopenharmony_ci 81762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_PHASEX_STEP(enum mdp4_pipe i0) { return 0x0002005c + 0x10000*i0; } 81862306a36Sopenharmony_ci 81962306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_PHASEY_STEP(enum mdp4_pipe i0) { return 0x00020060 + 0x10000*i0; } 82062306a36Sopenharmony_ci 82162306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_FETCH_CONFIG(enum mdp4_pipe i0) { return 0x00021004 + 0x10000*i0; } 82262306a36Sopenharmony_ci 82362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_SOLID_COLOR(enum mdp4_pipe i0) { return 0x00021008 + 0x10000*i0; } 82462306a36Sopenharmony_ci 82562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC(enum mdp4_pipe i0) { return 0x00024000 + 0x10000*i0; } 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_ci 82862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_MV(enum mdp4_pipe i0, uint32_t i1) { return 0x00024400 + 0x10000*i0 + 0x4*i1; } 82962306a36Sopenharmony_ci 83062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_MV_VAL(enum mdp4_pipe i0, uint32_t i1) { return 0x00024400 + 0x10000*i0 + 0x4*i1; } 83162306a36Sopenharmony_ci 83262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_PRE_BV(enum mdp4_pipe i0, uint32_t i1) { return 0x00024500 + 0x10000*i0 + 0x4*i1; } 83362306a36Sopenharmony_ci 83462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_PRE_BV_VAL(enum mdp4_pipe i0, uint32_t i1) { return 0x00024500 + 0x10000*i0 + 0x4*i1; } 83562306a36Sopenharmony_ci 83662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_POST_BV(enum mdp4_pipe i0, uint32_t i1) { return 0x00024580 + 0x10000*i0 + 0x4*i1; } 83762306a36Sopenharmony_ci 83862306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_POST_BV_VAL(enum mdp4_pipe i0, uint32_t i1) { return 0x00024580 + 0x10000*i0 + 0x4*i1; } 83962306a36Sopenharmony_ci 84062306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_PRE_LV(enum mdp4_pipe i0, uint32_t i1) { return 0x00024600 + 0x10000*i0 + 0x4*i1; } 84162306a36Sopenharmony_ci 84262306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_PRE_LV_VAL(enum mdp4_pipe i0, uint32_t i1) { return 0x00024600 + 0x10000*i0 + 0x4*i1; } 84362306a36Sopenharmony_ci 84462306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_POST_LV(enum mdp4_pipe i0, uint32_t i1) { return 0x00024680 + 0x10000*i0 + 0x4*i1; } 84562306a36Sopenharmony_ci 84662306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_PIPE_CSC_POST_LV_VAL(enum mdp4_pipe i0, uint32_t i1) { return 0x00024680 + 0x10000*i0 + 0x4*i1; } 84762306a36Sopenharmony_ci 84862306a36Sopenharmony_ci#define REG_MDP4_LCDC 0x000c0000 84962306a36Sopenharmony_ci 85062306a36Sopenharmony_ci#define REG_MDP4_LCDC_ENABLE 0x000c0000 85162306a36Sopenharmony_ci 85262306a36Sopenharmony_ci#define REG_MDP4_LCDC_HSYNC_CTRL 0x000c0004 85362306a36Sopenharmony_ci#define MDP4_LCDC_HSYNC_CTRL_PULSEW__MASK 0x0000ffff 85462306a36Sopenharmony_ci#define MDP4_LCDC_HSYNC_CTRL_PULSEW__SHIFT 0 85562306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_HSYNC_CTRL_PULSEW(uint32_t val) 85662306a36Sopenharmony_ci{ 85762306a36Sopenharmony_ci return ((val) << MDP4_LCDC_HSYNC_CTRL_PULSEW__SHIFT) & MDP4_LCDC_HSYNC_CTRL_PULSEW__MASK; 85862306a36Sopenharmony_ci} 85962306a36Sopenharmony_ci#define MDP4_LCDC_HSYNC_CTRL_PERIOD__MASK 0xffff0000 86062306a36Sopenharmony_ci#define MDP4_LCDC_HSYNC_CTRL_PERIOD__SHIFT 16 86162306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_HSYNC_CTRL_PERIOD(uint32_t val) 86262306a36Sopenharmony_ci{ 86362306a36Sopenharmony_ci return ((val) << MDP4_LCDC_HSYNC_CTRL_PERIOD__SHIFT) & MDP4_LCDC_HSYNC_CTRL_PERIOD__MASK; 86462306a36Sopenharmony_ci} 86562306a36Sopenharmony_ci 86662306a36Sopenharmony_ci#define REG_MDP4_LCDC_VSYNC_PERIOD 0x000c0008 86762306a36Sopenharmony_ci 86862306a36Sopenharmony_ci#define REG_MDP4_LCDC_VSYNC_LEN 0x000c000c 86962306a36Sopenharmony_ci 87062306a36Sopenharmony_ci#define REG_MDP4_LCDC_DISPLAY_HCTRL 0x000c0010 87162306a36Sopenharmony_ci#define MDP4_LCDC_DISPLAY_HCTRL_START__MASK 0x0000ffff 87262306a36Sopenharmony_ci#define MDP4_LCDC_DISPLAY_HCTRL_START__SHIFT 0 87362306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_DISPLAY_HCTRL_START(uint32_t val) 87462306a36Sopenharmony_ci{ 87562306a36Sopenharmony_ci return ((val) << MDP4_LCDC_DISPLAY_HCTRL_START__SHIFT) & MDP4_LCDC_DISPLAY_HCTRL_START__MASK; 87662306a36Sopenharmony_ci} 87762306a36Sopenharmony_ci#define MDP4_LCDC_DISPLAY_HCTRL_END__MASK 0xffff0000 87862306a36Sopenharmony_ci#define MDP4_LCDC_DISPLAY_HCTRL_END__SHIFT 16 87962306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_DISPLAY_HCTRL_END(uint32_t val) 88062306a36Sopenharmony_ci{ 88162306a36Sopenharmony_ci return ((val) << MDP4_LCDC_DISPLAY_HCTRL_END__SHIFT) & MDP4_LCDC_DISPLAY_HCTRL_END__MASK; 88262306a36Sopenharmony_ci} 88362306a36Sopenharmony_ci 88462306a36Sopenharmony_ci#define REG_MDP4_LCDC_DISPLAY_VSTART 0x000c0014 88562306a36Sopenharmony_ci 88662306a36Sopenharmony_ci#define REG_MDP4_LCDC_DISPLAY_VEND 0x000c0018 88762306a36Sopenharmony_ci 88862306a36Sopenharmony_ci#define REG_MDP4_LCDC_ACTIVE_HCTL 0x000c001c 88962306a36Sopenharmony_ci#define MDP4_LCDC_ACTIVE_HCTL_START__MASK 0x00007fff 89062306a36Sopenharmony_ci#define MDP4_LCDC_ACTIVE_HCTL_START__SHIFT 0 89162306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_ACTIVE_HCTL_START(uint32_t val) 89262306a36Sopenharmony_ci{ 89362306a36Sopenharmony_ci return ((val) << MDP4_LCDC_ACTIVE_HCTL_START__SHIFT) & MDP4_LCDC_ACTIVE_HCTL_START__MASK; 89462306a36Sopenharmony_ci} 89562306a36Sopenharmony_ci#define MDP4_LCDC_ACTIVE_HCTL_END__MASK 0x7fff0000 89662306a36Sopenharmony_ci#define MDP4_LCDC_ACTIVE_HCTL_END__SHIFT 16 89762306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_ACTIVE_HCTL_END(uint32_t val) 89862306a36Sopenharmony_ci{ 89962306a36Sopenharmony_ci return ((val) << MDP4_LCDC_ACTIVE_HCTL_END__SHIFT) & MDP4_LCDC_ACTIVE_HCTL_END__MASK; 90062306a36Sopenharmony_ci} 90162306a36Sopenharmony_ci#define MDP4_LCDC_ACTIVE_HCTL_ACTIVE_START_X 0x80000000 90262306a36Sopenharmony_ci 90362306a36Sopenharmony_ci#define REG_MDP4_LCDC_ACTIVE_VSTART 0x000c0020 90462306a36Sopenharmony_ci 90562306a36Sopenharmony_ci#define REG_MDP4_LCDC_ACTIVE_VEND 0x000c0024 90662306a36Sopenharmony_ci 90762306a36Sopenharmony_ci#define REG_MDP4_LCDC_BORDER_CLR 0x000c0028 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_ci#define REG_MDP4_LCDC_UNDERFLOW_CLR 0x000c002c 91062306a36Sopenharmony_ci#define MDP4_LCDC_UNDERFLOW_CLR_COLOR__MASK 0x00ffffff 91162306a36Sopenharmony_ci#define MDP4_LCDC_UNDERFLOW_CLR_COLOR__SHIFT 0 91262306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_UNDERFLOW_CLR_COLOR(uint32_t val) 91362306a36Sopenharmony_ci{ 91462306a36Sopenharmony_ci return ((val) << MDP4_LCDC_UNDERFLOW_CLR_COLOR__SHIFT) & MDP4_LCDC_UNDERFLOW_CLR_COLOR__MASK; 91562306a36Sopenharmony_ci} 91662306a36Sopenharmony_ci#define MDP4_LCDC_UNDERFLOW_CLR_ENABLE_RECOVERY 0x80000000 91762306a36Sopenharmony_ci 91862306a36Sopenharmony_ci#define REG_MDP4_LCDC_HSYNC_SKEW 0x000c0030 91962306a36Sopenharmony_ci 92062306a36Sopenharmony_ci#define REG_MDP4_LCDC_TEST_CNTL 0x000c0034 92162306a36Sopenharmony_ci 92262306a36Sopenharmony_ci#define REG_MDP4_LCDC_CTRL_POLARITY 0x000c0038 92362306a36Sopenharmony_ci#define MDP4_LCDC_CTRL_POLARITY_HSYNC_LOW 0x00000001 92462306a36Sopenharmony_ci#define MDP4_LCDC_CTRL_POLARITY_VSYNC_LOW 0x00000002 92562306a36Sopenharmony_ci#define MDP4_LCDC_CTRL_POLARITY_DATA_EN_LOW 0x00000004 92662306a36Sopenharmony_ci 92762306a36Sopenharmony_ci#define REG_MDP4_LCDC_LVDS_INTF_CTL 0x000c2000 92862306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_MODE_SEL 0x00000004 92962306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_RGB_OUT 0x00000008 93062306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH_SWAP 0x00000010 93162306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH1_RES_BIT 0x00000020 93262306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH2_RES_BIT 0x00000040 93362306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_ENABLE 0x00000080 93462306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH1_DATA_LANE0_EN 0x00000100 93562306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH1_DATA_LANE1_EN 0x00000200 93662306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH1_DATA_LANE2_EN 0x00000400 93762306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH1_DATA_LANE3_EN 0x00000800 93862306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH2_DATA_LANE0_EN 0x00001000 93962306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH2_DATA_LANE1_EN 0x00002000 94062306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH2_DATA_LANE2_EN 0x00004000 94162306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH2_DATA_LANE3_EN 0x00008000 94262306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH1_CLK_LANE_EN 0x00010000 94362306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_INTF_CTL_CH2_CLK_LANE_EN 0x00020000 94462306a36Sopenharmony_ci 94562306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_LCDC_LVDS_MUX_CTL(uint32_t i0) { return 0x000c2014 + 0x8*i0; } 94662306a36Sopenharmony_ci 94762306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_LCDC_LVDS_MUX_CTL_3_TO_0(uint32_t i0) { return 0x000c2014 + 0x8*i0; } 94862306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT0__MASK 0x000000ff 94962306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT0__SHIFT 0 95062306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT0(uint32_t val) 95162306a36Sopenharmony_ci{ 95262306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT0__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT0__MASK; 95362306a36Sopenharmony_ci} 95462306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT1__MASK 0x0000ff00 95562306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT1__SHIFT 8 95662306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT1(uint32_t val) 95762306a36Sopenharmony_ci{ 95862306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT1__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT1__MASK; 95962306a36Sopenharmony_ci} 96062306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT2__MASK 0x00ff0000 96162306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT2__SHIFT 16 96262306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT2(uint32_t val) 96362306a36Sopenharmony_ci{ 96462306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT2__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT2__MASK; 96562306a36Sopenharmony_ci} 96662306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT3__MASK 0xff000000 96762306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT3__SHIFT 24 96862306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT3(uint32_t val) 96962306a36Sopenharmony_ci{ 97062306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT3__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_3_TO_0_BIT3__MASK; 97162306a36Sopenharmony_ci} 97262306a36Sopenharmony_ci 97362306a36Sopenharmony_cistatic inline uint32_t REG_MDP4_LCDC_LVDS_MUX_CTL_6_TO_4(uint32_t i0) { return 0x000c2018 + 0x8*i0; } 97462306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT4__MASK 0x000000ff 97562306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT4__SHIFT 0 97662306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT4(uint32_t val) 97762306a36Sopenharmony_ci{ 97862306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT4__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT4__MASK; 97962306a36Sopenharmony_ci} 98062306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT5__MASK 0x0000ff00 98162306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT5__SHIFT 8 98262306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT5(uint32_t val) 98362306a36Sopenharmony_ci{ 98462306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT5__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT5__MASK; 98562306a36Sopenharmony_ci} 98662306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT6__MASK 0x00ff0000 98762306a36Sopenharmony_ci#define MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT6__SHIFT 16 98862306a36Sopenharmony_cistatic inline uint32_t MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT6(uint32_t val) 98962306a36Sopenharmony_ci{ 99062306a36Sopenharmony_ci return ((val) << MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT6__SHIFT) & MDP4_LCDC_LVDS_MUX_CTL_6_TO_4_BIT6__MASK; 99162306a36Sopenharmony_ci} 99262306a36Sopenharmony_ci 99362306a36Sopenharmony_ci#define REG_MDP4_LCDC_LVDS_PHY_RESET 0x000c2034 99462306a36Sopenharmony_ci 99562306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_0 0x000c3000 99662306a36Sopenharmony_ci 99762306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_1 0x000c3004 99862306a36Sopenharmony_ci 99962306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_2 0x000c3008 100062306a36Sopenharmony_ci 100162306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_3 0x000c300c 100262306a36Sopenharmony_ci 100362306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_5 0x000c3014 100462306a36Sopenharmony_ci 100562306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_6 0x000c3018 100662306a36Sopenharmony_ci 100762306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_7 0x000c301c 100862306a36Sopenharmony_ci 100962306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_8 0x000c3020 101062306a36Sopenharmony_ci 101162306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_CTRL_9 0x000c3024 101262306a36Sopenharmony_ci 101362306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_PLL_LOCKED 0x000c3080 101462306a36Sopenharmony_ci 101562306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_CFG2 0x000c3108 101662306a36Sopenharmony_ci 101762306a36Sopenharmony_ci#define REG_MDP4_LVDS_PHY_CFG0 0x000c3100 101862306a36Sopenharmony_ci#define MDP4_LVDS_PHY_CFG0_SERIALIZATION_ENBLE 0x00000010 101962306a36Sopenharmony_ci#define MDP4_LVDS_PHY_CFG0_CHANNEL0 0x00000040 102062306a36Sopenharmony_ci#define MDP4_LVDS_PHY_CFG0_CHANNEL1 0x00000080 102162306a36Sopenharmony_ci 102262306a36Sopenharmony_ci#define REG_MDP4_DTV 0x000d0000 102362306a36Sopenharmony_ci 102462306a36Sopenharmony_ci#define REG_MDP4_DTV_ENABLE 0x000d0000 102562306a36Sopenharmony_ci 102662306a36Sopenharmony_ci#define REG_MDP4_DTV_HSYNC_CTRL 0x000d0004 102762306a36Sopenharmony_ci#define MDP4_DTV_HSYNC_CTRL_PULSEW__MASK 0x0000ffff 102862306a36Sopenharmony_ci#define MDP4_DTV_HSYNC_CTRL_PULSEW__SHIFT 0 102962306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_HSYNC_CTRL_PULSEW(uint32_t val) 103062306a36Sopenharmony_ci{ 103162306a36Sopenharmony_ci return ((val) << MDP4_DTV_HSYNC_CTRL_PULSEW__SHIFT) & MDP4_DTV_HSYNC_CTRL_PULSEW__MASK; 103262306a36Sopenharmony_ci} 103362306a36Sopenharmony_ci#define MDP4_DTV_HSYNC_CTRL_PERIOD__MASK 0xffff0000 103462306a36Sopenharmony_ci#define MDP4_DTV_HSYNC_CTRL_PERIOD__SHIFT 16 103562306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_HSYNC_CTRL_PERIOD(uint32_t val) 103662306a36Sopenharmony_ci{ 103762306a36Sopenharmony_ci return ((val) << MDP4_DTV_HSYNC_CTRL_PERIOD__SHIFT) & MDP4_DTV_HSYNC_CTRL_PERIOD__MASK; 103862306a36Sopenharmony_ci} 103962306a36Sopenharmony_ci 104062306a36Sopenharmony_ci#define REG_MDP4_DTV_VSYNC_PERIOD 0x000d0008 104162306a36Sopenharmony_ci 104262306a36Sopenharmony_ci#define REG_MDP4_DTV_VSYNC_LEN 0x000d000c 104362306a36Sopenharmony_ci 104462306a36Sopenharmony_ci#define REG_MDP4_DTV_DISPLAY_HCTRL 0x000d0018 104562306a36Sopenharmony_ci#define MDP4_DTV_DISPLAY_HCTRL_START__MASK 0x0000ffff 104662306a36Sopenharmony_ci#define MDP4_DTV_DISPLAY_HCTRL_START__SHIFT 0 104762306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_DISPLAY_HCTRL_START(uint32_t val) 104862306a36Sopenharmony_ci{ 104962306a36Sopenharmony_ci return ((val) << MDP4_DTV_DISPLAY_HCTRL_START__SHIFT) & MDP4_DTV_DISPLAY_HCTRL_START__MASK; 105062306a36Sopenharmony_ci} 105162306a36Sopenharmony_ci#define MDP4_DTV_DISPLAY_HCTRL_END__MASK 0xffff0000 105262306a36Sopenharmony_ci#define MDP4_DTV_DISPLAY_HCTRL_END__SHIFT 16 105362306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_DISPLAY_HCTRL_END(uint32_t val) 105462306a36Sopenharmony_ci{ 105562306a36Sopenharmony_ci return ((val) << MDP4_DTV_DISPLAY_HCTRL_END__SHIFT) & MDP4_DTV_DISPLAY_HCTRL_END__MASK; 105662306a36Sopenharmony_ci} 105762306a36Sopenharmony_ci 105862306a36Sopenharmony_ci#define REG_MDP4_DTV_DISPLAY_VSTART 0x000d001c 105962306a36Sopenharmony_ci 106062306a36Sopenharmony_ci#define REG_MDP4_DTV_DISPLAY_VEND 0x000d0020 106162306a36Sopenharmony_ci 106262306a36Sopenharmony_ci#define REG_MDP4_DTV_ACTIVE_HCTL 0x000d002c 106362306a36Sopenharmony_ci#define MDP4_DTV_ACTIVE_HCTL_START__MASK 0x00007fff 106462306a36Sopenharmony_ci#define MDP4_DTV_ACTIVE_HCTL_START__SHIFT 0 106562306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_ACTIVE_HCTL_START(uint32_t val) 106662306a36Sopenharmony_ci{ 106762306a36Sopenharmony_ci return ((val) << MDP4_DTV_ACTIVE_HCTL_START__SHIFT) & MDP4_DTV_ACTIVE_HCTL_START__MASK; 106862306a36Sopenharmony_ci} 106962306a36Sopenharmony_ci#define MDP4_DTV_ACTIVE_HCTL_END__MASK 0x7fff0000 107062306a36Sopenharmony_ci#define MDP4_DTV_ACTIVE_HCTL_END__SHIFT 16 107162306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_ACTIVE_HCTL_END(uint32_t val) 107262306a36Sopenharmony_ci{ 107362306a36Sopenharmony_ci return ((val) << MDP4_DTV_ACTIVE_HCTL_END__SHIFT) & MDP4_DTV_ACTIVE_HCTL_END__MASK; 107462306a36Sopenharmony_ci} 107562306a36Sopenharmony_ci#define MDP4_DTV_ACTIVE_HCTL_ACTIVE_START_X 0x80000000 107662306a36Sopenharmony_ci 107762306a36Sopenharmony_ci#define REG_MDP4_DTV_ACTIVE_VSTART 0x000d0030 107862306a36Sopenharmony_ci 107962306a36Sopenharmony_ci#define REG_MDP4_DTV_ACTIVE_VEND 0x000d0038 108062306a36Sopenharmony_ci 108162306a36Sopenharmony_ci#define REG_MDP4_DTV_BORDER_CLR 0x000d0040 108262306a36Sopenharmony_ci 108362306a36Sopenharmony_ci#define REG_MDP4_DTV_UNDERFLOW_CLR 0x000d0044 108462306a36Sopenharmony_ci#define MDP4_DTV_UNDERFLOW_CLR_COLOR__MASK 0x00ffffff 108562306a36Sopenharmony_ci#define MDP4_DTV_UNDERFLOW_CLR_COLOR__SHIFT 0 108662306a36Sopenharmony_cistatic inline uint32_t MDP4_DTV_UNDERFLOW_CLR_COLOR(uint32_t val) 108762306a36Sopenharmony_ci{ 108862306a36Sopenharmony_ci return ((val) << MDP4_DTV_UNDERFLOW_CLR_COLOR__SHIFT) & MDP4_DTV_UNDERFLOW_CLR_COLOR__MASK; 108962306a36Sopenharmony_ci} 109062306a36Sopenharmony_ci#define MDP4_DTV_UNDERFLOW_CLR_ENABLE_RECOVERY 0x80000000 109162306a36Sopenharmony_ci 109262306a36Sopenharmony_ci#define REG_MDP4_DTV_HSYNC_SKEW 0x000d0048 109362306a36Sopenharmony_ci 109462306a36Sopenharmony_ci#define REG_MDP4_DTV_TEST_CNTL 0x000d004c 109562306a36Sopenharmony_ci 109662306a36Sopenharmony_ci#define REG_MDP4_DTV_CTRL_POLARITY 0x000d0050 109762306a36Sopenharmony_ci#define MDP4_DTV_CTRL_POLARITY_HSYNC_LOW 0x00000001 109862306a36Sopenharmony_ci#define MDP4_DTV_CTRL_POLARITY_VSYNC_LOW 0x00000002 109962306a36Sopenharmony_ci#define MDP4_DTV_CTRL_POLARITY_DATA_EN_LOW 0x00000004 110062306a36Sopenharmony_ci 110162306a36Sopenharmony_ci#define REG_MDP4_DSI 0x000e0000 110262306a36Sopenharmony_ci 110362306a36Sopenharmony_ci#define REG_MDP4_DSI_ENABLE 0x000e0000 110462306a36Sopenharmony_ci 110562306a36Sopenharmony_ci#define REG_MDP4_DSI_HSYNC_CTRL 0x000e0004 110662306a36Sopenharmony_ci#define MDP4_DSI_HSYNC_CTRL_PULSEW__MASK 0x0000ffff 110762306a36Sopenharmony_ci#define MDP4_DSI_HSYNC_CTRL_PULSEW__SHIFT 0 110862306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_HSYNC_CTRL_PULSEW(uint32_t val) 110962306a36Sopenharmony_ci{ 111062306a36Sopenharmony_ci return ((val) << MDP4_DSI_HSYNC_CTRL_PULSEW__SHIFT) & MDP4_DSI_HSYNC_CTRL_PULSEW__MASK; 111162306a36Sopenharmony_ci} 111262306a36Sopenharmony_ci#define MDP4_DSI_HSYNC_CTRL_PERIOD__MASK 0xffff0000 111362306a36Sopenharmony_ci#define MDP4_DSI_HSYNC_CTRL_PERIOD__SHIFT 16 111462306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_HSYNC_CTRL_PERIOD(uint32_t val) 111562306a36Sopenharmony_ci{ 111662306a36Sopenharmony_ci return ((val) << MDP4_DSI_HSYNC_CTRL_PERIOD__SHIFT) & MDP4_DSI_HSYNC_CTRL_PERIOD__MASK; 111762306a36Sopenharmony_ci} 111862306a36Sopenharmony_ci 111962306a36Sopenharmony_ci#define REG_MDP4_DSI_VSYNC_PERIOD 0x000e0008 112062306a36Sopenharmony_ci 112162306a36Sopenharmony_ci#define REG_MDP4_DSI_VSYNC_LEN 0x000e000c 112262306a36Sopenharmony_ci 112362306a36Sopenharmony_ci#define REG_MDP4_DSI_DISPLAY_HCTRL 0x000e0010 112462306a36Sopenharmony_ci#define MDP4_DSI_DISPLAY_HCTRL_START__MASK 0x0000ffff 112562306a36Sopenharmony_ci#define MDP4_DSI_DISPLAY_HCTRL_START__SHIFT 0 112662306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_DISPLAY_HCTRL_START(uint32_t val) 112762306a36Sopenharmony_ci{ 112862306a36Sopenharmony_ci return ((val) << MDP4_DSI_DISPLAY_HCTRL_START__SHIFT) & MDP4_DSI_DISPLAY_HCTRL_START__MASK; 112962306a36Sopenharmony_ci} 113062306a36Sopenharmony_ci#define MDP4_DSI_DISPLAY_HCTRL_END__MASK 0xffff0000 113162306a36Sopenharmony_ci#define MDP4_DSI_DISPLAY_HCTRL_END__SHIFT 16 113262306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_DISPLAY_HCTRL_END(uint32_t val) 113362306a36Sopenharmony_ci{ 113462306a36Sopenharmony_ci return ((val) << MDP4_DSI_DISPLAY_HCTRL_END__SHIFT) & MDP4_DSI_DISPLAY_HCTRL_END__MASK; 113562306a36Sopenharmony_ci} 113662306a36Sopenharmony_ci 113762306a36Sopenharmony_ci#define REG_MDP4_DSI_DISPLAY_VSTART 0x000e0014 113862306a36Sopenharmony_ci 113962306a36Sopenharmony_ci#define REG_MDP4_DSI_DISPLAY_VEND 0x000e0018 114062306a36Sopenharmony_ci 114162306a36Sopenharmony_ci#define REG_MDP4_DSI_ACTIVE_HCTL 0x000e001c 114262306a36Sopenharmony_ci#define MDP4_DSI_ACTIVE_HCTL_START__MASK 0x00007fff 114362306a36Sopenharmony_ci#define MDP4_DSI_ACTIVE_HCTL_START__SHIFT 0 114462306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_ACTIVE_HCTL_START(uint32_t val) 114562306a36Sopenharmony_ci{ 114662306a36Sopenharmony_ci return ((val) << MDP4_DSI_ACTIVE_HCTL_START__SHIFT) & MDP4_DSI_ACTIVE_HCTL_START__MASK; 114762306a36Sopenharmony_ci} 114862306a36Sopenharmony_ci#define MDP4_DSI_ACTIVE_HCTL_END__MASK 0x7fff0000 114962306a36Sopenharmony_ci#define MDP4_DSI_ACTIVE_HCTL_END__SHIFT 16 115062306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_ACTIVE_HCTL_END(uint32_t val) 115162306a36Sopenharmony_ci{ 115262306a36Sopenharmony_ci return ((val) << MDP4_DSI_ACTIVE_HCTL_END__SHIFT) & MDP4_DSI_ACTIVE_HCTL_END__MASK; 115362306a36Sopenharmony_ci} 115462306a36Sopenharmony_ci#define MDP4_DSI_ACTIVE_HCTL_ACTIVE_START_X 0x80000000 115562306a36Sopenharmony_ci 115662306a36Sopenharmony_ci#define REG_MDP4_DSI_ACTIVE_VSTART 0x000e0020 115762306a36Sopenharmony_ci 115862306a36Sopenharmony_ci#define REG_MDP4_DSI_ACTIVE_VEND 0x000e0024 115962306a36Sopenharmony_ci 116062306a36Sopenharmony_ci#define REG_MDP4_DSI_BORDER_CLR 0x000e0028 116162306a36Sopenharmony_ci 116262306a36Sopenharmony_ci#define REG_MDP4_DSI_UNDERFLOW_CLR 0x000e002c 116362306a36Sopenharmony_ci#define MDP4_DSI_UNDERFLOW_CLR_COLOR__MASK 0x00ffffff 116462306a36Sopenharmony_ci#define MDP4_DSI_UNDERFLOW_CLR_COLOR__SHIFT 0 116562306a36Sopenharmony_cistatic inline uint32_t MDP4_DSI_UNDERFLOW_CLR_COLOR(uint32_t val) 116662306a36Sopenharmony_ci{ 116762306a36Sopenharmony_ci return ((val) << MDP4_DSI_UNDERFLOW_CLR_COLOR__SHIFT) & MDP4_DSI_UNDERFLOW_CLR_COLOR__MASK; 116862306a36Sopenharmony_ci} 116962306a36Sopenharmony_ci#define MDP4_DSI_UNDERFLOW_CLR_ENABLE_RECOVERY 0x80000000 117062306a36Sopenharmony_ci 117162306a36Sopenharmony_ci#define REG_MDP4_DSI_HSYNC_SKEW 0x000e0030 117262306a36Sopenharmony_ci 117362306a36Sopenharmony_ci#define REG_MDP4_DSI_TEST_CNTL 0x000e0034 117462306a36Sopenharmony_ci 117562306a36Sopenharmony_ci#define REG_MDP4_DSI_CTRL_POLARITY 0x000e0038 117662306a36Sopenharmony_ci#define MDP4_DSI_CTRL_POLARITY_HSYNC_LOW 0x00000001 117762306a36Sopenharmony_ci#define MDP4_DSI_CTRL_POLARITY_VSYNC_LOW 0x00000002 117862306a36Sopenharmony_ci#define MDP4_DSI_CTRL_POLARITY_DATA_EN_LOW 0x00000004 117962306a36Sopenharmony_ci 118062306a36Sopenharmony_ci 118162306a36Sopenharmony_ci#endif /* MDP4_XML */ 1182