162306a36Sopenharmony_ci#ifndef MDP5_XML 262306a36Sopenharmony_ci#define MDP5_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 mdp5_intf_type { 5762306a36Sopenharmony_ci INTF_DISABLED = 0, 5862306a36Sopenharmony_ci INTF_DSI = 1, 5962306a36Sopenharmony_ci INTF_HDMI = 3, 6062306a36Sopenharmony_ci INTF_LCDC = 5, 6162306a36Sopenharmony_ci INTF_eDP = 9, 6262306a36Sopenharmony_ci INTF_VIRTUAL = 100, 6362306a36Sopenharmony_ci INTF_WB = 101, 6462306a36Sopenharmony_ci}; 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_cienum mdp5_intfnum { 6762306a36Sopenharmony_ci NO_INTF = 0, 6862306a36Sopenharmony_ci INTF0 = 1, 6962306a36Sopenharmony_ci INTF1 = 2, 7062306a36Sopenharmony_ci INTF2 = 3, 7162306a36Sopenharmony_ci INTF3 = 4, 7262306a36Sopenharmony_ci}; 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_cienum mdp5_pipe { 7562306a36Sopenharmony_ci SSPP_NONE = 0, 7662306a36Sopenharmony_ci SSPP_VIG0 = 1, 7762306a36Sopenharmony_ci SSPP_VIG1 = 2, 7862306a36Sopenharmony_ci SSPP_VIG2 = 3, 7962306a36Sopenharmony_ci SSPP_RGB0 = 4, 8062306a36Sopenharmony_ci SSPP_RGB1 = 5, 8162306a36Sopenharmony_ci SSPP_RGB2 = 6, 8262306a36Sopenharmony_ci SSPP_DMA0 = 7, 8362306a36Sopenharmony_ci SSPP_DMA1 = 8, 8462306a36Sopenharmony_ci SSPP_VIG3 = 9, 8562306a36Sopenharmony_ci SSPP_RGB3 = 10, 8662306a36Sopenharmony_ci SSPP_CURSOR0 = 11, 8762306a36Sopenharmony_ci SSPP_CURSOR1 = 12, 8862306a36Sopenharmony_ci}; 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_cienum mdp5_format { 9162306a36Sopenharmony_ci DUMMY = 0, 9262306a36Sopenharmony_ci}; 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_cienum mdp5_ctl_mode { 9562306a36Sopenharmony_ci MODE_NONE = 0, 9662306a36Sopenharmony_ci MODE_WB_0_BLOCK = 1, 9762306a36Sopenharmony_ci MODE_WB_1_BLOCK = 2, 9862306a36Sopenharmony_ci MODE_WB_0_LINE = 3, 9962306a36Sopenharmony_ci MODE_WB_1_LINE = 4, 10062306a36Sopenharmony_ci MODE_WB_2_LINE = 5, 10162306a36Sopenharmony_ci}; 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_cienum mdp5_pack_3d { 10462306a36Sopenharmony_ci PACK_3D_FRAME_INT = 0, 10562306a36Sopenharmony_ci PACK_3D_H_ROW_INT = 1, 10662306a36Sopenharmony_ci PACK_3D_V_ROW_INT = 2, 10762306a36Sopenharmony_ci PACK_3D_COL_INT = 3, 10862306a36Sopenharmony_ci}; 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_cienum mdp5_scale_filter { 11162306a36Sopenharmony_ci SCALE_FILTER_NEAREST = 0, 11262306a36Sopenharmony_ci SCALE_FILTER_BIL = 1, 11362306a36Sopenharmony_ci SCALE_FILTER_PCMN = 2, 11462306a36Sopenharmony_ci SCALE_FILTER_CA = 3, 11562306a36Sopenharmony_ci}; 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_cienum mdp5_pipe_bwc { 11862306a36Sopenharmony_ci BWC_LOSSLESS = 0, 11962306a36Sopenharmony_ci BWC_Q_HIGH = 1, 12062306a36Sopenharmony_ci BWC_Q_MED = 2, 12162306a36Sopenharmony_ci}; 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_cienum mdp5_cursor_format { 12462306a36Sopenharmony_ci CURSOR_FMT_ARGB8888 = 0, 12562306a36Sopenharmony_ci CURSOR_FMT_ARGB1555 = 2, 12662306a36Sopenharmony_ci CURSOR_FMT_ARGB4444 = 4, 12762306a36Sopenharmony_ci}; 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_cienum mdp5_cursor_alpha { 13062306a36Sopenharmony_ci CURSOR_ALPHA_CONST = 0, 13162306a36Sopenharmony_ci CURSOR_ALPHA_PER_PIXEL = 2, 13262306a36Sopenharmony_ci}; 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_cienum mdp5_igc_type { 13562306a36Sopenharmony_ci IGC_VIG = 0, 13662306a36Sopenharmony_ci IGC_RGB = 1, 13762306a36Sopenharmony_ci IGC_DMA = 2, 13862306a36Sopenharmony_ci IGC_DSPP = 3, 13962306a36Sopenharmony_ci}; 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_cienum mdp5_data_format { 14262306a36Sopenharmony_ci DATA_FORMAT_RGB = 0, 14362306a36Sopenharmony_ci DATA_FORMAT_YUV = 1, 14462306a36Sopenharmony_ci}; 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_cienum mdp5_block_size { 14762306a36Sopenharmony_ci BLOCK_SIZE_64 = 0, 14862306a36Sopenharmony_ci BLOCK_SIZE_128 = 1, 14962306a36Sopenharmony_ci}; 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_cienum mdp5_rotate_mode { 15262306a36Sopenharmony_ci ROTATE_0 = 0, 15362306a36Sopenharmony_ci ROTATE_90 = 1, 15462306a36Sopenharmony_ci}; 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_cienum mdp5_chroma_downsample_method { 15762306a36Sopenharmony_ci DS_MTHD_NO_PIXEL_DROP = 0, 15862306a36Sopenharmony_ci DS_MTHD_PIXEL_DROP = 1, 15962306a36Sopenharmony_ci}; 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci#define MDP5_IRQ_WB_0_DONE 0x00000001 16262306a36Sopenharmony_ci#define MDP5_IRQ_WB_1_DONE 0x00000002 16362306a36Sopenharmony_ci#define MDP5_IRQ_WB_2_DONE 0x00000010 16462306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_0_DONE 0x00000100 16562306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_1_DONE 0x00000200 16662306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_2_DONE 0x00000400 16762306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_3_DONE 0x00000800 16862306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_0_RD_PTR 0x00001000 16962306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_1_RD_PTR 0x00002000 17062306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_2_RD_PTR 0x00004000 17162306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_3_RD_PTR 0x00008000 17262306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_0_WR_PTR 0x00010000 17362306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_1_WR_PTR 0x00020000 17462306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_2_WR_PTR 0x00040000 17562306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_3_WR_PTR 0x00080000 17662306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_0_AUTO_REF 0x00100000 17762306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_1_AUTO_REF 0x00200000 17862306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_2_AUTO_REF 0x00400000 17962306a36Sopenharmony_ci#define MDP5_IRQ_PING_PONG_3_AUTO_REF 0x00800000 18062306a36Sopenharmony_ci#define MDP5_IRQ_INTF0_UNDER_RUN 0x01000000 18162306a36Sopenharmony_ci#define MDP5_IRQ_INTF0_VSYNC 0x02000000 18262306a36Sopenharmony_ci#define MDP5_IRQ_INTF1_UNDER_RUN 0x04000000 18362306a36Sopenharmony_ci#define MDP5_IRQ_INTF1_VSYNC 0x08000000 18462306a36Sopenharmony_ci#define MDP5_IRQ_INTF2_UNDER_RUN 0x10000000 18562306a36Sopenharmony_ci#define MDP5_IRQ_INTF2_VSYNC 0x20000000 18662306a36Sopenharmony_ci#define MDP5_IRQ_INTF3_UNDER_RUN 0x40000000 18762306a36Sopenharmony_ci#define MDP5_IRQ_INTF3_VSYNC 0x80000000 18862306a36Sopenharmony_ci#define REG_MDSS_HW_VERSION 0x00000000 18962306a36Sopenharmony_ci#define MDSS_HW_VERSION_STEP__MASK 0x0000ffff 19062306a36Sopenharmony_ci#define MDSS_HW_VERSION_STEP__SHIFT 0 19162306a36Sopenharmony_cistatic inline uint32_t MDSS_HW_VERSION_STEP(uint32_t val) 19262306a36Sopenharmony_ci{ 19362306a36Sopenharmony_ci return ((val) << MDSS_HW_VERSION_STEP__SHIFT) & MDSS_HW_VERSION_STEP__MASK; 19462306a36Sopenharmony_ci} 19562306a36Sopenharmony_ci#define MDSS_HW_VERSION_MINOR__MASK 0x0fff0000 19662306a36Sopenharmony_ci#define MDSS_HW_VERSION_MINOR__SHIFT 16 19762306a36Sopenharmony_cistatic inline uint32_t MDSS_HW_VERSION_MINOR(uint32_t val) 19862306a36Sopenharmony_ci{ 19962306a36Sopenharmony_ci return ((val) << MDSS_HW_VERSION_MINOR__SHIFT) & MDSS_HW_VERSION_MINOR__MASK; 20062306a36Sopenharmony_ci} 20162306a36Sopenharmony_ci#define MDSS_HW_VERSION_MAJOR__MASK 0xf0000000 20262306a36Sopenharmony_ci#define MDSS_HW_VERSION_MAJOR__SHIFT 28 20362306a36Sopenharmony_cistatic inline uint32_t MDSS_HW_VERSION_MAJOR(uint32_t val) 20462306a36Sopenharmony_ci{ 20562306a36Sopenharmony_ci return ((val) << MDSS_HW_VERSION_MAJOR__SHIFT) & MDSS_HW_VERSION_MAJOR__MASK; 20662306a36Sopenharmony_ci} 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci#define REG_MDSS_HW_INTR_STATUS 0x00000010 20962306a36Sopenharmony_ci#define MDSS_HW_INTR_STATUS_INTR_MDP 0x00000001 21062306a36Sopenharmony_ci#define MDSS_HW_INTR_STATUS_INTR_DSI0 0x00000010 21162306a36Sopenharmony_ci#define MDSS_HW_INTR_STATUS_INTR_DSI1 0x00000020 21262306a36Sopenharmony_ci#define MDSS_HW_INTR_STATUS_INTR_HDMI 0x00000100 21362306a36Sopenharmony_ci#define MDSS_HW_INTR_STATUS_INTR_EDP 0x00001000 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci#define REG_MDP5_HW_VERSION 0x00000000 21662306a36Sopenharmony_ci#define MDP5_HW_VERSION_STEP__MASK 0x0000ffff 21762306a36Sopenharmony_ci#define MDP5_HW_VERSION_STEP__SHIFT 0 21862306a36Sopenharmony_cistatic inline uint32_t MDP5_HW_VERSION_STEP(uint32_t val) 21962306a36Sopenharmony_ci{ 22062306a36Sopenharmony_ci return ((val) << MDP5_HW_VERSION_STEP__SHIFT) & MDP5_HW_VERSION_STEP__MASK; 22162306a36Sopenharmony_ci} 22262306a36Sopenharmony_ci#define MDP5_HW_VERSION_MINOR__MASK 0x0fff0000 22362306a36Sopenharmony_ci#define MDP5_HW_VERSION_MINOR__SHIFT 16 22462306a36Sopenharmony_cistatic inline uint32_t MDP5_HW_VERSION_MINOR(uint32_t val) 22562306a36Sopenharmony_ci{ 22662306a36Sopenharmony_ci return ((val) << MDP5_HW_VERSION_MINOR__SHIFT) & MDP5_HW_VERSION_MINOR__MASK; 22762306a36Sopenharmony_ci} 22862306a36Sopenharmony_ci#define MDP5_HW_VERSION_MAJOR__MASK 0xf0000000 22962306a36Sopenharmony_ci#define MDP5_HW_VERSION_MAJOR__SHIFT 28 23062306a36Sopenharmony_cistatic inline uint32_t MDP5_HW_VERSION_MAJOR(uint32_t val) 23162306a36Sopenharmony_ci{ 23262306a36Sopenharmony_ci return ((val) << MDP5_HW_VERSION_MAJOR__SHIFT) & MDP5_HW_VERSION_MAJOR__MASK; 23362306a36Sopenharmony_ci} 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci#define REG_MDP5_DISP_INTF_SEL 0x00000004 23662306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF0__MASK 0x000000ff 23762306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF0__SHIFT 0 23862306a36Sopenharmony_cistatic inline uint32_t MDP5_DISP_INTF_SEL_INTF0(enum mdp5_intf_type val) 23962306a36Sopenharmony_ci{ 24062306a36Sopenharmony_ci return ((val) << MDP5_DISP_INTF_SEL_INTF0__SHIFT) & MDP5_DISP_INTF_SEL_INTF0__MASK; 24162306a36Sopenharmony_ci} 24262306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF1__MASK 0x0000ff00 24362306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF1__SHIFT 8 24462306a36Sopenharmony_cistatic inline uint32_t MDP5_DISP_INTF_SEL_INTF1(enum mdp5_intf_type val) 24562306a36Sopenharmony_ci{ 24662306a36Sopenharmony_ci return ((val) << MDP5_DISP_INTF_SEL_INTF1__SHIFT) & MDP5_DISP_INTF_SEL_INTF1__MASK; 24762306a36Sopenharmony_ci} 24862306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF2__MASK 0x00ff0000 24962306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF2__SHIFT 16 25062306a36Sopenharmony_cistatic inline uint32_t MDP5_DISP_INTF_SEL_INTF2(enum mdp5_intf_type val) 25162306a36Sopenharmony_ci{ 25262306a36Sopenharmony_ci return ((val) << MDP5_DISP_INTF_SEL_INTF2__SHIFT) & MDP5_DISP_INTF_SEL_INTF2__MASK; 25362306a36Sopenharmony_ci} 25462306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF3__MASK 0xff000000 25562306a36Sopenharmony_ci#define MDP5_DISP_INTF_SEL_INTF3__SHIFT 24 25662306a36Sopenharmony_cistatic inline uint32_t MDP5_DISP_INTF_SEL_INTF3(enum mdp5_intf_type val) 25762306a36Sopenharmony_ci{ 25862306a36Sopenharmony_ci return ((val) << MDP5_DISP_INTF_SEL_INTF3__SHIFT) & MDP5_DISP_INTF_SEL_INTF3__MASK; 25962306a36Sopenharmony_ci} 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci#define REG_MDP5_INTR_EN 0x00000010 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ci#define REG_MDP5_INTR_STATUS 0x00000014 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci#define REG_MDP5_INTR_CLEAR 0x00000018 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci#define REG_MDP5_HIST_INTR_EN 0x0000001c 26862306a36Sopenharmony_ci 26962306a36Sopenharmony_ci#define REG_MDP5_HIST_INTR_STATUS 0x00000020 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci#define REG_MDP5_HIST_INTR_CLEAR 0x00000024 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci#define REG_MDP5_SPARE_0 0x00000028 27462306a36Sopenharmony_ci#define MDP5_SPARE_0_SPLIT_DPL_SINGLE_FLUSH_EN 0x00000001 27562306a36Sopenharmony_ci 27662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_SMP_ALLOC_W(uint32_t i0) { return 0x00000080 + 0x4*i0; } 27762306a36Sopenharmony_ci 27862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_SMP_ALLOC_W_REG(uint32_t i0) { return 0x00000080 + 0x4*i0; } 27962306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_W_REG_CLIENT0__MASK 0x000000ff 28062306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_W_REG_CLIENT0__SHIFT 0 28162306a36Sopenharmony_cistatic inline uint32_t MDP5_SMP_ALLOC_W_REG_CLIENT0(uint32_t val) 28262306a36Sopenharmony_ci{ 28362306a36Sopenharmony_ci return ((val) << MDP5_SMP_ALLOC_W_REG_CLIENT0__SHIFT) & MDP5_SMP_ALLOC_W_REG_CLIENT0__MASK; 28462306a36Sopenharmony_ci} 28562306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_W_REG_CLIENT1__MASK 0x0000ff00 28662306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_W_REG_CLIENT1__SHIFT 8 28762306a36Sopenharmony_cistatic inline uint32_t MDP5_SMP_ALLOC_W_REG_CLIENT1(uint32_t val) 28862306a36Sopenharmony_ci{ 28962306a36Sopenharmony_ci return ((val) << MDP5_SMP_ALLOC_W_REG_CLIENT1__SHIFT) & MDP5_SMP_ALLOC_W_REG_CLIENT1__MASK; 29062306a36Sopenharmony_ci} 29162306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_W_REG_CLIENT2__MASK 0x00ff0000 29262306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_W_REG_CLIENT2__SHIFT 16 29362306a36Sopenharmony_cistatic inline uint32_t MDP5_SMP_ALLOC_W_REG_CLIENT2(uint32_t val) 29462306a36Sopenharmony_ci{ 29562306a36Sopenharmony_ci return ((val) << MDP5_SMP_ALLOC_W_REG_CLIENT2__SHIFT) & MDP5_SMP_ALLOC_W_REG_CLIENT2__MASK; 29662306a36Sopenharmony_ci} 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_SMP_ALLOC_R(uint32_t i0) { return 0x00000130 + 0x4*i0; } 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_SMP_ALLOC_R_REG(uint32_t i0) { return 0x00000130 + 0x4*i0; } 30162306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_R_REG_CLIENT0__MASK 0x000000ff 30262306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_R_REG_CLIENT0__SHIFT 0 30362306a36Sopenharmony_cistatic inline uint32_t MDP5_SMP_ALLOC_R_REG_CLIENT0(uint32_t val) 30462306a36Sopenharmony_ci{ 30562306a36Sopenharmony_ci return ((val) << MDP5_SMP_ALLOC_R_REG_CLIENT0__SHIFT) & MDP5_SMP_ALLOC_R_REG_CLIENT0__MASK; 30662306a36Sopenharmony_ci} 30762306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_R_REG_CLIENT1__MASK 0x0000ff00 30862306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_R_REG_CLIENT1__SHIFT 8 30962306a36Sopenharmony_cistatic inline uint32_t MDP5_SMP_ALLOC_R_REG_CLIENT1(uint32_t val) 31062306a36Sopenharmony_ci{ 31162306a36Sopenharmony_ci return ((val) << MDP5_SMP_ALLOC_R_REG_CLIENT1__SHIFT) & MDP5_SMP_ALLOC_R_REG_CLIENT1__MASK; 31262306a36Sopenharmony_ci} 31362306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_R_REG_CLIENT2__MASK 0x00ff0000 31462306a36Sopenharmony_ci#define MDP5_SMP_ALLOC_R_REG_CLIENT2__SHIFT 16 31562306a36Sopenharmony_cistatic inline uint32_t MDP5_SMP_ALLOC_R_REG_CLIENT2(uint32_t val) 31662306a36Sopenharmony_ci{ 31762306a36Sopenharmony_ci return ((val) << MDP5_SMP_ALLOC_R_REG_CLIENT2__SHIFT) & MDP5_SMP_ALLOC_R_REG_CLIENT2__MASK; 31862306a36Sopenharmony_ci} 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_cistatic inline uint32_t __offset_IGC(enum mdp5_igc_type idx) 32162306a36Sopenharmony_ci{ 32262306a36Sopenharmony_ci switch (idx) { 32362306a36Sopenharmony_ci case IGC_VIG: return 0x00000200; 32462306a36Sopenharmony_ci case IGC_RGB: return 0x00000210; 32562306a36Sopenharmony_ci case IGC_DMA: return 0x00000220; 32662306a36Sopenharmony_ci case IGC_DSPP: return 0x00000300; 32762306a36Sopenharmony_ci default: return INVALID_IDX(idx); 32862306a36Sopenharmony_ci } 32962306a36Sopenharmony_ci} 33062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_IGC(enum mdp5_igc_type i0) { return 0x00000000 + __offset_IGC(i0); } 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_IGC_LUT(enum mdp5_igc_type i0, uint32_t i1) { return 0x00000000 + __offset_IGC(i0) + 0x4*i1; } 33362306a36Sopenharmony_ci 33462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_IGC_LUT_REG(enum mdp5_igc_type i0, uint32_t i1) { return 0x00000000 + __offset_IGC(i0) + 0x4*i1; } 33562306a36Sopenharmony_ci#define MDP5_IGC_LUT_REG_VAL__MASK 0x00000fff 33662306a36Sopenharmony_ci#define MDP5_IGC_LUT_REG_VAL__SHIFT 0 33762306a36Sopenharmony_cistatic inline uint32_t MDP5_IGC_LUT_REG_VAL(uint32_t val) 33862306a36Sopenharmony_ci{ 33962306a36Sopenharmony_ci return ((val) << MDP5_IGC_LUT_REG_VAL__SHIFT) & MDP5_IGC_LUT_REG_VAL__MASK; 34062306a36Sopenharmony_ci} 34162306a36Sopenharmony_ci#define MDP5_IGC_LUT_REG_INDEX_UPDATE 0x02000000 34262306a36Sopenharmony_ci#define MDP5_IGC_LUT_REG_DISABLE_PIPE_0 0x10000000 34362306a36Sopenharmony_ci#define MDP5_IGC_LUT_REG_DISABLE_PIPE_1 0x20000000 34462306a36Sopenharmony_ci#define MDP5_IGC_LUT_REG_DISABLE_PIPE_2 0x40000000 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci#define REG_MDP5_SPLIT_DPL_EN 0x000002f4 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ci#define REG_MDP5_SPLIT_DPL_UPPER 0x000002f8 34962306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_UPPER_SMART_PANEL 0x00000002 35062306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_UPPER_SMART_PANEL_FREE_RUN 0x00000004 35162306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_UPPER_INTF1_SW_TRG_MUX 0x00000010 35262306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_UPPER_INTF2_SW_TRG_MUX 0x00000100 35362306a36Sopenharmony_ci 35462306a36Sopenharmony_ci#define REG_MDP5_SPLIT_DPL_LOWER 0x000003f0 35562306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_LOWER_SMART_PANEL 0x00000002 35662306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_LOWER_SMART_PANEL_FREE_RUN 0x00000004 35762306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_LOWER_INTF1_TG_SYNC 0x00000010 35862306a36Sopenharmony_ci#define MDP5_SPLIT_DPL_LOWER_INTF2_TG_SYNC 0x00000100 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_cistatic inline uint32_t __offset_CTL(uint32_t idx) 36162306a36Sopenharmony_ci{ 36262306a36Sopenharmony_ci switch (idx) { 36362306a36Sopenharmony_ci case 0: return (mdp5_cfg->ctl.base[0]); 36462306a36Sopenharmony_ci case 1: return (mdp5_cfg->ctl.base[1]); 36562306a36Sopenharmony_ci case 2: return (mdp5_cfg->ctl.base[2]); 36662306a36Sopenharmony_ci case 3: return (mdp5_cfg->ctl.base[3]); 36762306a36Sopenharmony_ci case 4: return (mdp5_cfg->ctl.base[4]); 36862306a36Sopenharmony_ci default: return INVALID_IDX(idx); 36962306a36Sopenharmony_ci } 37062306a36Sopenharmony_ci} 37162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL(uint32_t i0) { return 0x00000000 + __offset_CTL(i0); } 37262306a36Sopenharmony_ci 37362306a36Sopenharmony_cistatic inline uint32_t __offset_LAYER(uint32_t idx) 37462306a36Sopenharmony_ci{ 37562306a36Sopenharmony_ci switch (idx) { 37662306a36Sopenharmony_ci case 0: return 0x00000000; 37762306a36Sopenharmony_ci case 1: return 0x00000004; 37862306a36Sopenharmony_ci case 2: return 0x00000008; 37962306a36Sopenharmony_ci case 3: return 0x0000000c; 38062306a36Sopenharmony_ci case 4: return 0x00000010; 38162306a36Sopenharmony_ci case 5: return 0x00000024; 38262306a36Sopenharmony_ci default: return INVALID_IDX(idx); 38362306a36Sopenharmony_ci } 38462306a36Sopenharmony_ci} 38562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_LAYER(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_CTL(i0) + __offset_LAYER(i1); } 38662306a36Sopenharmony_ci 38762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_LAYER_REG(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_CTL(i0) + __offset_LAYER(i1); } 38862306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG0__MASK 0x00000007 38962306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG0__SHIFT 0 39062306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_VIG0(uint32_t val) 39162306a36Sopenharmony_ci{ 39262306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_VIG0__SHIFT) & MDP5_CTL_LAYER_REG_VIG0__MASK; 39362306a36Sopenharmony_ci} 39462306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG1__MASK 0x00000038 39562306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG1__SHIFT 3 39662306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_VIG1(uint32_t val) 39762306a36Sopenharmony_ci{ 39862306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_VIG1__SHIFT) & MDP5_CTL_LAYER_REG_VIG1__MASK; 39962306a36Sopenharmony_ci} 40062306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG2__MASK 0x000001c0 40162306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG2__SHIFT 6 40262306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_VIG2(uint32_t val) 40362306a36Sopenharmony_ci{ 40462306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_VIG2__SHIFT) & MDP5_CTL_LAYER_REG_VIG2__MASK; 40562306a36Sopenharmony_ci} 40662306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB0__MASK 0x00000e00 40762306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB0__SHIFT 9 40862306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_RGB0(uint32_t val) 40962306a36Sopenharmony_ci{ 41062306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_RGB0__SHIFT) & MDP5_CTL_LAYER_REG_RGB0__MASK; 41162306a36Sopenharmony_ci} 41262306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB1__MASK 0x00007000 41362306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB1__SHIFT 12 41462306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_RGB1(uint32_t val) 41562306a36Sopenharmony_ci{ 41662306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_RGB1__SHIFT) & MDP5_CTL_LAYER_REG_RGB1__MASK; 41762306a36Sopenharmony_ci} 41862306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB2__MASK 0x00038000 41962306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB2__SHIFT 15 42062306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_RGB2(uint32_t val) 42162306a36Sopenharmony_ci{ 42262306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_RGB2__SHIFT) & MDP5_CTL_LAYER_REG_RGB2__MASK; 42362306a36Sopenharmony_ci} 42462306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_DMA0__MASK 0x001c0000 42562306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_DMA0__SHIFT 18 42662306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_DMA0(uint32_t val) 42762306a36Sopenharmony_ci{ 42862306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_DMA0__SHIFT) & MDP5_CTL_LAYER_REG_DMA0__MASK; 42962306a36Sopenharmony_ci} 43062306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_DMA1__MASK 0x00e00000 43162306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_DMA1__SHIFT 21 43262306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_DMA1(uint32_t val) 43362306a36Sopenharmony_ci{ 43462306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_DMA1__SHIFT) & MDP5_CTL_LAYER_REG_DMA1__MASK; 43562306a36Sopenharmony_ci} 43662306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_BORDER_COLOR 0x01000000 43762306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_CURSOR_OUT 0x02000000 43862306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG3__MASK 0x1c000000 43962306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_VIG3__SHIFT 26 44062306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_VIG3(uint32_t val) 44162306a36Sopenharmony_ci{ 44262306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_VIG3__SHIFT) & MDP5_CTL_LAYER_REG_VIG3__MASK; 44362306a36Sopenharmony_ci} 44462306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB3__MASK 0xe0000000 44562306a36Sopenharmony_ci#define MDP5_CTL_LAYER_REG_RGB3__SHIFT 29 44662306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_REG_RGB3(uint32_t val) 44762306a36Sopenharmony_ci{ 44862306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_REG_RGB3__SHIFT) & MDP5_CTL_LAYER_REG_RGB3__MASK; 44962306a36Sopenharmony_ci} 45062306a36Sopenharmony_ci 45162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_OP(uint32_t i0) { return 0x00000014 + __offset_CTL(i0); } 45262306a36Sopenharmony_ci#define MDP5_CTL_OP_MODE__MASK 0x0000000f 45362306a36Sopenharmony_ci#define MDP5_CTL_OP_MODE__SHIFT 0 45462306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_OP_MODE(enum mdp5_ctl_mode val) 45562306a36Sopenharmony_ci{ 45662306a36Sopenharmony_ci return ((val) << MDP5_CTL_OP_MODE__SHIFT) & MDP5_CTL_OP_MODE__MASK; 45762306a36Sopenharmony_ci} 45862306a36Sopenharmony_ci#define MDP5_CTL_OP_INTF_NUM__MASK 0x00000070 45962306a36Sopenharmony_ci#define MDP5_CTL_OP_INTF_NUM__SHIFT 4 46062306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_OP_INTF_NUM(enum mdp5_intfnum val) 46162306a36Sopenharmony_ci{ 46262306a36Sopenharmony_ci return ((val) << MDP5_CTL_OP_INTF_NUM__SHIFT) & MDP5_CTL_OP_INTF_NUM__MASK; 46362306a36Sopenharmony_ci} 46462306a36Sopenharmony_ci#define MDP5_CTL_OP_CMD_MODE 0x00020000 46562306a36Sopenharmony_ci#define MDP5_CTL_OP_PACK_3D_ENABLE 0x00080000 46662306a36Sopenharmony_ci#define MDP5_CTL_OP_PACK_3D__MASK 0x00300000 46762306a36Sopenharmony_ci#define MDP5_CTL_OP_PACK_3D__SHIFT 20 46862306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_OP_PACK_3D(enum mdp5_pack_3d val) 46962306a36Sopenharmony_ci{ 47062306a36Sopenharmony_ci return ((val) << MDP5_CTL_OP_PACK_3D__SHIFT) & MDP5_CTL_OP_PACK_3D__MASK; 47162306a36Sopenharmony_ci} 47262306a36Sopenharmony_ci 47362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_FLUSH(uint32_t i0) { return 0x00000018 + __offset_CTL(i0); } 47462306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_VIG0 0x00000001 47562306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_VIG1 0x00000002 47662306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_VIG2 0x00000004 47762306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_RGB0 0x00000008 47862306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_RGB1 0x00000010 47962306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_RGB2 0x00000020 48062306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_LM0 0x00000040 48162306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_LM1 0x00000080 48262306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_LM2 0x00000100 48362306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_LM3 0x00000200 48462306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_LM4 0x00000400 48562306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_DMA0 0x00000800 48662306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_DMA1 0x00001000 48762306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_DSPP0 0x00002000 48862306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_DSPP1 0x00004000 48962306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_DSPP2 0x00008000 49062306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_WB 0x00010000 49162306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_CTL 0x00020000 49262306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_VIG3 0x00040000 49362306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_RGB3 0x00080000 49462306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_LM5 0x00100000 49562306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_DSPP3 0x00200000 49662306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_CURSOR_0 0x00400000 49762306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_CURSOR_1 0x00800000 49862306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_CHROMADOWN_0 0x04000000 49962306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_TIMING_3 0x10000000 50062306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_TIMING_2 0x20000000 50162306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_TIMING_1 0x40000000 50262306a36Sopenharmony_ci#define MDP5_CTL_FLUSH_TIMING_0 0x80000000 50362306a36Sopenharmony_ci 50462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_START(uint32_t i0) { return 0x0000001c + __offset_CTL(i0); } 50562306a36Sopenharmony_ci 50662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_PACK_3D(uint32_t i0) { return 0x00000020 + __offset_CTL(i0); } 50762306a36Sopenharmony_ci 50862306a36Sopenharmony_cistatic inline uint32_t __offset_LAYER_EXT(uint32_t idx) 50962306a36Sopenharmony_ci{ 51062306a36Sopenharmony_ci switch (idx) { 51162306a36Sopenharmony_ci case 0: return 0x00000040; 51262306a36Sopenharmony_ci case 1: return 0x00000044; 51362306a36Sopenharmony_ci case 2: return 0x00000048; 51462306a36Sopenharmony_ci case 3: return 0x0000004c; 51562306a36Sopenharmony_ci case 4: return 0x00000050; 51662306a36Sopenharmony_ci case 5: return 0x00000054; 51762306a36Sopenharmony_ci default: return INVALID_IDX(idx); 51862306a36Sopenharmony_ci } 51962306a36Sopenharmony_ci} 52062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_LAYER_EXT(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_CTL(i0) + __offset_LAYER_EXT(i1); } 52162306a36Sopenharmony_ci 52262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_CTL_LAYER_EXT_REG(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_CTL(i0) + __offset_LAYER_EXT(i1); } 52362306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_VIG0_BIT3 0x00000001 52462306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_VIG1_BIT3 0x00000004 52562306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_VIG2_BIT3 0x00000010 52662306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_VIG3_BIT3 0x00000040 52762306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_RGB0_BIT3 0x00000100 52862306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_RGB1_BIT3 0x00000400 52962306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_RGB2_BIT3 0x00001000 53062306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_RGB3_BIT3 0x00004000 53162306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_DMA0_BIT3 0x00010000 53262306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_DMA1_BIT3 0x00040000 53362306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_CURSOR0__MASK 0x00f00000 53462306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_CURSOR0__SHIFT 20 53562306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_EXT_REG_CURSOR0(enum mdp_mixer_stage_id val) 53662306a36Sopenharmony_ci{ 53762306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_EXT_REG_CURSOR0__SHIFT) & MDP5_CTL_LAYER_EXT_REG_CURSOR0__MASK; 53862306a36Sopenharmony_ci} 53962306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_CURSOR1__MASK 0x3c000000 54062306a36Sopenharmony_ci#define MDP5_CTL_LAYER_EXT_REG_CURSOR1__SHIFT 26 54162306a36Sopenharmony_cistatic inline uint32_t MDP5_CTL_LAYER_EXT_REG_CURSOR1(enum mdp_mixer_stage_id val) 54262306a36Sopenharmony_ci{ 54362306a36Sopenharmony_ci return ((val) << MDP5_CTL_LAYER_EXT_REG_CURSOR1__SHIFT) & MDP5_CTL_LAYER_EXT_REG_CURSOR1__MASK; 54462306a36Sopenharmony_ci} 54562306a36Sopenharmony_ci 54662306a36Sopenharmony_cistatic inline uint32_t __offset_PIPE(enum mdp5_pipe idx) 54762306a36Sopenharmony_ci{ 54862306a36Sopenharmony_ci switch (idx) { 54962306a36Sopenharmony_ci case SSPP_NONE: return (INVALID_IDX(idx)); 55062306a36Sopenharmony_ci case SSPP_VIG0: return (mdp5_cfg->pipe_vig.base[0]); 55162306a36Sopenharmony_ci case SSPP_VIG1: return (mdp5_cfg->pipe_vig.base[1]); 55262306a36Sopenharmony_ci case SSPP_VIG2: return (mdp5_cfg->pipe_vig.base[2]); 55362306a36Sopenharmony_ci case SSPP_RGB0: return (mdp5_cfg->pipe_rgb.base[0]); 55462306a36Sopenharmony_ci case SSPP_RGB1: return (mdp5_cfg->pipe_rgb.base[1]); 55562306a36Sopenharmony_ci case SSPP_RGB2: return (mdp5_cfg->pipe_rgb.base[2]); 55662306a36Sopenharmony_ci case SSPP_DMA0: return (mdp5_cfg->pipe_dma.base[0]); 55762306a36Sopenharmony_ci case SSPP_DMA1: return (mdp5_cfg->pipe_dma.base[1]); 55862306a36Sopenharmony_ci case SSPP_VIG3: return (mdp5_cfg->pipe_vig.base[3]); 55962306a36Sopenharmony_ci case SSPP_RGB3: return (mdp5_cfg->pipe_rgb.base[3]); 56062306a36Sopenharmony_ci case SSPP_CURSOR0: return (mdp5_cfg->pipe_cursor.base[0]); 56162306a36Sopenharmony_ci case SSPP_CURSOR1: return (mdp5_cfg->pipe_cursor.base[1]); 56262306a36Sopenharmony_ci default: return INVALID_IDX(idx); 56362306a36Sopenharmony_ci } 56462306a36Sopenharmony_ci} 56562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE(enum mdp5_pipe i0) { return 0x00000000 + __offset_PIPE(i0); } 56662306a36Sopenharmony_ci 56762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_OP_MODE(enum mdp5_pipe i0) { return 0x00000200 + __offset_PIPE(i0); } 56862306a36Sopenharmony_ci#define MDP5_PIPE_OP_MODE_CSC_DST_DATA_FORMAT__MASK 0x00080000 56962306a36Sopenharmony_ci#define MDP5_PIPE_OP_MODE_CSC_DST_DATA_FORMAT__SHIFT 19 57062306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_OP_MODE_CSC_DST_DATA_FORMAT(enum mdp5_data_format val) 57162306a36Sopenharmony_ci{ 57262306a36Sopenharmony_ci return ((val) << MDP5_PIPE_OP_MODE_CSC_DST_DATA_FORMAT__SHIFT) & MDP5_PIPE_OP_MODE_CSC_DST_DATA_FORMAT__MASK; 57362306a36Sopenharmony_ci} 57462306a36Sopenharmony_ci#define MDP5_PIPE_OP_MODE_CSC_SRC_DATA_FORMAT__MASK 0x00040000 57562306a36Sopenharmony_ci#define MDP5_PIPE_OP_MODE_CSC_SRC_DATA_FORMAT__SHIFT 18 57662306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_OP_MODE_CSC_SRC_DATA_FORMAT(enum mdp5_data_format val) 57762306a36Sopenharmony_ci{ 57862306a36Sopenharmony_ci return ((val) << MDP5_PIPE_OP_MODE_CSC_SRC_DATA_FORMAT__SHIFT) & MDP5_PIPE_OP_MODE_CSC_SRC_DATA_FORMAT__MASK; 57962306a36Sopenharmony_ci} 58062306a36Sopenharmony_ci#define MDP5_PIPE_OP_MODE_CSC_1_EN 0x00020000 58162306a36Sopenharmony_ci 58262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_HIST_CTL_BASE(enum mdp5_pipe i0) { return 0x000002c4 + __offset_PIPE(i0); } 58362306a36Sopenharmony_ci 58462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_HIST_LUT_BASE(enum mdp5_pipe i0) { return 0x000002f0 + __offset_PIPE(i0); } 58562306a36Sopenharmony_ci 58662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_HIST_LUT_SWAP(enum mdp5_pipe i0) { return 0x00000300 + __offset_PIPE(i0); } 58762306a36Sopenharmony_ci 58862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_MATRIX_COEFF_0(enum mdp5_pipe i0) { return 0x00000320 + __offset_PIPE(i0); } 58962306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_11__MASK 0x00001fff 59062306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_11__SHIFT 0 59162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_11(uint32_t val) 59262306a36Sopenharmony_ci{ 59362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_11__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_11__MASK; 59462306a36Sopenharmony_ci} 59562306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_12__MASK 0x1fff0000 59662306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_12__SHIFT 16 59762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_12(uint32_t val) 59862306a36Sopenharmony_ci{ 59962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_12__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_0_COEFF_12__MASK; 60062306a36Sopenharmony_ci} 60162306a36Sopenharmony_ci 60262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_MATRIX_COEFF_1(enum mdp5_pipe i0) { return 0x00000324 + __offset_PIPE(i0); } 60362306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_13__MASK 0x00001fff 60462306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_13__SHIFT 0 60562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_13(uint32_t val) 60662306a36Sopenharmony_ci{ 60762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_13__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_13__MASK; 60862306a36Sopenharmony_ci} 60962306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_21__MASK 0x1fff0000 61062306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_21__SHIFT 16 61162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_21(uint32_t val) 61262306a36Sopenharmony_ci{ 61362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_21__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_1_COEFF_21__MASK; 61462306a36Sopenharmony_ci} 61562306a36Sopenharmony_ci 61662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_MATRIX_COEFF_2(enum mdp5_pipe i0) { return 0x00000328 + __offset_PIPE(i0); } 61762306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_22__MASK 0x00001fff 61862306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_22__SHIFT 0 61962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_22(uint32_t val) 62062306a36Sopenharmony_ci{ 62162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_22__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_22__MASK; 62262306a36Sopenharmony_ci} 62362306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_23__MASK 0x1fff0000 62462306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_23__SHIFT 16 62562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_23(uint32_t val) 62662306a36Sopenharmony_ci{ 62762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_23__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_2_COEFF_23__MASK; 62862306a36Sopenharmony_ci} 62962306a36Sopenharmony_ci 63062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_MATRIX_COEFF_3(enum mdp5_pipe i0) { return 0x0000032c + __offset_PIPE(i0); } 63162306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_31__MASK 0x00001fff 63262306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_31__SHIFT 0 63362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_31(uint32_t val) 63462306a36Sopenharmony_ci{ 63562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_31__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_31__MASK; 63662306a36Sopenharmony_ci} 63762306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_32__MASK 0x1fff0000 63862306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_32__SHIFT 16 63962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_32(uint32_t val) 64062306a36Sopenharmony_ci{ 64162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_32__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_3_COEFF_32__MASK; 64262306a36Sopenharmony_ci} 64362306a36Sopenharmony_ci 64462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_MATRIX_COEFF_4(enum mdp5_pipe i0) { return 0x00000330 + __offset_PIPE(i0); } 64562306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_4_COEFF_33__MASK 0x00001fff 64662306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_MATRIX_COEFF_4_COEFF_33__SHIFT 0 64762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_MATRIX_COEFF_4_COEFF_33(uint32_t val) 64862306a36Sopenharmony_ci{ 64962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_MATRIX_COEFF_4_COEFF_33__SHIFT) & MDP5_PIPE_CSC_1_MATRIX_COEFF_4_COEFF_33__MASK; 65062306a36Sopenharmony_ci} 65162306a36Sopenharmony_ci 65262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_PRE_CLAMP(enum mdp5_pipe i0, uint32_t i1) { return 0x00000334 + __offset_PIPE(i0) + 0x4*i1; } 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_PRE_CLAMP_REG(enum mdp5_pipe i0, uint32_t i1) { return 0x00000334 + __offset_PIPE(i0) + 0x4*i1; } 65562306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_PRE_CLAMP_REG_HIGH__MASK 0x000000ff 65662306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_PRE_CLAMP_REG_HIGH__SHIFT 0 65762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_PRE_CLAMP_REG_HIGH(uint32_t val) 65862306a36Sopenharmony_ci{ 65962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_PRE_CLAMP_REG_HIGH__SHIFT) & MDP5_PIPE_CSC_1_PRE_CLAMP_REG_HIGH__MASK; 66062306a36Sopenharmony_ci} 66162306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_PRE_CLAMP_REG_LOW__MASK 0x0000ff00 66262306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_PRE_CLAMP_REG_LOW__SHIFT 8 66362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_PRE_CLAMP_REG_LOW(uint32_t val) 66462306a36Sopenharmony_ci{ 66562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_PRE_CLAMP_REG_LOW__SHIFT) & MDP5_PIPE_CSC_1_PRE_CLAMP_REG_LOW__MASK; 66662306a36Sopenharmony_ci} 66762306a36Sopenharmony_ci 66862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_POST_CLAMP(enum mdp5_pipe i0, uint32_t i1) { return 0x00000340 + __offset_PIPE(i0) + 0x4*i1; } 66962306a36Sopenharmony_ci 67062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_POST_CLAMP_REG(enum mdp5_pipe i0, uint32_t i1) { return 0x00000340 + __offset_PIPE(i0) + 0x4*i1; } 67162306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_POST_CLAMP_REG_HIGH__MASK 0x000000ff 67262306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_POST_CLAMP_REG_HIGH__SHIFT 0 67362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_POST_CLAMP_REG_HIGH(uint32_t val) 67462306a36Sopenharmony_ci{ 67562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_POST_CLAMP_REG_HIGH__SHIFT) & MDP5_PIPE_CSC_1_POST_CLAMP_REG_HIGH__MASK; 67662306a36Sopenharmony_ci} 67762306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_POST_CLAMP_REG_LOW__MASK 0x0000ff00 67862306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_POST_CLAMP_REG_LOW__SHIFT 8 67962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_POST_CLAMP_REG_LOW(uint32_t val) 68062306a36Sopenharmony_ci{ 68162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_POST_CLAMP_REG_LOW__SHIFT) & MDP5_PIPE_CSC_1_POST_CLAMP_REG_LOW__MASK; 68262306a36Sopenharmony_ci} 68362306a36Sopenharmony_ci 68462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_PRE_BIAS(enum mdp5_pipe i0, uint32_t i1) { return 0x0000034c + __offset_PIPE(i0) + 0x4*i1; } 68562306a36Sopenharmony_ci 68662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_PRE_BIAS_REG(enum mdp5_pipe i0, uint32_t i1) { return 0x0000034c + __offset_PIPE(i0) + 0x4*i1; } 68762306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_PRE_BIAS_REG_VALUE__MASK 0x000001ff 68862306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_PRE_BIAS_REG_VALUE__SHIFT 0 68962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_PRE_BIAS_REG_VALUE(uint32_t val) 69062306a36Sopenharmony_ci{ 69162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_PRE_BIAS_REG_VALUE__SHIFT) & MDP5_PIPE_CSC_1_PRE_BIAS_REG_VALUE__MASK; 69262306a36Sopenharmony_ci} 69362306a36Sopenharmony_ci 69462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_POST_BIAS(enum mdp5_pipe i0, uint32_t i1) { return 0x00000358 + __offset_PIPE(i0) + 0x4*i1; } 69562306a36Sopenharmony_ci 69662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CSC_1_POST_BIAS_REG(enum mdp5_pipe i0, uint32_t i1) { return 0x00000358 + __offset_PIPE(i0) + 0x4*i1; } 69762306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_POST_BIAS_REG_VALUE__MASK 0x000001ff 69862306a36Sopenharmony_ci#define MDP5_PIPE_CSC_1_POST_BIAS_REG_VALUE__SHIFT 0 69962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_CSC_1_POST_BIAS_REG_VALUE(uint32_t val) 70062306a36Sopenharmony_ci{ 70162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_CSC_1_POST_BIAS_REG_VALUE__SHIFT) & MDP5_PIPE_CSC_1_POST_BIAS_REG_VALUE__MASK; 70262306a36Sopenharmony_ci} 70362306a36Sopenharmony_ci 70462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_SIZE(enum mdp5_pipe i0) { return 0x00000000 + __offset_PIPE(i0); } 70562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_SIZE_HEIGHT__MASK 0xffff0000 70662306a36Sopenharmony_ci#define MDP5_PIPE_SRC_SIZE_HEIGHT__SHIFT 16 70762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_SIZE_HEIGHT(uint32_t val) 70862306a36Sopenharmony_ci{ 70962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_SIZE_HEIGHT__SHIFT) & MDP5_PIPE_SRC_SIZE_HEIGHT__MASK; 71062306a36Sopenharmony_ci} 71162306a36Sopenharmony_ci#define MDP5_PIPE_SRC_SIZE_WIDTH__MASK 0x0000ffff 71262306a36Sopenharmony_ci#define MDP5_PIPE_SRC_SIZE_WIDTH__SHIFT 0 71362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_SIZE_WIDTH(uint32_t val) 71462306a36Sopenharmony_ci{ 71562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_SIZE_WIDTH__SHIFT) & MDP5_PIPE_SRC_SIZE_WIDTH__MASK; 71662306a36Sopenharmony_ci} 71762306a36Sopenharmony_ci 71862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_IMG_SIZE(enum mdp5_pipe i0) { return 0x00000004 + __offset_PIPE(i0); } 71962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_IMG_SIZE_HEIGHT__MASK 0xffff0000 72062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_IMG_SIZE_HEIGHT__SHIFT 16 72162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_IMG_SIZE_HEIGHT(uint32_t val) 72262306a36Sopenharmony_ci{ 72362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_IMG_SIZE_HEIGHT__SHIFT) & MDP5_PIPE_SRC_IMG_SIZE_HEIGHT__MASK; 72462306a36Sopenharmony_ci} 72562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_IMG_SIZE_WIDTH__MASK 0x0000ffff 72662306a36Sopenharmony_ci#define MDP5_PIPE_SRC_IMG_SIZE_WIDTH__SHIFT 0 72762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_IMG_SIZE_WIDTH(uint32_t val) 72862306a36Sopenharmony_ci{ 72962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_IMG_SIZE_WIDTH__SHIFT) & MDP5_PIPE_SRC_IMG_SIZE_WIDTH__MASK; 73062306a36Sopenharmony_ci} 73162306a36Sopenharmony_ci 73262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_XY(enum mdp5_pipe i0) { return 0x00000008 + __offset_PIPE(i0); } 73362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_XY_Y__MASK 0xffff0000 73462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_XY_Y__SHIFT 16 73562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_XY_Y(uint32_t val) 73662306a36Sopenharmony_ci{ 73762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_XY_Y__SHIFT) & MDP5_PIPE_SRC_XY_Y__MASK; 73862306a36Sopenharmony_ci} 73962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_XY_X__MASK 0x0000ffff 74062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_XY_X__SHIFT 0 74162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_XY_X(uint32_t val) 74262306a36Sopenharmony_ci{ 74362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_XY_X__SHIFT) & MDP5_PIPE_SRC_XY_X__MASK; 74462306a36Sopenharmony_ci} 74562306a36Sopenharmony_ci 74662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_OUT_SIZE(enum mdp5_pipe i0) { return 0x0000000c + __offset_PIPE(i0); } 74762306a36Sopenharmony_ci#define MDP5_PIPE_OUT_SIZE_HEIGHT__MASK 0xffff0000 74862306a36Sopenharmony_ci#define MDP5_PIPE_OUT_SIZE_HEIGHT__SHIFT 16 74962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_OUT_SIZE_HEIGHT(uint32_t val) 75062306a36Sopenharmony_ci{ 75162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_OUT_SIZE_HEIGHT__SHIFT) & MDP5_PIPE_OUT_SIZE_HEIGHT__MASK; 75262306a36Sopenharmony_ci} 75362306a36Sopenharmony_ci#define MDP5_PIPE_OUT_SIZE_WIDTH__MASK 0x0000ffff 75462306a36Sopenharmony_ci#define MDP5_PIPE_OUT_SIZE_WIDTH__SHIFT 0 75562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_OUT_SIZE_WIDTH(uint32_t val) 75662306a36Sopenharmony_ci{ 75762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_OUT_SIZE_WIDTH__SHIFT) & MDP5_PIPE_OUT_SIZE_WIDTH__MASK; 75862306a36Sopenharmony_ci} 75962306a36Sopenharmony_ci 76062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_OUT_XY(enum mdp5_pipe i0) { return 0x00000010 + __offset_PIPE(i0); } 76162306a36Sopenharmony_ci#define MDP5_PIPE_OUT_XY_Y__MASK 0xffff0000 76262306a36Sopenharmony_ci#define MDP5_PIPE_OUT_XY_Y__SHIFT 16 76362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_OUT_XY_Y(uint32_t val) 76462306a36Sopenharmony_ci{ 76562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_OUT_XY_Y__SHIFT) & MDP5_PIPE_OUT_XY_Y__MASK; 76662306a36Sopenharmony_ci} 76762306a36Sopenharmony_ci#define MDP5_PIPE_OUT_XY_X__MASK 0x0000ffff 76862306a36Sopenharmony_ci#define MDP5_PIPE_OUT_XY_X__SHIFT 0 76962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_OUT_XY_X(uint32_t val) 77062306a36Sopenharmony_ci{ 77162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_OUT_XY_X__SHIFT) & MDP5_PIPE_OUT_XY_X__MASK; 77262306a36Sopenharmony_ci} 77362306a36Sopenharmony_ci 77462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC0_ADDR(enum mdp5_pipe i0) { return 0x00000014 + __offset_PIPE(i0); } 77562306a36Sopenharmony_ci 77662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC1_ADDR(enum mdp5_pipe i0) { return 0x00000018 + __offset_PIPE(i0); } 77762306a36Sopenharmony_ci 77862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC2_ADDR(enum mdp5_pipe i0) { return 0x0000001c + __offset_PIPE(i0); } 77962306a36Sopenharmony_ci 78062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC3_ADDR(enum mdp5_pipe i0) { return 0x00000020 + __offset_PIPE(i0); } 78162306a36Sopenharmony_ci 78262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_STRIDE_A(enum mdp5_pipe i0) { return 0x00000024 + __offset_PIPE(i0); } 78362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_A_P0__MASK 0x0000ffff 78462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_A_P0__SHIFT 0 78562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_STRIDE_A_P0(uint32_t val) 78662306a36Sopenharmony_ci{ 78762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_STRIDE_A_P0__SHIFT) & MDP5_PIPE_SRC_STRIDE_A_P0__MASK; 78862306a36Sopenharmony_ci} 78962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_A_P1__MASK 0xffff0000 79062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_A_P1__SHIFT 16 79162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_STRIDE_A_P1(uint32_t val) 79262306a36Sopenharmony_ci{ 79362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_STRIDE_A_P1__SHIFT) & MDP5_PIPE_SRC_STRIDE_A_P1__MASK; 79462306a36Sopenharmony_ci} 79562306a36Sopenharmony_ci 79662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_STRIDE_B(enum mdp5_pipe i0) { return 0x00000028 + __offset_PIPE(i0); } 79762306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_B_P2__MASK 0x0000ffff 79862306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_B_P2__SHIFT 0 79962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_STRIDE_B_P2(uint32_t val) 80062306a36Sopenharmony_ci{ 80162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_STRIDE_B_P2__SHIFT) & MDP5_PIPE_SRC_STRIDE_B_P2__MASK; 80262306a36Sopenharmony_ci} 80362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_B_P3__MASK 0xffff0000 80462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_STRIDE_B_P3__SHIFT 16 80562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_STRIDE_B_P3(uint32_t val) 80662306a36Sopenharmony_ci{ 80762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_STRIDE_B_P3__SHIFT) & MDP5_PIPE_SRC_STRIDE_B_P3__MASK; 80862306a36Sopenharmony_ci} 80962306a36Sopenharmony_ci 81062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_STILE_FRAME_SIZE(enum mdp5_pipe i0) { return 0x0000002c + __offset_PIPE(i0); } 81162306a36Sopenharmony_ci 81262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_FORMAT(enum mdp5_pipe i0) { return 0x00000030 + __offset_PIPE(i0); } 81362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_G_BPC__MASK 0x00000003 81462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_G_BPC__SHIFT 0 81562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_G_BPC(enum mdp_bpc val) 81662306a36Sopenharmony_ci{ 81762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_G_BPC__SHIFT) & MDP5_PIPE_SRC_FORMAT_G_BPC__MASK; 81862306a36Sopenharmony_ci} 81962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_B_BPC__MASK 0x0000000c 82062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_B_BPC__SHIFT 2 82162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_B_BPC(enum mdp_bpc val) 82262306a36Sopenharmony_ci{ 82362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_B_BPC__SHIFT) & MDP5_PIPE_SRC_FORMAT_B_BPC__MASK; 82462306a36Sopenharmony_ci} 82562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_R_BPC__MASK 0x00000030 82662306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_R_BPC__SHIFT 4 82762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_R_BPC(enum mdp_bpc val) 82862306a36Sopenharmony_ci{ 82962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_R_BPC__SHIFT) & MDP5_PIPE_SRC_FORMAT_R_BPC__MASK; 83062306a36Sopenharmony_ci} 83162306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_A_BPC__MASK 0x000000c0 83262306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_A_BPC__SHIFT 6 83362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_A_BPC(enum mdp_bpc_alpha val) 83462306a36Sopenharmony_ci{ 83562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_A_BPC__SHIFT) & MDP5_PIPE_SRC_FORMAT_A_BPC__MASK; 83662306a36Sopenharmony_ci} 83762306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_ALPHA_ENABLE 0x00000100 83862306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_CPP__MASK 0x00000600 83962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_CPP__SHIFT 9 84062306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_CPP(uint32_t val) 84162306a36Sopenharmony_ci{ 84262306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_CPP__SHIFT) & MDP5_PIPE_SRC_FORMAT_CPP__MASK; 84362306a36Sopenharmony_ci} 84462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_ROT90 0x00000800 84562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_UNPACK_COUNT__MASK 0x00003000 84662306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_UNPACK_COUNT__SHIFT 12 84762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_UNPACK_COUNT(uint32_t val) 84862306a36Sopenharmony_ci{ 84962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_UNPACK_COUNT__SHIFT) & MDP5_PIPE_SRC_FORMAT_UNPACK_COUNT__MASK; 85062306a36Sopenharmony_ci} 85162306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_UNPACK_TIGHT 0x00020000 85262306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_UNPACK_ALIGN_MSB 0x00040000 85362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_FETCH_TYPE__MASK 0x00180000 85462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_FETCH_TYPE__SHIFT 19 85562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_FETCH_TYPE(enum mdp_fetch_type val) 85662306a36Sopenharmony_ci{ 85762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_FETCH_TYPE__SHIFT) & MDP5_PIPE_SRC_FORMAT_FETCH_TYPE__MASK; 85862306a36Sopenharmony_ci} 85962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_CHROMA_SAMP__MASK 0x01800000 86062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_FORMAT_CHROMA_SAMP__SHIFT 23 86162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_FORMAT_CHROMA_SAMP(enum mdp_chroma_samp_type val) 86262306a36Sopenharmony_ci{ 86362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_FORMAT_CHROMA_SAMP__SHIFT) & MDP5_PIPE_SRC_FORMAT_CHROMA_SAMP__MASK; 86462306a36Sopenharmony_ci} 86562306a36Sopenharmony_ci 86662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_UNPACK(enum mdp5_pipe i0) { return 0x00000034 + __offset_PIPE(i0); } 86762306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM0__MASK 0x000000ff 86862306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM0__SHIFT 0 86962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_UNPACK_ELEM0(uint32_t val) 87062306a36Sopenharmony_ci{ 87162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_UNPACK_ELEM0__SHIFT) & MDP5_PIPE_SRC_UNPACK_ELEM0__MASK; 87262306a36Sopenharmony_ci} 87362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM1__MASK 0x0000ff00 87462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM1__SHIFT 8 87562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_UNPACK_ELEM1(uint32_t val) 87662306a36Sopenharmony_ci{ 87762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_UNPACK_ELEM1__SHIFT) & MDP5_PIPE_SRC_UNPACK_ELEM1__MASK; 87862306a36Sopenharmony_ci} 87962306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM2__MASK 0x00ff0000 88062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM2__SHIFT 16 88162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_UNPACK_ELEM2(uint32_t val) 88262306a36Sopenharmony_ci{ 88362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_UNPACK_ELEM2__SHIFT) & MDP5_PIPE_SRC_UNPACK_ELEM2__MASK; 88462306a36Sopenharmony_ci} 88562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM3__MASK 0xff000000 88662306a36Sopenharmony_ci#define MDP5_PIPE_SRC_UNPACK_ELEM3__SHIFT 24 88762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_UNPACK_ELEM3(uint32_t val) 88862306a36Sopenharmony_ci{ 88962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_UNPACK_ELEM3__SHIFT) & MDP5_PIPE_SRC_UNPACK_ELEM3__MASK; 89062306a36Sopenharmony_ci} 89162306a36Sopenharmony_ci 89262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_OP_MODE(enum mdp5_pipe i0) { return 0x00000038 + __offset_PIPE(i0); } 89362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_BWC_EN 0x00000001 89462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_BWC__MASK 0x00000006 89562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_BWC__SHIFT 1 89662306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SRC_OP_MODE_BWC(enum mdp5_pipe_bwc val) 89762306a36Sopenharmony_ci{ 89862306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SRC_OP_MODE_BWC__SHIFT) & MDP5_PIPE_SRC_OP_MODE_BWC__MASK; 89962306a36Sopenharmony_ci} 90062306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_FLIP_LR 0x00002000 90162306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_FLIP_UD 0x00004000 90262306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_IGC_EN 0x00010000 90362306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_IGC_ROM_0 0x00020000 90462306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_IGC_ROM_1 0x00040000 90562306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_DEINTERLACE 0x00400000 90662306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_DEINTERLACE_ODD 0x00800000 90762306a36Sopenharmony_ci#define MDP5_PIPE_SRC_OP_MODE_SW_PIX_EXT_OVERRIDE 0x80000000 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_CONSTANT_COLOR(enum mdp5_pipe i0) { return 0x0000003c + __offset_PIPE(i0); } 91062306a36Sopenharmony_ci 91162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_FETCH_CONFIG(enum mdp5_pipe i0) { return 0x00000048 + __offset_PIPE(i0); } 91262306a36Sopenharmony_ci 91362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_VC1_RANGE(enum mdp5_pipe i0) { return 0x0000004c + __offset_PIPE(i0); } 91462306a36Sopenharmony_ci 91562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_REQPRIO_FIFO_WM_0(enum mdp5_pipe i0) { return 0x00000050 + __offset_PIPE(i0); } 91662306a36Sopenharmony_ci 91762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_REQPRIO_FIFO_WM_1(enum mdp5_pipe i0) { return 0x00000054 + __offset_PIPE(i0); } 91862306a36Sopenharmony_ci 91962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_REQPRIO_FIFO_WM_2(enum mdp5_pipe i0) { return 0x00000058 + __offset_PIPE(i0); } 92062306a36Sopenharmony_ci 92162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SRC_ADDR_SW_STATUS(enum mdp5_pipe i0) { return 0x00000070 + __offset_PIPE(i0); } 92262306a36Sopenharmony_ci 92362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CURRENT_SRC0_ADDR(enum mdp5_pipe i0) { return 0x000000a4 + __offset_PIPE(i0); } 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CURRENT_SRC1_ADDR(enum mdp5_pipe i0) { return 0x000000a8 + __offset_PIPE(i0); } 92662306a36Sopenharmony_ci 92762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CURRENT_SRC2_ADDR(enum mdp5_pipe i0) { return 0x000000ac + __offset_PIPE(i0); } 92862306a36Sopenharmony_ci 92962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_CURRENT_SRC3_ADDR(enum mdp5_pipe i0) { return 0x000000b0 + __offset_PIPE(i0); } 93062306a36Sopenharmony_ci 93162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_DECIMATION(enum mdp5_pipe i0) { return 0x000000b4 + __offset_PIPE(i0); } 93262306a36Sopenharmony_ci#define MDP5_PIPE_DECIMATION_VERT__MASK 0x000000ff 93362306a36Sopenharmony_ci#define MDP5_PIPE_DECIMATION_VERT__SHIFT 0 93462306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_DECIMATION_VERT(uint32_t val) 93562306a36Sopenharmony_ci{ 93662306a36Sopenharmony_ci return ((val) << MDP5_PIPE_DECIMATION_VERT__SHIFT) & MDP5_PIPE_DECIMATION_VERT__MASK; 93762306a36Sopenharmony_ci} 93862306a36Sopenharmony_ci#define MDP5_PIPE_DECIMATION_HORZ__MASK 0x0000ff00 93962306a36Sopenharmony_ci#define MDP5_PIPE_DECIMATION_HORZ__SHIFT 8 94062306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_DECIMATION_HORZ(uint32_t val) 94162306a36Sopenharmony_ci{ 94262306a36Sopenharmony_ci return ((val) << MDP5_PIPE_DECIMATION_HORZ__SHIFT) & MDP5_PIPE_DECIMATION_HORZ__MASK; 94362306a36Sopenharmony_ci} 94462306a36Sopenharmony_ci 94562306a36Sopenharmony_cistatic inline uint32_t __offset_SW_PIX_EXT(enum mdp_component_type idx) 94662306a36Sopenharmony_ci{ 94762306a36Sopenharmony_ci switch (idx) { 94862306a36Sopenharmony_ci case COMP_0: return 0x00000100; 94962306a36Sopenharmony_ci case COMP_1_2: return 0x00000110; 95062306a36Sopenharmony_ci case COMP_3: return 0x00000120; 95162306a36Sopenharmony_ci default: return INVALID_IDX(idx); 95262306a36Sopenharmony_ci } 95362306a36Sopenharmony_ci} 95462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SW_PIX_EXT(enum mdp5_pipe i0, enum mdp_component_type i1) { return 0x00000000 + __offset_PIPE(i0) + __offset_SW_PIX_EXT(i1); } 95562306a36Sopenharmony_ci 95662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SW_PIX_EXT_LR(enum mdp5_pipe i0, enum mdp_component_type i1) { return 0x00000000 + __offset_PIPE(i0) + __offset_SW_PIX_EXT(i1); } 95762306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_LEFT_RPT__MASK 0x000000ff 95862306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_LEFT_RPT__SHIFT 0 95962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_LR_LEFT_RPT(uint32_t val) 96062306a36Sopenharmony_ci{ 96162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_LR_LEFT_RPT__SHIFT) & MDP5_PIPE_SW_PIX_EXT_LR_LEFT_RPT__MASK; 96262306a36Sopenharmony_ci} 96362306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_LEFT_OVF__MASK 0x0000ff00 96462306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_LEFT_OVF__SHIFT 8 96562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_LR_LEFT_OVF(int32_t val) 96662306a36Sopenharmony_ci{ 96762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_LR_LEFT_OVF__SHIFT) & MDP5_PIPE_SW_PIX_EXT_LR_LEFT_OVF__MASK; 96862306a36Sopenharmony_ci} 96962306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_RPT__MASK 0x00ff0000 97062306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_RPT__SHIFT 16 97162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_RPT(uint32_t val) 97262306a36Sopenharmony_ci{ 97362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_RPT__SHIFT) & MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_RPT__MASK; 97462306a36Sopenharmony_ci} 97562306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_OVF__MASK 0xff000000 97662306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_OVF__SHIFT 24 97762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_OVF(int32_t val) 97862306a36Sopenharmony_ci{ 97962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_OVF__SHIFT) & MDP5_PIPE_SW_PIX_EXT_LR_RIGHT_OVF__MASK; 98062306a36Sopenharmony_ci} 98162306a36Sopenharmony_ci 98262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SW_PIX_EXT_TB(enum mdp5_pipe i0, enum mdp_component_type i1) { return 0x00000004 + __offset_PIPE(i0) + __offset_SW_PIX_EXT(i1); } 98362306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_TOP_RPT__MASK 0x000000ff 98462306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_TOP_RPT__SHIFT 0 98562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_TB_TOP_RPT(uint32_t val) 98662306a36Sopenharmony_ci{ 98762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_TB_TOP_RPT__SHIFT) & MDP5_PIPE_SW_PIX_EXT_TB_TOP_RPT__MASK; 98862306a36Sopenharmony_ci} 98962306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_TOP_OVF__MASK 0x0000ff00 99062306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_TOP_OVF__SHIFT 8 99162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_TB_TOP_OVF(int32_t val) 99262306a36Sopenharmony_ci{ 99362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_TB_TOP_OVF__SHIFT) & MDP5_PIPE_SW_PIX_EXT_TB_TOP_OVF__MASK; 99462306a36Sopenharmony_ci} 99562306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_RPT__MASK 0x00ff0000 99662306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_RPT__SHIFT 16 99762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_RPT(uint32_t val) 99862306a36Sopenharmony_ci{ 99962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_RPT__SHIFT) & MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_RPT__MASK; 100062306a36Sopenharmony_ci} 100162306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_OVF__MASK 0xff000000 100262306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_OVF__SHIFT 24 100362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_OVF(int32_t val) 100462306a36Sopenharmony_ci{ 100562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_OVF__SHIFT) & MDP5_PIPE_SW_PIX_EXT_TB_BOTTOM_OVF__MASK; 100662306a36Sopenharmony_ci} 100762306a36Sopenharmony_ci 100862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS(enum mdp5_pipe i0, enum mdp_component_type i1) { return 0x00000008 + __offset_PIPE(i0) + __offset_SW_PIX_EXT(i1); } 100962306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_LEFT_RIGHT__MASK 0x0000ffff 101062306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_LEFT_RIGHT__SHIFT 0 101162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_LEFT_RIGHT(uint32_t val) 101262306a36Sopenharmony_ci{ 101362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_LEFT_RIGHT__SHIFT) & MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_LEFT_RIGHT__MASK; 101462306a36Sopenharmony_ci} 101562306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_TOP_BOTTOM__MASK 0xffff0000 101662306a36Sopenharmony_ci#define MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_TOP_BOTTOM__SHIFT 16 101762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_TOP_BOTTOM(uint32_t val) 101862306a36Sopenharmony_ci{ 101962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_TOP_BOTTOM__SHIFT) & MDP5_PIPE_SW_PIX_EXT_REQ_PIXELS_TOP_BOTTOM__MASK; 102062306a36Sopenharmony_ci} 102162306a36Sopenharmony_ci 102262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_CONFIG(enum mdp5_pipe i0) { return 0x00000204 + __offset_PIPE(i0); } 102362306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_EN 0x00000001 102462306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_EN 0x00000002 102562306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_0__MASK 0x00000300 102662306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_0__SHIFT 8 102762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_0(enum mdp5_scale_filter val) 102862306a36Sopenharmony_ci{ 102962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_0__SHIFT) & MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_0__MASK; 103062306a36Sopenharmony_ci} 103162306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_0__MASK 0x00000c00 103262306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_0__SHIFT 10 103362306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_0(enum mdp5_scale_filter val) 103462306a36Sopenharmony_ci{ 103562306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_0__SHIFT) & MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_0__MASK; 103662306a36Sopenharmony_ci} 103762306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_1_2__MASK 0x00003000 103862306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_1_2__SHIFT 12 103962306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_1_2(enum mdp5_scale_filter val) 104062306a36Sopenharmony_ci{ 104162306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_1_2__SHIFT) & MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_1_2__MASK; 104262306a36Sopenharmony_ci} 104362306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_1_2__MASK 0x0000c000 104462306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_1_2__SHIFT 14 104562306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_1_2(enum mdp5_scale_filter val) 104662306a36Sopenharmony_ci{ 104762306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_1_2__SHIFT) & MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_1_2__MASK; 104862306a36Sopenharmony_ci} 104962306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_3__MASK 0x00030000 105062306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_3__SHIFT 16 105162306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_3(enum mdp5_scale_filter val) 105262306a36Sopenharmony_ci{ 105362306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_3__SHIFT) & MDP5_PIPE_SCALE_CONFIG_SCALEX_FILTER_COMP_3__MASK; 105462306a36Sopenharmony_ci} 105562306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_3__MASK 0x000c0000 105662306a36Sopenharmony_ci#define MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_3__SHIFT 18 105762306a36Sopenharmony_cistatic inline uint32_t MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_3(enum mdp5_scale_filter val) 105862306a36Sopenharmony_ci{ 105962306a36Sopenharmony_ci return ((val) << MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_3__SHIFT) & MDP5_PIPE_SCALE_CONFIG_SCALEY_FILTER_COMP_3__MASK; 106062306a36Sopenharmony_ci} 106162306a36Sopenharmony_ci 106262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_PHASE_STEP_X(enum mdp5_pipe i0) { return 0x00000210 + __offset_PIPE(i0); } 106362306a36Sopenharmony_ci 106462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_PHASE_STEP_Y(enum mdp5_pipe i0) { return 0x00000214 + __offset_PIPE(i0); } 106562306a36Sopenharmony_ci 106662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_CR_PHASE_STEP_X(enum mdp5_pipe i0) { return 0x00000218 + __offset_PIPE(i0); } 106762306a36Sopenharmony_ci 106862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_CR_PHASE_STEP_Y(enum mdp5_pipe i0) { return 0x0000021c + __offset_PIPE(i0); } 106962306a36Sopenharmony_ci 107062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_INIT_PHASE_X(enum mdp5_pipe i0) { return 0x00000220 + __offset_PIPE(i0); } 107162306a36Sopenharmony_ci 107262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PIPE_SCALE_INIT_PHASE_Y(enum mdp5_pipe i0) { return 0x00000224 + __offset_PIPE(i0); } 107362306a36Sopenharmony_ci 107462306a36Sopenharmony_cistatic inline uint32_t __offset_LM(uint32_t idx) 107562306a36Sopenharmony_ci{ 107662306a36Sopenharmony_ci switch (idx) { 107762306a36Sopenharmony_ci case 0: return (mdp5_cfg->lm.base[0]); 107862306a36Sopenharmony_ci case 1: return (mdp5_cfg->lm.base[1]); 107962306a36Sopenharmony_ci case 2: return (mdp5_cfg->lm.base[2]); 108062306a36Sopenharmony_ci case 3: return (mdp5_cfg->lm.base[3]); 108162306a36Sopenharmony_ci case 4: return (mdp5_cfg->lm.base[4]); 108262306a36Sopenharmony_ci case 5: return (mdp5_cfg->lm.base[5]); 108362306a36Sopenharmony_ci default: return INVALID_IDX(idx); 108462306a36Sopenharmony_ci } 108562306a36Sopenharmony_ci} 108662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM(uint32_t i0) { return 0x00000000 + __offset_LM(i0); } 108762306a36Sopenharmony_ci 108862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_COLOR_OUT(uint32_t i0) { return 0x00000000 + __offset_LM(i0); } 108962306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE0_FG_ALPHA 0x00000002 109062306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE1_FG_ALPHA 0x00000004 109162306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE2_FG_ALPHA 0x00000008 109262306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE3_FG_ALPHA 0x00000010 109362306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE4_FG_ALPHA 0x00000020 109462306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE5_FG_ALPHA 0x00000040 109562306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_STAGE6_FG_ALPHA 0x00000080 109662306a36Sopenharmony_ci#define MDP5_LM_BLEND_COLOR_OUT_SPLIT_LEFT_RIGHT 0x80000000 109762306a36Sopenharmony_ci 109862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_OUT_SIZE(uint32_t i0) { return 0x00000004 + __offset_LM(i0); } 109962306a36Sopenharmony_ci#define MDP5_LM_OUT_SIZE_HEIGHT__MASK 0xffff0000 110062306a36Sopenharmony_ci#define MDP5_LM_OUT_SIZE_HEIGHT__SHIFT 16 110162306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_OUT_SIZE_HEIGHT(uint32_t val) 110262306a36Sopenharmony_ci{ 110362306a36Sopenharmony_ci return ((val) << MDP5_LM_OUT_SIZE_HEIGHT__SHIFT) & MDP5_LM_OUT_SIZE_HEIGHT__MASK; 110462306a36Sopenharmony_ci} 110562306a36Sopenharmony_ci#define MDP5_LM_OUT_SIZE_WIDTH__MASK 0x0000ffff 110662306a36Sopenharmony_ci#define MDP5_LM_OUT_SIZE_WIDTH__SHIFT 0 110762306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_OUT_SIZE_WIDTH(uint32_t val) 110862306a36Sopenharmony_ci{ 110962306a36Sopenharmony_ci return ((val) << MDP5_LM_OUT_SIZE_WIDTH__SHIFT) & MDP5_LM_OUT_SIZE_WIDTH__MASK; 111062306a36Sopenharmony_ci} 111162306a36Sopenharmony_ci 111262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BORDER_COLOR_0(uint32_t i0) { return 0x00000008 + __offset_LM(i0); } 111362306a36Sopenharmony_ci 111462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BORDER_COLOR_1(uint32_t i0) { return 0x00000010 + __offset_LM(i0); } 111562306a36Sopenharmony_ci 111662306a36Sopenharmony_cistatic inline uint32_t __offset_BLEND(uint32_t idx) 111762306a36Sopenharmony_ci{ 111862306a36Sopenharmony_ci switch (idx) { 111962306a36Sopenharmony_ci case 0: return 0x00000020; 112062306a36Sopenharmony_ci case 1: return 0x00000050; 112162306a36Sopenharmony_ci case 2: return 0x00000080; 112262306a36Sopenharmony_ci case 3: return 0x000000b0; 112362306a36Sopenharmony_ci case 4: return 0x00000230; 112462306a36Sopenharmony_ci case 5: return 0x00000260; 112562306a36Sopenharmony_ci case 6: return 0x00000290; 112662306a36Sopenharmony_ci default: return INVALID_IDX(idx); 112762306a36Sopenharmony_ci } 112862306a36Sopenharmony_ci} 112962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_LM(i0) + __offset_BLEND(i1); } 113062306a36Sopenharmony_ci 113162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_OP_MODE(uint32_t i0, uint32_t i1) { return 0x00000000 + __offset_LM(i0) + __offset_BLEND(i1); } 113262306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_FG_ALPHA__MASK 0x00000003 113362306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_FG_ALPHA__SHIFT 0 113462306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_BLEND_OP_MODE_FG_ALPHA(enum mdp_alpha_type val) 113562306a36Sopenharmony_ci{ 113662306a36Sopenharmony_ci return ((val) << MDP5_LM_BLEND_OP_MODE_FG_ALPHA__SHIFT) & MDP5_LM_BLEND_OP_MODE_FG_ALPHA__MASK; 113762306a36Sopenharmony_ci} 113862306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_FG_INV_ALPHA 0x00000004 113962306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_FG_MOD_ALPHA 0x00000008 114062306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_FG_INV_MOD_ALPHA 0x00000010 114162306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_FG_TRANSP_EN 0x00000020 114262306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_BG_ALPHA__MASK 0x00000300 114362306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_BG_ALPHA__SHIFT 8 114462306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_BLEND_OP_MODE_BG_ALPHA(enum mdp_alpha_type val) 114562306a36Sopenharmony_ci{ 114662306a36Sopenharmony_ci return ((val) << MDP5_LM_BLEND_OP_MODE_BG_ALPHA__SHIFT) & MDP5_LM_BLEND_OP_MODE_BG_ALPHA__MASK; 114762306a36Sopenharmony_ci} 114862306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_BG_INV_ALPHA 0x00000400 114962306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_BG_MOD_ALPHA 0x00000800 115062306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_BG_INV_MOD_ALPHA 0x00001000 115162306a36Sopenharmony_ci#define MDP5_LM_BLEND_OP_MODE_BG_TRANSP_EN 0x00002000 115262306a36Sopenharmony_ci 115362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_FG_ALPHA(uint32_t i0, uint32_t i1) { return 0x00000004 + __offset_LM(i0) + __offset_BLEND(i1); } 115462306a36Sopenharmony_ci 115562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_BG_ALPHA(uint32_t i0, uint32_t i1) { return 0x00000008 + __offset_LM(i0) + __offset_BLEND(i1); } 115662306a36Sopenharmony_ci 115762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_FG_TRANSP_LOW0(uint32_t i0, uint32_t i1) { return 0x0000000c + __offset_LM(i0) + __offset_BLEND(i1); } 115862306a36Sopenharmony_ci 115962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_FG_TRANSP_LOW1(uint32_t i0, uint32_t i1) { return 0x00000010 + __offset_LM(i0) + __offset_BLEND(i1); } 116062306a36Sopenharmony_ci 116162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_FG_TRANSP_HIGH0(uint32_t i0, uint32_t i1) { return 0x00000014 + __offset_LM(i0) + __offset_BLEND(i1); } 116262306a36Sopenharmony_ci 116362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_FG_TRANSP_HIGH1(uint32_t i0, uint32_t i1) { return 0x00000018 + __offset_LM(i0) + __offset_BLEND(i1); } 116462306a36Sopenharmony_ci 116562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_BG_TRANSP_LOW0(uint32_t i0, uint32_t i1) { return 0x0000001c + __offset_LM(i0) + __offset_BLEND(i1); } 116662306a36Sopenharmony_ci 116762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_BG_TRANSP_LOW1(uint32_t i0, uint32_t i1) { return 0x00000020 + __offset_LM(i0) + __offset_BLEND(i1); } 116862306a36Sopenharmony_ci 116962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_BG_TRANSP_HIGH0(uint32_t i0, uint32_t i1) { return 0x00000024 + __offset_LM(i0) + __offset_BLEND(i1); } 117062306a36Sopenharmony_ci 117162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_BLEND_BG_TRANSP_HIGH1(uint32_t i0, uint32_t i1) { return 0x00000028 + __offset_LM(i0) + __offset_BLEND(i1); } 117262306a36Sopenharmony_ci 117362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_IMG_SIZE(uint32_t i0) { return 0x000000e0 + __offset_LM(i0); } 117462306a36Sopenharmony_ci#define MDP5_LM_CURSOR_IMG_SIZE_SRC_W__MASK 0x0000ffff 117562306a36Sopenharmony_ci#define MDP5_LM_CURSOR_IMG_SIZE_SRC_W__SHIFT 0 117662306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_IMG_SIZE_SRC_W(uint32_t val) 117762306a36Sopenharmony_ci{ 117862306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_IMG_SIZE_SRC_W__SHIFT) & MDP5_LM_CURSOR_IMG_SIZE_SRC_W__MASK; 117962306a36Sopenharmony_ci} 118062306a36Sopenharmony_ci#define MDP5_LM_CURSOR_IMG_SIZE_SRC_H__MASK 0xffff0000 118162306a36Sopenharmony_ci#define MDP5_LM_CURSOR_IMG_SIZE_SRC_H__SHIFT 16 118262306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_IMG_SIZE_SRC_H(uint32_t val) 118362306a36Sopenharmony_ci{ 118462306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_IMG_SIZE_SRC_H__SHIFT) & MDP5_LM_CURSOR_IMG_SIZE_SRC_H__MASK; 118562306a36Sopenharmony_ci} 118662306a36Sopenharmony_ci 118762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_SIZE(uint32_t i0) { return 0x000000e4 + __offset_LM(i0); } 118862306a36Sopenharmony_ci#define MDP5_LM_CURSOR_SIZE_ROI_W__MASK 0x0000ffff 118962306a36Sopenharmony_ci#define MDP5_LM_CURSOR_SIZE_ROI_W__SHIFT 0 119062306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_SIZE_ROI_W(uint32_t val) 119162306a36Sopenharmony_ci{ 119262306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_SIZE_ROI_W__SHIFT) & MDP5_LM_CURSOR_SIZE_ROI_W__MASK; 119362306a36Sopenharmony_ci} 119462306a36Sopenharmony_ci#define MDP5_LM_CURSOR_SIZE_ROI_H__MASK 0xffff0000 119562306a36Sopenharmony_ci#define MDP5_LM_CURSOR_SIZE_ROI_H__SHIFT 16 119662306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_SIZE_ROI_H(uint32_t val) 119762306a36Sopenharmony_ci{ 119862306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_SIZE_ROI_H__SHIFT) & MDP5_LM_CURSOR_SIZE_ROI_H__MASK; 119962306a36Sopenharmony_ci} 120062306a36Sopenharmony_ci 120162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_XY(uint32_t i0) { return 0x000000e8 + __offset_LM(i0); } 120262306a36Sopenharmony_ci#define MDP5_LM_CURSOR_XY_SRC_X__MASK 0x0000ffff 120362306a36Sopenharmony_ci#define MDP5_LM_CURSOR_XY_SRC_X__SHIFT 0 120462306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_XY_SRC_X(uint32_t val) 120562306a36Sopenharmony_ci{ 120662306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_XY_SRC_X__SHIFT) & MDP5_LM_CURSOR_XY_SRC_X__MASK; 120762306a36Sopenharmony_ci} 120862306a36Sopenharmony_ci#define MDP5_LM_CURSOR_XY_SRC_Y__MASK 0xffff0000 120962306a36Sopenharmony_ci#define MDP5_LM_CURSOR_XY_SRC_Y__SHIFT 16 121062306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_XY_SRC_Y(uint32_t val) 121162306a36Sopenharmony_ci{ 121262306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_XY_SRC_Y__SHIFT) & MDP5_LM_CURSOR_XY_SRC_Y__MASK; 121362306a36Sopenharmony_ci} 121462306a36Sopenharmony_ci 121562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_STRIDE(uint32_t i0) { return 0x000000dc + __offset_LM(i0); } 121662306a36Sopenharmony_ci#define MDP5_LM_CURSOR_STRIDE_STRIDE__MASK 0x0000ffff 121762306a36Sopenharmony_ci#define MDP5_LM_CURSOR_STRIDE_STRIDE__SHIFT 0 121862306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_STRIDE_STRIDE(uint32_t val) 121962306a36Sopenharmony_ci{ 122062306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_STRIDE_STRIDE__SHIFT) & MDP5_LM_CURSOR_STRIDE_STRIDE__MASK; 122162306a36Sopenharmony_ci} 122262306a36Sopenharmony_ci 122362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_FORMAT(uint32_t i0) { return 0x000000ec + __offset_LM(i0); } 122462306a36Sopenharmony_ci#define MDP5_LM_CURSOR_FORMAT_FORMAT__MASK 0x00000007 122562306a36Sopenharmony_ci#define MDP5_LM_CURSOR_FORMAT_FORMAT__SHIFT 0 122662306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_FORMAT_FORMAT(enum mdp5_cursor_format val) 122762306a36Sopenharmony_ci{ 122862306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_FORMAT_FORMAT__SHIFT) & MDP5_LM_CURSOR_FORMAT_FORMAT__MASK; 122962306a36Sopenharmony_ci} 123062306a36Sopenharmony_ci 123162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BASE_ADDR(uint32_t i0) { return 0x000000f0 + __offset_LM(i0); } 123262306a36Sopenharmony_ci 123362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_START_XY(uint32_t i0) { return 0x000000f4 + __offset_LM(i0); } 123462306a36Sopenharmony_ci#define MDP5_LM_CURSOR_START_XY_X_START__MASK 0x0000ffff 123562306a36Sopenharmony_ci#define MDP5_LM_CURSOR_START_XY_X_START__SHIFT 0 123662306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_START_XY_X_START(uint32_t val) 123762306a36Sopenharmony_ci{ 123862306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_START_XY_X_START__SHIFT) & MDP5_LM_CURSOR_START_XY_X_START__MASK; 123962306a36Sopenharmony_ci} 124062306a36Sopenharmony_ci#define MDP5_LM_CURSOR_START_XY_Y_START__MASK 0xffff0000 124162306a36Sopenharmony_ci#define MDP5_LM_CURSOR_START_XY_Y_START__SHIFT 16 124262306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_START_XY_Y_START(uint32_t val) 124362306a36Sopenharmony_ci{ 124462306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_START_XY_Y_START__SHIFT) & MDP5_LM_CURSOR_START_XY_Y_START__MASK; 124562306a36Sopenharmony_ci} 124662306a36Sopenharmony_ci 124762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BLEND_CONFIG(uint32_t i0) { return 0x000000f8 + __offset_LM(i0); } 124862306a36Sopenharmony_ci#define MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_EN 0x00000001 124962306a36Sopenharmony_ci#define MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL__MASK 0x00000006 125062306a36Sopenharmony_ci#define MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL__SHIFT 1 125162306a36Sopenharmony_cistatic inline uint32_t MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL(enum mdp5_cursor_alpha val) 125262306a36Sopenharmony_ci{ 125362306a36Sopenharmony_ci return ((val) << MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL__SHIFT) & MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_ALPHA_SEL__MASK; 125462306a36Sopenharmony_ci} 125562306a36Sopenharmony_ci#define MDP5_LM_CURSOR_BLEND_CONFIG_BLEND_TRANSP_EN 0x00000008 125662306a36Sopenharmony_ci 125762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BLEND_PARAM(uint32_t i0) { return 0x000000fc + __offset_LM(i0); } 125862306a36Sopenharmony_ci 125962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BLEND_TRANSP_LOW0(uint32_t i0) { return 0x00000100 + __offset_LM(i0); } 126062306a36Sopenharmony_ci 126162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BLEND_TRANSP_LOW1(uint32_t i0) { return 0x00000104 + __offset_LM(i0); } 126262306a36Sopenharmony_ci 126362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BLEND_TRANSP_HIGH0(uint32_t i0) { return 0x00000108 + __offset_LM(i0); } 126462306a36Sopenharmony_ci 126562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_CURSOR_BLEND_TRANSP_HIGH1(uint32_t i0) { return 0x0000010c + __offset_LM(i0); } 126662306a36Sopenharmony_ci 126762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_LM_GC_LUT_BASE(uint32_t i0) { return 0x00000110 + __offset_LM(i0); } 126862306a36Sopenharmony_ci 126962306a36Sopenharmony_cistatic inline uint32_t __offset_DSPP(uint32_t idx) 127062306a36Sopenharmony_ci{ 127162306a36Sopenharmony_ci switch (idx) { 127262306a36Sopenharmony_ci case 0: return (mdp5_cfg->dspp.base[0]); 127362306a36Sopenharmony_ci case 1: return (mdp5_cfg->dspp.base[1]); 127462306a36Sopenharmony_ci case 2: return (mdp5_cfg->dspp.base[2]); 127562306a36Sopenharmony_ci case 3: return (mdp5_cfg->dspp.base[3]); 127662306a36Sopenharmony_ci default: return INVALID_IDX(idx); 127762306a36Sopenharmony_ci } 127862306a36Sopenharmony_ci} 127962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP(uint32_t i0) { return 0x00000000 + __offset_DSPP(i0); } 128062306a36Sopenharmony_ci 128162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_OP_MODE(uint32_t i0) { return 0x00000000 + __offset_DSPP(i0); } 128262306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_IGC_LUT_EN 0x00000001 128362306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_IGC_TBL_IDX__MASK 0x0000000e 128462306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_IGC_TBL_IDX__SHIFT 1 128562306a36Sopenharmony_cistatic inline uint32_t MDP5_DSPP_OP_MODE_IGC_TBL_IDX(uint32_t val) 128662306a36Sopenharmony_ci{ 128762306a36Sopenharmony_ci return ((val) << MDP5_DSPP_OP_MODE_IGC_TBL_IDX__SHIFT) & MDP5_DSPP_OP_MODE_IGC_TBL_IDX__MASK; 128862306a36Sopenharmony_ci} 128962306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_PCC_EN 0x00000010 129062306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_DITHER_EN 0x00000100 129162306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_HIST_EN 0x00010000 129262306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_AUTO_CLEAR 0x00020000 129362306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_HIST_LUT_EN 0x00080000 129462306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_PA_EN 0x00100000 129562306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_GAMUT_EN 0x00800000 129662306a36Sopenharmony_ci#define MDP5_DSPP_OP_MODE_GAMUT_ORDER 0x01000000 129762306a36Sopenharmony_ci 129862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_PCC_BASE(uint32_t i0) { return 0x00000030 + __offset_DSPP(i0); } 129962306a36Sopenharmony_ci 130062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_DITHER_DEPTH(uint32_t i0) { return 0x00000150 + __offset_DSPP(i0); } 130162306a36Sopenharmony_ci 130262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_HIST_CTL_BASE(uint32_t i0) { return 0x00000210 + __offset_DSPP(i0); } 130362306a36Sopenharmony_ci 130462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_HIST_LUT_BASE(uint32_t i0) { return 0x00000230 + __offset_DSPP(i0); } 130562306a36Sopenharmony_ci 130662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_HIST_LUT_SWAP(uint32_t i0) { return 0x00000234 + __offset_DSPP(i0); } 130762306a36Sopenharmony_ci 130862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_PA_BASE(uint32_t i0) { return 0x00000238 + __offset_DSPP(i0); } 130962306a36Sopenharmony_ci 131062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_GAMUT_BASE(uint32_t i0) { return 0x000002dc + __offset_DSPP(i0); } 131162306a36Sopenharmony_ci 131262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_DSPP_GC_BASE(uint32_t i0) { return 0x000002b0 + __offset_DSPP(i0); } 131362306a36Sopenharmony_ci 131462306a36Sopenharmony_cistatic inline uint32_t __offset_PP(uint32_t idx) 131562306a36Sopenharmony_ci{ 131662306a36Sopenharmony_ci switch (idx) { 131762306a36Sopenharmony_ci case 0: return (mdp5_cfg->pp.base[0]); 131862306a36Sopenharmony_ci case 1: return (mdp5_cfg->pp.base[1]); 131962306a36Sopenharmony_ci case 2: return (mdp5_cfg->pp.base[2]); 132062306a36Sopenharmony_ci case 3: return (mdp5_cfg->pp.base[3]); 132162306a36Sopenharmony_ci default: return INVALID_IDX(idx); 132262306a36Sopenharmony_ci } 132362306a36Sopenharmony_ci} 132462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP(uint32_t i0) { return 0x00000000 + __offset_PP(i0); } 132562306a36Sopenharmony_ci 132662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_TEAR_CHECK_EN(uint32_t i0) { return 0x00000000 + __offset_PP(i0); } 132762306a36Sopenharmony_ci 132862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_SYNC_CONFIG_VSYNC(uint32_t i0) { return 0x00000004 + __offset_PP(i0); } 132962306a36Sopenharmony_ci#define MDP5_PP_SYNC_CONFIG_VSYNC_COUNT__MASK 0x0007ffff 133062306a36Sopenharmony_ci#define MDP5_PP_SYNC_CONFIG_VSYNC_COUNT__SHIFT 0 133162306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_SYNC_CONFIG_VSYNC_COUNT(uint32_t val) 133262306a36Sopenharmony_ci{ 133362306a36Sopenharmony_ci return ((val) << MDP5_PP_SYNC_CONFIG_VSYNC_COUNT__SHIFT) & MDP5_PP_SYNC_CONFIG_VSYNC_COUNT__MASK; 133462306a36Sopenharmony_ci} 133562306a36Sopenharmony_ci#define MDP5_PP_SYNC_CONFIG_VSYNC_COUNTER_EN 0x00080000 133662306a36Sopenharmony_ci#define MDP5_PP_SYNC_CONFIG_VSYNC_IN_EN 0x00100000 133762306a36Sopenharmony_ci 133862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_SYNC_CONFIG_HEIGHT(uint32_t i0) { return 0x00000008 + __offset_PP(i0); } 133962306a36Sopenharmony_ci 134062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_SYNC_WRCOUNT(uint32_t i0) { return 0x0000000c + __offset_PP(i0); } 134162306a36Sopenharmony_ci#define MDP5_PP_SYNC_WRCOUNT_LINE_COUNT__MASK 0x0000ffff 134262306a36Sopenharmony_ci#define MDP5_PP_SYNC_WRCOUNT_LINE_COUNT__SHIFT 0 134362306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_SYNC_WRCOUNT_LINE_COUNT(uint32_t val) 134462306a36Sopenharmony_ci{ 134562306a36Sopenharmony_ci return ((val) << MDP5_PP_SYNC_WRCOUNT_LINE_COUNT__SHIFT) & MDP5_PP_SYNC_WRCOUNT_LINE_COUNT__MASK; 134662306a36Sopenharmony_ci} 134762306a36Sopenharmony_ci#define MDP5_PP_SYNC_WRCOUNT_FRAME_COUNT__MASK 0xffff0000 134862306a36Sopenharmony_ci#define MDP5_PP_SYNC_WRCOUNT_FRAME_COUNT__SHIFT 16 134962306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_SYNC_WRCOUNT_FRAME_COUNT(uint32_t val) 135062306a36Sopenharmony_ci{ 135162306a36Sopenharmony_ci return ((val) << MDP5_PP_SYNC_WRCOUNT_FRAME_COUNT__SHIFT) & MDP5_PP_SYNC_WRCOUNT_FRAME_COUNT__MASK; 135262306a36Sopenharmony_ci} 135362306a36Sopenharmony_ci 135462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_VSYNC_INIT_VAL(uint32_t i0) { return 0x00000010 + __offset_PP(i0); } 135562306a36Sopenharmony_ci 135662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_INT_COUNT_VAL(uint32_t i0) { return 0x00000014 + __offset_PP(i0); } 135762306a36Sopenharmony_ci#define MDP5_PP_INT_COUNT_VAL_LINE_COUNT__MASK 0x0000ffff 135862306a36Sopenharmony_ci#define MDP5_PP_INT_COUNT_VAL_LINE_COUNT__SHIFT 0 135962306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_INT_COUNT_VAL_LINE_COUNT(uint32_t val) 136062306a36Sopenharmony_ci{ 136162306a36Sopenharmony_ci return ((val) << MDP5_PP_INT_COUNT_VAL_LINE_COUNT__SHIFT) & MDP5_PP_INT_COUNT_VAL_LINE_COUNT__MASK; 136262306a36Sopenharmony_ci} 136362306a36Sopenharmony_ci#define MDP5_PP_INT_COUNT_VAL_FRAME_COUNT__MASK 0xffff0000 136462306a36Sopenharmony_ci#define MDP5_PP_INT_COUNT_VAL_FRAME_COUNT__SHIFT 16 136562306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_INT_COUNT_VAL_FRAME_COUNT(uint32_t val) 136662306a36Sopenharmony_ci{ 136762306a36Sopenharmony_ci return ((val) << MDP5_PP_INT_COUNT_VAL_FRAME_COUNT__SHIFT) & MDP5_PP_INT_COUNT_VAL_FRAME_COUNT__MASK; 136862306a36Sopenharmony_ci} 136962306a36Sopenharmony_ci 137062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_SYNC_THRESH(uint32_t i0) { return 0x00000018 + __offset_PP(i0); } 137162306a36Sopenharmony_ci#define MDP5_PP_SYNC_THRESH_START__MASK 0x0000ffff 137262306a36Sopenharmony_ci#define MDP5_PP_SYNC_THRESH_START__SHIFT 0 137362306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_SYNC_THRESH_START(uint32_t val) 137462306a36Sopenharmony_ci{ 137562306a36Sopenharmony_ci return ((val) << MDP5_PP_SYNC_THRESH_START__SHIFT) & MDP5_PP_SYNC_THRESH_START__MASK; 137662306a36Sopenharmony_ci} 137762306a36Sopenharmony_ci#define MDP5_PP_SYNC_THRESH_CONTINUE__MASK 0xffff0000 137862306a36Sopenharmony_ci#define MDP5_PP_SYNC_THRESH_CONTINUE__SHIFT 16 137962306a36Sopenharmony_cistatic inline uint32_t MDP5_PP_SYNC_THRESH_CONTINUE(uint32_t val) 138062306a36Sopenharmony_ci{ 138162306a36Sopenharmony_ci return ((val) << MDP5_PP_SYNC_THRESH_CONTINUE__SHIFT) & MDP5_PP_SYNC_THRESH_CONTINUE__MASK; 138262306a36Sopenharmony_ci} 138362306a36Sopenharmony_ci 138462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_START_POS(uint32_t i0) { return 0x0000001c + __offset_PP(i0); } 138562306a36Sopenharmony_ci 138662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_RD_PTR_IRQ(uint32_t i0) { return 0x00000020 + __offset_PP(i0); } 138762306a36Sopenharmony_ci 138862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_WR_PTR_IRQ(uint32_t i0) { return 0x00000024 + __offset_PP(i0); } 138962306a36Sopenharmony_ci 139062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_OUT_LINE_COUNT(uint32_t i0) { return 0x00000028 + __offset_PP(i0); } 139162306a36Sopenharmony_ci 139262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_PP_LINE_COUNT(uint32_t i0) { return 0x0000002c + __offset_PP(i0); } 139362306a36Sopenharmony_ci 139462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_AUTOREFRESH_CONFIG(uint32_t i0) { return 0x00000030 + __offset_PP(i0); } 139562306a36Sopenharmony_ci 139662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_FBC_MODE(uint32_t i0) { return 0x00000034 + __offset_PP(i0); } 139762306a36Sopenharmony_ci 139862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_FBC_BUDGET_CTL(uint32_t i0) { return 0x00000038 + __offset_PP(i0); } 139962306a36Sopenharmony_ci 140062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_PP_FBC_LOSSY_MODE(uint32_t i0) { return 0x0000003c + __offset_PP(i0); } 140162306a36Sopenharmony_ci 140262306a36Sopenharmony_cistatic inline uint32_t __offset_WB(uint32_t idx) 140362306a36Sopenharmony_ci{ 140462306a36Sopenharmony_ci switch (idx) { 140562306a36Sopenharmony_ci#if 0 /* TEMPORARY until patch that adds wb.base[] is merged */ 140662306a36Sopenharmony_ci case 0: return (mdp5_cfg->wb.base[0]); 140762306a36Sopenharmony_ci case 1: return (mdp5_cfg->wb.base[1]); 140862306a36Sopenharmony_ci case 2: return (mdp5_cfg->wb.base[2]); 140962306a36Sopenharmony_ci case 3: return (mdp5_cfg->wb.base[3]); 141062306a36Sopenharmony_ci case 4: return (mdp5_cfg->wb.base[4]); 141162306a36Sopenharmony_ci#endif 141262306a36Sopenharmony_ci default: return INVALID_IDX(idx); 141362306a36Sopenharmony_ci } 141462306a36Sopenharmony_ci} 141562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB(uint32_t i0) { return 0x00000000 + __offset_WB(i0); } 141662306a36Sopenharmony_ci 141762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_FORMAT(uint32_t i0) { return 0x00000000 + __offset_WB(i0); } 141862306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC0_OUT__MASK 0x00000003 141962306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC0_OUT__SHIFT 0 142062306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DSTC0_OUT(uint32_t val) 142162306a36Sopenharmony_ci{ 142262306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DSTC0_OUT__SHIFT) & MDP5_WB_DST_FORMAT_DSTC0_OUT__MASK; 142362306a36Sopenharmony_ci} 142462306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC1_OUT__MASK 0x0000000c 142562306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC1_OUT__SHIFT 2 142662306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DSTC1_OUT(uint32_t val) 142762306a36Sopenharmony_ci{ 142862306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DSTC1_OUT__SHIFT) & MDP5_WB_DST_FORMAT_DSTC1_OUT__MASK; 142962306a36Sopenharmony_ci} 143062306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC2_OUT__MASK 0x00000030 143162306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC2_OUT__SHIFT 4 143262306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DSTC2_OUT(uint32_t val) 143362306a36Sopenharmony_ci{ 143462306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DSTC2_OUT__SHIFT) & MDP5_WB_DST_FORMAT_DSTC2_OUT__MASK; 143562306a36Sopenharmony_ci} 143662306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC3_OUT__MASK 0x000000c0 143762306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC3_OUT__SHIFT 6 143862306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DSTC3_OUT(uint32_t val) 143962306a36Sopenharmony_ci{ 144062306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DSTC3_OUT__SHIFT) & MDP5_WB_DST_FORMAT_DSTC3_OUT__MASK; 144162306a36Sopenharmony_ci} 144262306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DSTC3_EN 0x00000100 144362306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_BPP__MASK 0x00000600 144462306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_BPP__SHIFT 9 144562306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DST_BPP(uint32_t val) 144662306a36Sopenharmony_ci{ 144762306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DST_BPP__SHIFT) & MDP5_WB_DST_FORMAT_DST_BPP__MASK; 144862306a36Sopenharmony_ci} 144962306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_PACK_COUNT__MASK 0x00003000 145062306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_PACK_COUNT__SHIFT 12 145162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_PACK_COUNT(uint32_t val) 145262306a36Sopenharmony_ci{ 145362306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_PACK_COUNT__SHIFT) & MDP5_WB_DST_FORMAT_PACK_COUNT__MASK; 145462306a36Sopenharmony_ci} 145562306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_ALPHA_X 0x00004000 145662306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_PACK_TIGHT 0x00020000 145762306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_PACK_ALIGN_MSB 0x00040000 145862306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_WRITE_PLANES__MASK 0x00180000 145962306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_WRITE_PLANES__SHIFT 19 146062306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_WRITE_PLANES(uint32_t val) 146162306a36Sopenharmony_ci{ 146262306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_WRITE_PLANES__SHIFT) & MDP5_WB_DST_FORMAT_WRITE_PLANES__MASK; 146362306a36Sopenharmony_ci} 146462306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_DITHER_EN 0x00400000 146562306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_CHROMA_SAMP__MASK 0x03800000 146662306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_CHROMA_SAMP__SHIFT 23 146762306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DST_CHROMA_SAMP(uint32_t val) 146862306a36Sopenharmony_ci{ 146962306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DST_CHROMA_SAMP__SHIFT) & MDP5_WB_DST_FORMAT_DST_CHROMA_SAMP__MASK; 147062306a36Sopenharmony_ci} 147162306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_CHROMA_SITE__MASK 0x3c000000 147262306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_DST_CHROMA_SITE__SHIFT 26 147362306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_DST_CHROMA_SITE(uint32_t val) 147462306a36Sopenharmony_ci{ 147562306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_DST_CHROMA_SITE__SHIFT) & MDP5_WB_DST_FORMAT_DST_CHROMA_SITE__MASK; 147662306a36Sopenharmony_ci} 147762306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_FRAME_FORMAT__MASK 0xc0000000 147862306a36Sopenharmony_ci#define MDP5_WB_DST_FORMAT_FRAME_FORMAT__SHIFT 30 147962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_FORMAT_FRAME_FORMAT(uint32_t val) 148062306a36Sopenharmony_ci{ 148162306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_FORMAT_FRAME_FORMAT__SHIFT) & MDP5_WB_DST_FORMAT_FRAME_FORMAT__MASK; 148262306a36Sopenharmony_ci} 148362306a36Sopenharmony_ci 148462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_OP_MODE(uint32_t i0) { return 0x00000004 + __offset_WB(i0); } 148562306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_BWC_ENC_EN 0x00000001 148662306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_BWC_ENC_OP__MASK 0x00000006 148762306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_BWC_ENC_OP__SHIFT 1 148862306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_BWC_ENC_OP(uint32_t val) 148962306a36Sopenharmony_ci{ 149062306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_BWC_ENC_OP__SHIFT) & MDP5_WB_DST_OP_MODE_BWC_ENC_OP__MASK; 149162306a36Sopenharmony_ci} 149262306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_BLOCK_SIZE__MASK 0x00000010 149362306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_BLOCK_SIZE__SHIFT 4 149462306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_BLOCK_SIZE(uint32_t val) 149562306a36Sopenharmony_ci{ 149662306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_BLOCK_SIZE__SHIFT) & MDP5_WB_DST_OP_MODE_BLOCK_SIZE__MASK; 149762306a36Sopenharmony_ci} 149862306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_ROT_MODE__MASK 0x00000020 149962306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_ROT_MODE__SHIFT 5 150062306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_ROT_MODE(uint32_t val) 150162306a36Sopenharmony_ci{ 150262306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_ROT_MODE__SHIFT) & MDP5_WB_DST_OP_MODE_ROT_MODE__MASK; 150362306a36Sopenharmony_ci} 150462306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_ROT_EN 0x00000040 150562306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CSC_EN 0x00000100 150662306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CSC_SRC_DATA_FORMAT__MASK 0x00000200 150762306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CSC_SRC_DATA_FORMAT__SHIFT 9 150862306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_CSC_SRC_DATA_FORMAT(uint32_t val) 150962306a36Sopenharmony_ci{ 151062306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_CSC_SRC_DATA_FORMAT__SHIFT) & MDP5_WB_DST_OP_MODE_CSC_SRC_DATA_FORMAT__MASK; 151162306a36Sopenharmony_ci} 151262306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CSC_DST_DATA_FORMAT__MASK 0x00000400 151362306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CSC_DST_DATA_FORMAT__SHIFT 10 151462306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_CSC_DST_DATA_FORMAT(uint32_t val) 151562306a36Sopenharmony_ci{ 151662306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_CSC_DST_DATA_FORMAT__SHIFT) & MDP5_WB_DST_OP_MODE_CSC_DST_DATA_FORMAT__MASK; 151762306a36Sopenharmony_ci} 151862306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_EN 0x00000800 151962306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_FORMAT__MASK 0x00001000 152062306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_FORMAT__SHIFT 12 152162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_FORMAT(uint32_t val) 152262306a36Sopenharmony_ci{ 152362306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_FORMAT__SHIFT) & MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_FORMAT__MASK; 152462306a36Sopenharmony_ci} 152562306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_H_MTHD__MASK 0x00002000 152662306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_H_MTHD__SHIFT 13 152762306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_H_MTHD(uint32_t val) 152862306a36Sopenharmony_ci{ 152962306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_H_MTHD__SHIFT) & MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_H_MTHD__MASK; 153062306a36Sopenharmony_ci} 153162306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_V_MTHD__MASK 0x00004000 153262306a36Sopenharmony_ci#define MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_V_MTHD__SHIFT 14 153362306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_V_MTHD(uint32_t val) 153462306a36Sopenharmony_ci{ 153562306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_V_MTHD__SHIFT) & MDP5_WB_DST_OP_MODE_CHROMA_DWN_SAMPLE_V_MTHD__MASK; 153662306a36Sopenharmony_ci} 153762306a36Sopenharmony_ci 153862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_PACK_PATTERN(uint32_t i0) { return 0x00000008 + __offset_WB(i0); } 153962306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT0__MASK 0x00000003 154062306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT0__SHIFT 0 154162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_PACK_PATTERN_ELEMENT0(uint32_t val) 154262306a36Sopenharmony_ci{ 154362306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_PACK_PATTERN_ELEMENT0__SHIFT) & MDP5_WB_DST_PACK_PATTERN_ELEMENT0__MASK; 154462306a36Sopenharmony_ci} 154562306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT1__MASK 0x00000300 154662306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT1__SHIFT 8 154762306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_PACK_PATTERN_ELEMENT1(uint32_t val) 154862306a36Sopenharmony_ci{ 154962306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_PACK_PATTERN_ELEMENT1__SHIFT) & MDP5_WB_DST_PACK_PATTERN_ELEMENT1__MASK; 155062306a36Sopenharmony_ci} 155162306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT2__MASK 0x00030000 155262306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT2__SHIFT 16 155362306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_PACK_PATTERN_ELEMENT2(uint32_t val) 155462306a36Sopenharmony_ci{ 155562306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_PACK_PATTERN_ELEMENT2__SHIFT) & MDP5_WB_DST_PACK_PATTERN_ELEMENT2__MASK; 155662306a36Sopenharmony_ci} 155762306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT3__MASK 0x03000000 155862306a36Sopenharmony_ci#define MDP5_WB_DST_PACK_PATTERN_ELEMENT3__SHIFT 24 155962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_PACK_PATTERN_ELEMENT3(uint32_t val) 156062306a36Sopenharmony_ci{ 156162306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_PACK_PATTERN_ELEMENT3__SHIFT) & MDP5_WB_DST_PACK_PATTERN_ELEMENT3__MASK; 156262306a36Sopenharmony_ci} 156362306a36Sopenharmony_ci 156462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST0_ADDR(uint32_t i0) { return 0x0000000c + __offset_WB(i0); } 156562306a36Sopenharmony_ci 156662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST1_ADDR(uint32_t i0) { return 0x00000010 + __offset_WB(i0); } 156762306a36Sopenharmony_ci 156862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST2_ADDR(uint32_t i0) { return 0x00000014 + __offset_WB(i0); } 156962306a36Sopenharmony_ci 157062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST3_ADDR(uint32_t i0) { return 0x00000018 + __offset_WB(i0); } 157162306a36Sopenharmony_ci 157262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_YSTRIDE0(uint32_t i0) { return 0x0000001c + __offset_WB(i0); } 157362306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE0_DST0_YSTRIDE__MASK 0x0000ffff 157462306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE0_DST0_YSTRIDE__SHIFT 0 157562306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_YSTRIDE0_DST0_YSTRIDE(uint32_t val) 157662306a36Sopenharmony_ci{ 157762306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_YSTRIDE0_DST0_YSTRIDE__SHIFT) & MDP5_WB_DST_YSTRIDE0_DST0_YSTRIDE__MASK; 157862306a36Sopenharmony_ci} 157962306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE0_DST1_YSTRIDE__MASK 0xffff0000 158062306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE0_DST1_YSTRIDE__SHIFT 16 158162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_YSTRIDE0_DST1_YSTRIDE(uint32_t val) 158262306a36Sopenharmony_ci{ 158362306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_YSTRIDE0_DST1_YSTRIDE__SHIFT) & MDP5_WB_DST_YSTRIDE0_DST1_YSTRIDE__MASK; 158462306a36Sopenharmony_ci} 158562306a36Sopenharmony_ci 158662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_YSTRIDE1(uint32_t i0) { return 0x00000020 + __offset_WB(i0); } 158762306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE1_DST2_YSTRIDE__MASK 0x0000ffff 158862306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE1_DST2_YSTRIDE__SHIFT 0 158962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_YSTRIDE1_DST2_YSTRIDE(uint32_t val) 159062306a36Sopenharmony_ci{ 159162306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_YSTRIDE1_DST2_YSTRIDE__SHIFT) & MDP5_WB_DST_YSTRIDE1_DST2_YSTRIDE__MASK; 159262306a36Sopenharmony_ci} 159362306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE1_DST3_YSTRIDE__MASK 0xffff0000 159462306a36Sopenharmony_ci#define MDP5_WB_DST_YSTRIDE1_DST3_YSTRIDE__SHIFT 16 159562306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_DST_YSTRIDE1_DST3_YSTRIDE(uint32_t val) 159662306a36Sopenharmony_ci{ 159762306a36Sopenharmony_ci return ((val) << MDP5_WB_DST_YSTRIDE1_DST3_YSTRIDE__SHIFT) & MDP5_WB_DST_YSTRIDE1_DST3_YSTRIDE__MASK; 159862306a36Sopenharmony_ci} 159962306a36Sopenharmony_ci 160062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_DITHER_BITDEPTH(uint32_t i0) { return 0x00000024 + __offset_WB(i0); } 160162306a36Sopenharmony_ci 160262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DITHER_MATRIX_ROW0(uint32_t i0) { return 0x00000030 + __offset_WB(i0); } 160362306a36Sopenharmony_ci 160462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DITHER_MATRIX_ROW1(uint32_t i0) { return 0x00000034 + __offset_WB(i0); } 160562306a36Sopenharmony_ci 160662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DITHER_MATRIX_ROW2(uint32_t i0) { return 0x00000038 + __offset_WB(i0); } 160762306a36Sopenharmony_ci 160862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DITHER_MATRIX_ROW3(uint32_t i0) { return 0x0000003c + __offset_WB(i0); } 160962306a36Sopenharmony_ci 161062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_DST_WRITE_CONFIG(uint32_t i0) { return 0x00000048 + __offset_WB(i0); } 161162306a36Sopenharmony_ci 161262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_ROTATION_DNSCALER(uint32_t i0) { return 0x00000050 + __offset_WB(i0); } 161362306a36Sopenharmony_ci 161462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_N16_INIT_PHASE_X_0_3(uint32_t i0) { return 0x00000060 + __offset_WB(i0); } 161562306a36Sopenharmony_ci 161662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_N16_INIT_PHASE_X_1_2(uint32_t i0) { return 0x00000064 + __offset_WB(i0); } 161762306a36Sopenharmony_ci 161862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_N16_INIT_PHASE_Y_0_3(uint32_t i0) { return 0x00000068 + __offset_WB(i0); } 161962306a36Sopenharmony_ci 162062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_N16_INIT_PHASE_Y_1_2(uint32_t i0) { return 0x0000006c + __offset_WB(i0); } 162162306a36Sopenharmony_ci 162262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_OUT_SIZE(uint32_t i0) { return 0x00000074 + __offset_WB(i0); } 162362306a36Sopenharmony_ci#define MDP5_WB_OUT_SIZE_DST_W__MASK 0x0000ffff 162462306a36Sopenharmony_ci#define MDP5_WB_OUT_SIZE_DST_W__SHIFT 0 162562306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_OUT_SIZE_DST_W(uint32_t val) 162662306a36Sopenharmony_ci{ 162762306a36Sopenharmony_ci return ((val) << MDP5_WB_OUT_SIZE_DST_W__SHIFT) & MDP5_WB_OUT_SIZE_DST_W__MASK; 162862306a36Sopenharmony_ci} 162962306a36Sopenharmony_ci#define MDP5_WB_OUT_SIZE_DST_H__MASK 0xffff0000 163062306a36Sopenharmony_ci#define MDP5_WB_OUT_SIZE_DST_H__SHIFT 16 163162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_OUT_SIZE_DST_H(uint32_t val) 163262306a36Sopenharmony_ci{ 163362306a36Sopenharmony_ci return ((val) << MDP5_WB_OUT_SIZE_DST_H__SHIFT) & MDP5_WB_OUT_SIZE_DST_H__MASK; 163462306a36Sopenharmony_ci} 163562306a36Sopenharmony_ci 163662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_ALPHA_X_VALUE(uint32_t i0) { return 0x00000078 + __offset_WB(i0); } 163762306a36Sopenharmony_ci 163862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_MATRIX_COEFF_0(uint32_t i0) { return 0x00000260 + __offset_WB(i0); } 163962306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_11__MASK 0x00001fff 164062306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_11__SHIFT 0 164162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_11(uint32_t val) 164262306a36Sopenharmony_ci{ 164362306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_11__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_11__MASK; 164462306a36Sopenharmony_ci} 164562306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_12__MASK 0x1fff0000 164662306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_12__SHIFT 16 164762306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_12(uint32_t val) 164862306a36Sopenharmony_ci{ 164962306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_12__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_0_COEFF_12__MASK; 165062306a36Sopenharmony_ci} 165162306a36Sopenharmony_ci 165262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_MATRIX_COEFF_1(uint32_t i0) { return 0x00000264 + __offset_WB(i0); } 165362306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_13__MASK 0x00001fff 165462306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_13__SHIFT 0 165562306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_13(uint32_t val) 165662306a36Sopenharmony_ci{ 165762306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_13__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_13__MASK; 165862306a36Sopenharmony_ci} 165962306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_21__MASK 0x1fff0000 166062306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_21__SHIFT 16 166162306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_21(uint32_t val) 166262306a36Sopenharmony_ci{ 166362306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_21__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_1_COEFF_21__MASK; 166462306a36Sopenharmony_ci} 166562306a36Sopenharmony_ci 166662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_MATRIX_COEFF_2(uint32_t i0) { return 0x00000268 + __offset_WB(i0); } 166762306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_22__MASK 0x00001fff 166862306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_22__SHIFT 0 166962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_22(uint32_t val) 167062306a36Sopenharmony_ci{ 167162306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_22__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_22__MASK; 167262306a36Sopenharmony_ci} 167362306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_23__MASK 0x1fff0000 167462306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_23__SHIFT 16 167562306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_23(uint32_t val) 167662306a36Sopenharmony_ci{ 167762306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_23__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_2_COEFF_23__MASK; 167862306a36Sopenharmony_ci} 167962306a36Sopenharmony_ci 168062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_MATRIX_COEFF_3(uint32_t i0) { return 0x0000026c + __offset_WB(i0); } 168162306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_31__MASK 0x00001fff 168262306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_31__SHIFT 0 168362306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_31(uint32_t val) 168462306a36Sopenharmony_ci{ 168562306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_31__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_31__MASK; 168662306a36Sopenharmony_ci} 168762306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_32__MASK 0x1fff0000 168862306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_32__SHIFT 16 168962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_32(uint32_t val) 169062306a36Sopenharmony_ci{ 169162306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_32__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_3_COEFF_32__MASK; 169262306a36Sopenharmony_ci} 169362306a36Sopenharmony_ci 169462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_MATRIX_COEFF_4(uint32_t i0) { return 0x00000270 + __offset_WB(i0); } 169562306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_4_COEFF_33__MASK 0x00001fff 169662306a36Sopenharmony_ci#define MDP5_WB_CSC_MATRIX_COEFF_4_COEFF_33__SHIFT 0 169762306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_MATRIX_COEFF_4_COEFF_33(uint32_t val) 169862306a36Sopenharmony_ci{ 169962306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_MATRIX_COEFF_4_COEFF_33__SHIFT) & MDP5_WB_CSC_MATRIX_COEFF_4_COEFF_33__MASK; 170062306a36Sopenharmony_ci} 170162306a36Sopenharmony_ci 170262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_PRECLAMP(uint32_t i0, uint32_t i1) { return 0x00000274 + __offset_WB(i0) + 0x4*i1; } 170362306a36Sopenharmony_ci 170462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_PRECLAMP_REG(uint32_t i0, uint32_t i1) { return 0x00000274 + __offset_WB(i0) + 0x4*i1; } 170562306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_PRECLAMP_REG_HIGH__MASK 0x000000ff 170662306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_PRECLAMP_REG_HIGH__SHIFT 0 170762306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_COMP_PRECLAMP_REG_HIGH(uint32_t val) 170862306a36Sopenharmony_ci{ 170962306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_COMP_PRECLAMP_REG_HIGH__SHIFT) & MDP5_WB_CSC_COMP_PRECLAMP_REG_HIGH__MASK; 171062306a36Sopenharmony_ci} 171162306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_PRECLAMP_REG_LOW__MASK 0x0000ff00 171262306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_PRECLAMP_REG_LOW__SHIFT 8 171362306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_COMP_PRECLAMP_REG_LOW(uint32_t val) 171462306a36Sopenharmony_ci{ 171562306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_COMP_PRECLAMP_REG_LOW__SHIFT) & MDP5_WB_CSC_COMP_PRECLAMP_REG_LOW__MASK; 171662306a36Sopenharmony_ci} 171762306a36Sopenharmony_ci 171862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_POSTCLAMP(uint32_t i0, uint32_t i1) { return 0x00000280 + __offset_WB(i0) + 0x4*i1; } 171962306a36Sopenharmony_ci 172062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_POSTCLAMP_REG(uint32_t i0, uint32_t i1) { return 0x00000280 + __offset_WB(i0) + 0x4*i1; } 172162306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_POSTCLAMP_REG_HIGH__MASK 0x000000ff 172262306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_POSTCLAMP_REG_HIGH__SHIFT 0 172362306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_COMP_POSTCLAMP_REG_HIGH(uint32_t val) 172462306a36Sopenharmony_ci{ 172562306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_COMP_POSTCLAMP_REG_HIGH__SHIFT) & MDP5_WB_CSC_COMP_POSTCLAMP_REG_HIGH__MASK; 172662306a36Sopenharmony_ci} 172762306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_POSTCLAMP_REG_LOW__MASK 0x0000ff00 172862306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_POSTCLAMP_REG_LOW__SHIFT 8 172962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_COMP_POSTCLAMP_REG_LOW(uint32_t val) 173062306a36Sopenharmony_ci{ 173162306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_COMP_POSTCLAMP_REG_LOW__SHIFT) & MDP5_WB_CSC_COMP_POSTCLAMP_REG_LOW__MASK; 173262306a36Sopenharmony_ci} 173362306a36Sopenharmony_ci 173462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_PREBIAS(uint32_t i0, uint32_t i1) { return 0x0000028c + __offset_WB(i0) + 0x4*i1; } 173562306a36Sopenharmony_ci 173662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_PREBIAS_REG(uint32_t i0, uint32_t i1) { return 0x0000028c + __offset_WB(i0) + 0x4*i1; } 173762306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_PREBIAS_REG_VALUE__MASK 0x000001ff 173862306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_PREBIAS_REG_VALUE__SHIFT 0 173962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_COMP_PREBIAS_REG_VALUE(uint32_t val) 174062306a36Sopenharmony_ci{ 174162306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_COMP_PREBIAS_REG_VALUE__SHIFT) & MDP5_WB_CSC_COMP_PREBIAS_REG_VALUE__MASK; 174262306a36Sopenharmony_ci} 174362306a36Sopenharmony_ci 174462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_POSTBIAS(uint32_t i0, uint32_t i1) { return 0x00000298 + __offset_WB(i0) + 0x4*i1; } 174562306a36Sopenharmony_ci 174662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_WB_CSC_COMP_POSTBIAS_REG(uint32_t i0, uint32_t i1) { return 0x00000298 + __offset_WB(i0) + 0x4*i1; } 174762306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_POSTBIAS_REG_VALUE__MASK 0x000001ff 174862306a36Sopenharmony_ci#define MDP5_WB_CSC_COMP_POSTBIAS_REG_VALUE__SHIFT 0 174962306a36Sopenharmony_cistatic inline uint32_t MDP5_WB_CSC_COMP_POSTBIAS_REG_VALUE(uint32_t val) 175062306a36Sopenharmony_ci{ 175162306a36Sopenharmony_ci return ((val) << MDP5_WB_CSC_COMP_POSTBIAS_REG_VALUE__SHIFT) & MDP5_WB_CSC_COMP_POSTBIAS_REG_VALUE__MASK; 175262306a36Sopenharmony_ci} 175362306a36Sopenharmony_ci 175462306a36Sopenharmony_cistatic inline uint32_t __offset_INTF(uint32_t idx) 175562306a36Sopenharmony_ci{ 175662306a36Sopenharmony_ci switch (idx) { 175762306a36Sopenharmony_ci case 0: return (mdp5_cfg->intf.base[0]); 175862306a36Sopenharmony_ci case 1: return (mdp5_cfg->intf.base[1]); 175962306a36Sopenharmony_ci case 2: return (mdp5_cfg->intf.base[2]); 176062306a36Sopenharmony_ci case 3: return (mdp5_cfg->intf.base[3]); 176162306a36Sopenharmony_ci case 4: return (mdp5_cfg->intf.base[4]); 176262306a36Sopenharmony_ci default: return INVALID_IDX(idx); 176362306a36Sopenharmony_ci } 176462306a36Sopenharmony_ci} 176562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF(uint32_t i0) { return 0x00000000 + __offset_INTF(i0); } 176662306a36Sopenharmony_ci 176762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TIMING_ENGINE_EN(uint32_t i0) { return 0x00000000 + __offset_INTF(i0); } 176862306a36Sopenharmony_ci 176962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_CONFIG(uint32_t i0) { return 0x00000004 + __offset_INTF(i0); } 177062306a36Sopenharmony_ci 177162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_HSYNC_CTL(uint32_t i0) { return 0x00000008 + __offset_INTF(i0); } 177262306a36Sopenharmony_ci#define MDP5_INTF_HSYNC_CTL_PULSEW__MASK 0x0000ffff 177362306a36Sopenharmony_ci#define MDP5_INTF_HSYNC_CTL_PULSEW__SHIFT 0 177462306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_HSYNC_CTL_PULSEW(uint32_t val) 177562306a36Sopenharmony_ci{ 177662306a36Sopenharmony_ci return ((val) << MDP5_INTF_HSYNC_CTL_PULSEW__SHIFT) & MDP5_INTF_HSYNC_CTL_PULSEW__MASK; 177762306a36Sopenharmony_ci} 177862306a36Sopenharmony_ci#define MDP5_INTF_HSYNC_CTL_PERIOD__MASK 0xffff0000 177962306a36Sopenharmony_ci#define MDP5_INTF_HSYNC_CTL_PERIOD__SHIFT 16 178062306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_HSYNC_CTL_PERIOD(uint32_t val) 178162306a36Sopenharmony_ci{ 178262306a36Sopenharmony_ci return ((val) << MDP5_INTF_HSYNC_CTL_PERIOD__SHIFT) & MDP5_INTF_HSYNC_CTL_PERIOD__MASK; 178362306a36Sopenharmony_ci} 178462306a36Sopenharmony_ci 178562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_VSYNC_PERIOD_F0(uint32_t i0) { return 0x0000000c + __offset_INTF(i0); } 178662306a36Sopenharmony_ci 178762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_VSYNC_PERIOD_F1(uint32_t i0) { return 0x00000010 + __offset_INTF(i0); } 178862306a36Sopenharmony_ci 178962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_VSYNC_LEN_F0(uint32_t i0) { return 0x00000014 + __offset_INTF(i0); } 179062306a36Sopenharmony_ci 179162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_VSYNC_LEN_F1(uint32_t i0) { return 0x00000018 + __offset_INTF(i0); } 179262306a36Sopenharmony_ci 179362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DISPLAY_VSTART_F0(uint32_t i0) { return 0x0000001c + __offset_INTF(i0); } 179462306a36Sopenharmony_ci 179562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DISPLAY_VSTART_F1(uint32_t i0) { return 0x00000020 + __offset_INTF(i0); } 179662306a36Sopenharmony_ci 179762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DISPLAY_VEND_F0(uint32_t i0) { return 0x00000024 + __offset_INTF(i0); } 179862306a36Sopenharmony_ci 179962306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DISPLAY_VEND_F1(uint32_t i0) { return 0x00000028 + __offset_INTF(i0); } 180062306a36Sopenharmony_ci 180162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_ACTIVE_VSTART_F0(uint32_t i0) { return 0x0000002c + __offset_INTF(i0); } 180262306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_VSTART_F0_VAL__MASK 0x7fffffff 180362306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_VSTART_F0_VAL__SHIFT 0 180462306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_ACTIVE_VSTART_F0_VAL(uint32_t val) 180562306a36Sopenharmony_ci{ 180662306a36Sopenharmony_ci return ((val) << MDP5_INTF_ACTIVE_VSTART_F0_VAL__SHIFT) & MDP5_INTF_ACTIVE_VSTART_F0_VAL__MASK; 180762306a36Sopenharmony_ci} 180862306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_VSTART_F0_ACTIVE_V_ENABLE 0x80000000 180962306a36Sopenharmony_ci 181062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_ACTIVE_VSTART_F1(uint32_t i0) { return 0x00000030 + __offset_INTF(i0); } 181162306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_VSTART_F1_VAL__MASK 0x7fffffff 181262306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_VSTART_F1_VAL__SHIFT 0 181362306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_ACTIVE_VSTART_F1_VAL(uint32_t val) 181462306a36Sopenharmony_ci{ 181562306a36Sopenharmony_ci return ((val) << MDP5_INTF_ACTIVE_VSTART_F1_VAL__SHIFT) & MDP5_INTF_ACTIVE_VSTART_F1_VAL__MASK; 181662306a36Sopenharmony_ci} 181762306a36Sopenharmony_ci 181862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_ACTIVE_VEND_F0(uint32_t i0) { return 0x00000034 + __offset_INTF(i0); } 181962306a36Sopenharmony_ci 182062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_ACTIVE_VEND_F1(uint32_t i0) { return 0x00000038 + __offset_INTF(i0); } 182162306a36Sopenharmony_ci 182262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DISPLAY_HCTL(uint32_t i0) { return 0x0000003c + __offset_INTF(i0); } 182362306a36Sopenharmony_ci#define MDP5_INTF_DISPLAY_HCTL_START__MASK 0x0000ffff 182462306a36Sopenharmony_ci#define MDP5_INTF_DISPLAY_HCTL_START__SHIFT 0 182562306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_DISPLAY_HCTL_START(uint32_t val) 182662306a36Sopenharmony_ci{ 182762306a36Sopenharmony_ci return ((val) << MDP5_INTF_DISPLAY_HCTL_START__SHIFT) & MDP5_INTF_DISPLAY_HCTL_START__MASK; 182862306a36Sopenharmony_ci} 182962306a36Sopenharmony_ci#define MDP5_INTF_DISPLAY_HCTL_END__MASK 0xffff0000 183062306a36Sopenharmony_ci#define MDP5_INTF_DISPLAY_HCTL_END__SHIFT 16 183162306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_DISPLAY_HCTL_END(uint32_t val) 183262306a36Sopenharmony_ci{ 183362306a36Sopenharmony_ci return ((val) << MDP5_INTF_DISPLAY_HCTL_END__SHIFT) & MDP5_INTF_DISPLAY_HCTL_END__MASK; 183462306a36Sopenharmony_ci} 183562306a36Sopenharmony_ci 183662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_ACTIVE_HCTL(uint32_t i0) { return 0x00000040 + __offset_INTF(i0); } 183762306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_HCTL_START__MASK 0x00007fff 183862306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_HCTL_START__SHIFT 0 183962306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_ACTIVE_HCTL_START(uint32_t val) 184062306a36Sopenharmony_ci{ 184162306a36Sopenharmony_ci return ((val) << MDP5_INTF_ACTIVE_HCTL_START__SHIFT) & MDP5_INTF_ACTIVE_HCTL_START__MASK; 184262306a36Sopenharmony_ci} 184362306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_HCTL_END__MASK 0x7fff0000 184462306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_HCTL_END__SHIFT 16 184562306a36Sopenharmony_cistatic inline uint32_t MDP5_INTF_ACTIVE_HCTL_END(uint32_t val) 184662306a36Sopenharmony_ci{ 184762306a36Sopenharmony_ci return ((val) << MDP5_INTF_ACTIVE_HCTL_END__SHIFT) & MDP5_INTF_ACTIVE_HCTL_END__MASK; 184862306a36Sopenharmony_ci} 184962306a36Sopenharmony_ci#define MDP5_INTF_ACTIVE_HCTL_ACTIVE_H_ENABLE 0x80000000 185062306a36Sopenharmony_ci 185162306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_BORDER_COLOR(uint32_t i0) { return 0x00000044 + __offset_INTF(i0); } 185262306a36Sopenharmony_ci 185362306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_UNDERFLOW_COLOR(uint32_t i0) { return 0x00000048 + __offset_INTF(i0); } 185462306a36Sopenharmony_ci 185562306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_HSYNC_SKEW(uint32_t i0) { return 0x0000004c + __offset_INTF(i0); } 185662306a36Sopenharmony_ci 185762306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_POLARITY_CTL(uint32_t i0) { return 0x00000050 + __offset_INTF(i0); } 185862306a36Sopenharmony_ci#define MDP5_INTF_POLARITY_CTL_HSYNC_LOW 0x00000001 185962306a36Sopenharmony_ci#define MDP5_INTF_POLARITY_CTL_VSYNC_LOW 0x00000002 186062306a36Sopenharmony_ci#define MDP5_INTF_POLARITY_CTL_DATA_EN_LOW 0x00000004 186162306a36Sopenharmony_ci 186262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TEST_CTL(uint32_t i0) { return 0x00000054 + __offset_INTF(i0); } 186362306a36Sopenharmony_ci 186462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TP_COLOR0(uint32_t i0) { return 0x00000058 + __offset_INTF(i0); } 186562306a36Sopenharmony_ci 186662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TP_COLOR1(uint32_t i0) { return 0x0000005c + __offset_INTF(i0); } 186762306a36Sopenharmony_ci 186862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DSI_CMD_MODE_TRIGGER_EN(uint32_t i0) { return 0x00000084 + __offset_INTF(i0); } 186962306a36Sopenharmony_ci 187062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_PANEL_FORMAT(uint32_t i0) { return 0x00000090 + __offset_INTF(i0); } 187162306a36Sopenharmony_ci 187262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_FRAME_LINE_COUNT_EN(uint32_t i0) { return 0x000000a8 + __offset_INTF(i0); } 187362306a36Sopenharmony_ci 187462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_FRAME_COUNT(uint32_t i0) { return 0x000000ac + __offset_INTF(i0); } 187562306a36Sopenharmony_ci 187662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_LINE_COUNT(uint32_t i0) { return 0x000000b0 + __offset_INTF(i0); } 187762306a36Sopenharmony_ci 187862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DEFLICKER_CONFIG(uint32_t i0) { return 0x000000f0 + __offset_INTF(i0); } 187962306a36Sopenharmony_ci 188062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DEFLICKER_STRNG_COEFF(uint32_t i0) { return 0x000000f4 + __offset_INTF(i0); } 188162306a36Sopenharmony_ci 188262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_DEFLICKER_WEAK_COEFF(uint32_t i0) { return 0x000000f8 + __offset_INTF(i0); } 188362306a36Sopenharmony_ci 188462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_ENABLE(uint32_t i0) { return 0x00000100 + __offset_INTF(i0); } 188562306a36Sopenharmony_ci 188662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_MAIN_CONTROL(uint32_t i0) { return 0x00000104 + __offset_INTF(i0); } 188762306a36Sopenharmony_ci 188862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_VIDEO_CONFIG(uint32_t i0) { return 0x00000108 + __offset_INTF(i0); } 188962306a36Sopenharmony_ci 189062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_COMPONENT_LIMITS(uint32_t i0) { return 0x0000010c + __offset_INTF(i0); } 189162306a36Sopenharmony_ci 189262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_RECTANGLE(uint32_t i0) { return 0x00000110 + __offset_INTF(i0); } 189362306a36Sopenharmony_ci 189462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_INITIAL_VALUE(uint32_t i0) { return 0x00000114 + __offset_INTF(i0); } 189562306a36Sopenharmony_ci 189662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_BLK_WHITE_PATTERN_FRAME(uint32_t i0) { return 0x00000118 + __offset_INTF(i0); } 189762306a36Sopenharmony_ci 189862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_INTF_TPG_RGB_MAPPING(uint32_t i0) { return 0x0000011c + __offset_INTF(i0); } 189962306a36Sopenharmony_ci 190062306a36Sopenharmony_cistatic inline uint32_t __offset_AD(uint32_t idx) 190162306a36Sopenharmony_ci{ 190262306a36Sopenharmony_ci switch (idx) { 190362306a36Sopenharmony_ci case 0: return (mdp5_cfg->ad.base[0]); 190462306a36Sopenharmony_ci case 1: return (mdp5_cfg->ad.base[1]); 190562306a36Sopenharmony_ci default: return INVALID_IDX(idx); 190662306a36Sopenharmony_ci } 190762306a36Sopenharmony_ci} 190862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD(uint32_t i0) { return 0x00000000 + __offset_AD(i0); } 190962306a36Sopenharmony_ci 191062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_BYPASS(uint32_t i0) { return 0x00000000 + __offset_AD(i0); } 191162306a36Sopenharmony_ci 191262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CTRL_0(uint32_t i0) { return 0x00000004 + __offset_AD(i0); } 191362306a36Sopenharmony_ci 191462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CTRL_1(uint32_t i0) { return 0x00000008 + __offset_AD(i0); } 191562306a36Sopenharmony_ci 191662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_FRAME_SIZE(uint32_t i0) { return 0x0000000c + __offset_AD(i0); } 191762306a36Sopenharmony_ci 191862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CON_CTRL_0(uint32_t i0) { return 0x00000010 + __offset_AD(i0); } 191962306a36Sopenharmony_ci 192062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CON_CTRL_1(uint32_t i0) { return 0x00000014 + __offset_AD(i0); } 192162306a36Sopenharmony_ci 192262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_STR_MAN(uint32_t i0) { return 0x00000018 + __offset_AD(i0); } 192362306a36Sopenharmony_ci 192462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_VAR(uint32_t i0) { return 0x0000001c + __offset_AD(i0); } 192562306a36Sopenharmony_ci 192662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_DITH(uint32_t i0) { return 0x00000020 + __offset_AD(i0); } 192762306a36Sopenharmony_ci 192862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_DITH_CTRL(uint32_t i0) { return 0x00000024 + __offset_AD(i0); } 192962306a36Sopenharmony_ci 193062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_AMP_LIM(uint32_t i0) { return 0x00000028 + __offset_AD(i0); } 193162306a36Sopenharmony_ci 193262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_SLOPE(uint32_t i0) { return 0x0000002c + __offset_AD(i0); } 193362306a36Sopenharmony_ci 193462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_BW_LVL(uint32_t i0) { return 0x00000030 + __offset_AD(i0); } 193562306a36Sopenharmony_ci 193662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_LOGO_POS(uint32_t i0) { return 0x00000034 + __offset_AD(i0); } 193762306a36Sopenharmony_ci 193862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_LUT_FI(uint32_t i0) { return 0x00000038 + __offset_AD(i0); } 193962306a36Sopenharmony_ci 194062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_LUT_CC(uint32_t i0) { return 0x0000007c + __offset_AD(i0); } 194162306a36Sopenharmony_ci 194262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_STR_LIM(uint32_t i0) { return 0x000000c8 + __offset_AD(i0); } 194362306a36Sopenharmony_ci 194462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CALIB_AB(uint32_t i0) { return 0x000000cc + __offset_AD(i0); } 194562306a36Sopenharmony_ci 194662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CALIB_CD(uint32_t i0) { return 0x000000d0 + __offset_AD(i0); } 194762306a36Sopenharmony_ci 194862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_MODE_SEL(uint32_t i0) { return 0x000000d4 + __offset_AD(i0); } 194962306a36Sopenharmony_ci 195062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_TFILT_CTRL(uint32_t i0) { return 0x000000d8 + __offset_AD(i0); } 195162306a36Sopenharmony_ci 195262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_BL_MINMAX(uint32_t i0) { return 0x000000dc + __offset_AD(i0); } 195362306a36Sopenharmony_ci 195462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_BL(uint32_t i0) { return 0x000000e0 + __offset_AD(i0); } 195562306a36Sopenharmony_ci 195662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_BL_MAX(uint32_t i0) { return 0x000000e8 + __offset_AD(i0); } 195762306a36Sopenharmony_ci 195862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_AL(uint32_t i0) { return 0x000000ec + __offset_AD(i0); } 195962306a36Sopenharmony_ci 196062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_AL_MIN(uint32_t i0) { return 0x000000f0 + __offset_AD(i0); } 196162306a36Sopenharmony_ci 196262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_AL_FILT(uint32_t i0) { return 0x000000f4 + __offset_AD(i0); } 196362306a36Sopenharmony_ci 196462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CFG_BUF(uint32_t i0) { return 0x000000f8 + __offset_AD(i0); } 196562306a36Sopenharmony_ci 196662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_LUT_AL(uint32_t i0) { return 0x00000100 + __offset_AD(i0); } 196762306a36Sopenharmony_ci 196862306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_TARG_STR(uint32_t i0) { return 0x00000144 + __offset_AD(i0); } 196962306a36Sopenharmony_ci 197062306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_START_CALC(uint32_t i0) { return 0x00000148 + __offset_AD(i0); } 197162306a36Sopenharmony_ci 197262306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_STR_OUT(uint32_t i0) { return 0x0000014c + __offset_AD(i0); } 197362306a36Sopenharmony_ci 197462306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_BL_OUT(uint32_t i0) { return 0x00000154 + __offset_AD(i0); } 197562306a36Sopenharmony_ci 197662306a36Sopenharmony_cistatic inline uint32_t REG_MDP5_AD_CALC_DONE(uint32_t i0) { return 0x00000158 + __offset_AD(i0); } 197762306a36Sopenharmony_ci 197862306a36Sopenharmony_ci 197962306a36Sopenharmony_ci#endif /* MDP5_XML */ 1980