162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * Copyright 2008 Advanced Micro Devices, Inc.
362306a36Sopenharmony_ci * Copyright 2008 Red Hat Inc.
462306a36Sopenharmony_ci * Copyright 2009 Jerome Glisse.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
762306a36Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
862306a36Sopenharmony_ci * to deal in the Software without restriction, including without limitation
962306a36Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1062306a36Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
1162306a36Sopenharmony_ci * Software is furnished to do so, subject to the following conditions:
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * The above copyright notice and this permission notice shall be included in
1462306a36Sopenharmony_ci * all copies or substantial portions of the Software.
1562306a36Sopenharmony_ci *
1662306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1762306a36Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1862306a36Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1962306a36Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
2062306a36Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2162306a36Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2262306a36Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE.
2362306a36Sopenharmony_ci *
2462306a36Sopenharmony_ci * Authors: Dave Airlie
2562306a36Sopenharmony_ci *          Alex Deucher
2662306a36Sopenharmony_ci *          Jerome Glisse
2762306a36Sopenharmony_ci */
2862306a36Sopenharmony_ci#ifndef R420D_H
2962306a36Sopenharmony_ci#define R420D_H
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci#define R_0001F8_MC_IND_INDEX                        0x0001F8
3262306a36Sopenharmony_ci#define   S_0001F8_MC_IND_ADDR(x)                      (((x) & 0x7F) << 0)
3362306a36Sopenharmony_ci#define   G_0001F8_MC_IND_ADDR(x)                      (((x) >> 0) & 0x7F)
3462306a36Sopenharmony_ci#define   C_0001F8_MC_IND_ADDR                         0xFFFFFF80
3562306a36Sopenharmony_ci#define   S_0001F8_MC_IND_WR_EN(x)                     (((x) & 0x1) << 8)
3662306a36Sopenharmony_ci#define   G_0001F8_MC_IND_WR_EN(x)                     (((x) >> 8) & 0x1)
3762306a36Sopenharmony_ci#define   C_0001F8_MC_IND_WR_EN                        0xFFFFFEFF
3862306a36Sopenharmony_ci#define R_0001FC_MC_IND_DATA                         0x0001FC
3962306a36Sopenharmony_ci#define   S_0001FC_MC_IND_DATA(x)                      (((x) & 0xFFFFFFFF) << 0)
4062306a36Sopenharmony_ci#define   G_0001FC_MC_IND_DATA(x)                      (((x) >> 0) & 0xFFFFFFFF)
4162306a36Sopenharmony_ci#define   C_0001FC_MC_IND_DATA                         0x00000000
4262306a36Sopenharmony_ci#define R_0007C0_CP_STAT                             0x0007C0
4362306a36Sopenharmony_ci#define   S_0007C0_MRU_BUSY(x)                         (((x) & 0x1) << 0)
4462306a36Sopenharmony_ci#define   G_0007C0_MRU_BUSY(x)                         (((x) >> 0) & 0x1)
4562306a36Sopenharmony_ci#define   C_0007C0_MRU_BUSY                            0xFFFFFFFE
4662306a36Sopenharmony_ci#define   S_0007C0_MWU_BUSY(x)                         (((x) & 0x1) << 1)
4762306a36Sopenharmony_ci#define   G_0007C0_MWU_BUSY(x)                         (((x) >> 1) & 0x1)
4862306a36Sopenharmony_ci#define   C_0007C0_MWU_BUSY                            0xFFFFFFFD
4962306a36Sopenharmony_ci#define   S_0007C0_RSIU_BUSY(x)                        (((x) & 0x1) << 2)
5062306a36Sopenharmony_ci#define   G_0007C0_RSIU_BUSY(x)                        (((x) >> 2) & 0x1)
5162306a36Sopenharmony_ci#define   C_0007C0_RSIU_BUSY                           0xFFFFFFFB
5262306a36Sopenharmony_ci#define   S_0007C0_RCIU_BUSY(x)                        (((x) & 0x1) << 3)
5362306a36Sopenharmony_ci#define   G_0007C0_RCIU_BUSY(x)                        (((x) >> 3) & 0x1)
5462306a36Sopenharmony_ci#define   C_0007C0_RCIU_BUSY                           0xFFFFFFF7
5562306a36Sopenharmony_ci#define   S_0007C0_CSF_PRIMARY_BUSY(x)                 (((x) & 0x1) << 9)
5662306a36Sopenharmony_ci#define   G_0007C0_CSF_PRIMARY_BUSY(x)                 (((x) >> 9) & 0x1)
5762306a36Sopenharmony_ci#define   C_0007C0_CSF_PRIMARY_BUSY                    0xFFFFFDFF
5862306a36Sopenharmony_ci#define   S_0007C0_CSF_INDIRECT_BUSY(x)                (((x) & 0x1) << 10)
5962306a36Sopenharmony_ci#define   G_0007C0_CSF_INDIRECT_BUSY(x)                (((x) >> 10) & 0x1)
6062306a36Sopenharmony_ci#define   C_0007C0_CSF_INDIRECT_BUSY                   0xFFFFFBFF
6162306a36Sopenharmony_ci#define   S_0007C0_CSQ_PRIMARY_BUSY(x)                 (((x) & 0x1) << 11)
6262306a36Sopenharmony_ci#define   G_0007C0_CSQ_PRIMARY_BUSY(x)                 (((x) >> 11) & 0x1)
6362306a36Sopenharmony_ci#define   C_0007C0_CSQ_PRIMARY_BUSY                    0xFFFFF7FF
6462306a36Sopenharmony_ci#define   S_0007C0_CSQ_INDIRECT_BUSY(x)                (((x) & 0x1) << 12)
6562306a36Sopenharmony_ci#define   G_0007C0_CSQ_INDIRECT_BUSY(x)                (((x) >> 12) & 0x1)
6662306a36Sopenharmony_ci#define   C_0007C0_CSQ_INDIRECT_BUSY                   0xFFFFEFFF
6762306a36Sopenharmony_ci#define   S_0007C0_CSI_BUSY(x)                         (((x) & 0x1) << 13)
6862306a36Sopenharmony_ci#define   G_0007C0_CSI_BUSY(x)                         (((x) >> 13) & 0x1)
6962306a36Sopenharmony_ci#define   C_0007C0_CSI_BUSY                            0xFFFFDFFF
7062306a36Sopenharmony_ci#define   S_0007C0_CSF_INDIRECT2_BUSY(x)               (((x) & 0x1) << 14)
7162306a36Sopenharmony_ci#define   G_0007C0_CSF_INDIRECT2_BUSY(x)               (((x) >> 14) & 0x1)
7262306a36Sopenharmony_ci#define   C_0007C0_CSF_INDIRECT2_BUSY                  0xFFFFBFFF
7362306a36Sopenharmony_ci#define   S_0007C0_CSQ_INDIRECT2_BUSY(x)               (((x) & 0x1) << 15)
7462306a36Sopenharmony_ci#define   G_0007C0_CSQ_INDIRECT2_BUSY(x)               (((x) >> 15) & 0x1)
7562306a36Sopenharmony_ci#define   C_0007C0_CSQ_INDIRECT2_BUSY                  0xFFFF7FFF
7662306a36Sopenharmony_ci#define   S_0007C0_GUIDMA_BUSY(x)                      (((x) & 0x1) << 28)
7762306a36Sopenharmony_ci#define   G_0007C0_GUIDMA_BUSY(x)                      (((x) >> 28) & 0x1)
7862306a36Sopenharmony_ci#define   C_0007C0_GUIDMA_BUSY                         0xEFFFFFFF
7962306a36Sopenharmony_ci#define   S_0007C0_VIDDMA_BUSY(x)                      (((x) & 0x1) << 29)
8062306a36Sopenharmony_ci#define   G_0007C0_VIDDMA_BUSY(x)                      (((x) >> 29) & 0x1)
8162306a36Sopenharmony_ci#define   C_0007C0_VIDDMA_BUSY                         0xDFFFFFFF
8262306a36Sopenharmony_ci#define   S_0007C0_CMDSTRM_BUSY(x)                     (((x) & 0x1) << 30)
8362306a36Sopenharmony_ci#define   G_0007C0_CMDSTRM_BUSY(x)                     (((x) >> 30) & 0x1)
8462306a36Sopenharmony_ci#define   C_0007C0_CMDSTRM_BUSY                        0xBFFFFFFF
8562306a36Sopenharmony_ci#define   S_0007C0_CP_BUSY(x)                          (((x) & 0x1) << 31)
8662306a36Sopenharmony_ci#define   G_0007C0_CP_BUSY(x)                          (((x) >> 31) & 0x1)
8762306a36Sopenharmony_ci#define   C_0007C0_CP_BUSY                             0x7FFFFFFF
8862306a36Sopenharmony_ci#define R_000E40_RBBM_STATUS                         0x000E40
8962306a36Sopenharmony_ci#define   S_000E40_CMDFIFO_AVAIL(x)                    (((x) & 0x7F) << 0)
9062306a36Sopenharmony_ci#define   G_000E40_CMDFIFO_AVAIL(x)                    (((x) >> 0) & 0x7F)
9162306a36Sopenharmony_ci#define   C_000E40_CMDFIFO_AVAIL                       0xFFFFFF80
9262306a36Sopenharmony_ci#define   S_000E40_HIRQ_ON_RBB(x)                      (((x) & 0x1) << 8)
9362306a36Sopenharmony_ci#define   G_000E40_HIRQ_ON_RBB(x)                      (((x) >> 8) & 0x1)
9462306a36Sopenharmony_ci#define   C_000E40_HIRQ_ON_RBB                         0xFFFFFEFF
9562306a36Sopenharmony_ci#define   S_000E40_CPRQ_ON_RBB(x)                      (((x) & 0x1) << 9)
9662306a36Sopenharmony_ci#define   G_000E40_CPRQ_ON_RBB(x)                      (((x) >> 9) & 0x1)
9762306a36Sopenharmony_ci#define   C_000E40_CPRQ_ON_RBB                         0xFFFFFDFF
9862306a36Sopenharmony_ci#define   S_000E40_CFRQ_ON_RBB(x)                      (((x) & 0x1) << 10)
9962306a36Sopenharmony_ci#define   G_000E40_CFRQ_ON_RBB(x)                      (((x) >> 10) & 0x1)
10062306a36Sopenharmony_ci#define   C_000E40_CFRQ_ON_RBB                         0xFFFFFBFF
10162306a36Sopenharmony_ci#define   S_000E40_HIRQ_IN_RTBUF(x)                    (((x) & 0x1) << 11)
10262306a36Sopenharmony_ci#define   G_000E40_HIRQ_IN_RTBUF(x)                    (((x) >> 11) & 0x1)
10362306a36Sopenharmony_ci#define   C_000E40_HIRQ_IN_RTBUF                       0xFFFFF7FF
10462306a36Sopenharmony_ci#define   S_000E40_CPRQ_IN_RTBUF(x)                    (((x) & 0x1) << 12)
10562306a36Sopenharmony_ci#define   G_000E40_CPRQ_IN_RTBUF(x)                    (((x) >> 12) & 0x1)
10662306a36Sopenharmony_ci#define   C_000E40_CPRQ_IN_RTBUF                       0xFFFFEFFF
10762306a36Sopenharmony_ci#define   S_000E40_CFRQ_IN_RTBUF(x)                    (((x) & 0x1) << 13)
10862306a36Sopenharmony_ci#define   G_000E40_CFRQ_IN_RTBUF(x)                    (((x) >> 13) & 0x1)
10962306a36Sopenharmony_ci#define   C_000E40_CFRQ_IN_RTBUF                       0xFFFFDFFF
11062306a36Sopenharmony_ci#define   S_000E40_CF_PIPE_BUSY(x)                     (((x) & 0x1) << 14)
11162306a36Sopenharmony_ci#define   G_000E40_CF_PIPE_BUSY(x)                     (((x) >> 14) & 0x1)
11262306a36Sopenharmony_ci#define   C_000E40_CF_PIPE_BUSY                        0xFFFFBFFF
11362306a36Sopenharmony_ci#define   S_000E40_ENG_EV_BUSY(x)                      (((x) & 0x1) << 15)
11462306a36Sopenharmony_ci#define   G_000E40_ENG_EV_BUSY(x)                      (((x) >> 15) & 0x1)
11562306a36Sopenharmony_ci#define   C_000E40_ENG_EV_BUSY                         0xFFFF7FFF
11662306a36Sopenharmony_ci#define   S_000E40_CP_CMDSTRM_BUSY(x)                  (((x) & 0x1) << 16)
11762306a36Sopenharmony_ci#define   G_000E40_CP_CMDSTRM_BUSY(x)                  (((x) >> 16) & 0x1)
11862306a36Sopenharmony_ci#define   C_000E40_CP_CMDSTRM_BUSY                     0xFFFEFFFF
11962306a36Sopenharmony_ci#define   S_000E40_E2_BUSY(x)                          (((x) & 0x1) << 17)
12062306a36Sopenharmony_ci#define   G_000E40_E2_BUSY(x)                          (((x) >> 17) & 0x1)
12162306a36Sopenharmony_ci#define   C_000E40_E2_BUSY                             0xFFFDFFFF
12262306a36Sopenharmony_ci#define   S_000E40_RB2D_BUSY(x)                        (((x) & 0x1) << 18)
12362306a36Sopenharmony_ci#define   G_000E40_RB2D_BUSY(x)                        (((x) >> 18) & 0x1)
12462306a36Sopenharmony_ci#define   C_000E40_RB2D_BUSY                           0xFFFBFFFF
12562306a36Sopenharmony_ci#define   S_000E40_RB3D_BUSY(x)                        (((x) & 0x1) << 19)
12662306a36Sopenharmony_ci#define   G_000E40_RB3D_BUSY(x)                        (((x) >> 19) & 0x1)
12762306a36Sopenharmony_ci#define   C_000E40_RB3D_BUSY                           0xFFF7FFFF
12862306a36Sopenharmony_ci#define   S_000E40_VAP_BUSY(x)                         (((x) & 0x1) << 20)
12962306a36Sopenharmony_ci#define   G_000E40_VAP_BUSY(x)                         (((x) >> 20) & 0x1)
13062306a36Sopenharmony_ci#define   C_000E40_VAP_BUSY                            0xFFEFFFFF
13162306a36Sopenharmony_ci#define   S_000E40_RE_BUSY(x)                          (((x) & 0x1) << 21)
13262306a36Sopenharmony_ci#define   G_000E40_RE_BUSY(x)                          (((x) >> 21) & 0x1)
13362306a36Sopenharmony_ci#define   C_000E40_RE_BUSY                             0xFFDFFFFF
13462306a36Sopenharmony_ci#define   S_000E40_TAM_BUSY(x)                         (((x) & 0x1) << 22)
13562306a36Sopenharmony_ci#define   G_000E40_TAM_BUSY(x)                         (((x) >> 22) & 0x1)
13662306a36Sopenharmony_ci#define   C_000E40_TAM_BUSY                            0xFFBFFFFF
13762306a36Sopenharmony_ci#define   S_000E40_TDM_BUSY(x)                         (((x) & 0x1) << 23)
13862306a36Sopenharmony_ci#define   G_000E40_TDM_BUSY(x)                         (((x) >> 23) & 0x1)
13962306a36Sopenharmony_ci#define   C_000E40_TDM_BUSY                            0xFF7FFFFF
14062306a36Sopenharmony_ci#define   S_000E40_PB_BUSY(x)                          (((x) & 0x1) << 24)
14162306a36Sopenharmony_ci#define   G_000E40_PB_BUSY(x)                          (((x) >> 24) & 0x1)
14262306a36Sopenharmony_ci#define   C_000E40_PB_BUSY                             0xFEFFFFFF
14362306a36Sopenharmony_ci#define   S_000E40_TIM_BUSY(x)                         (((x) & 0x1) << 25)
14462306a36Sopenharmony_ci#define   G_000E40_TIM_BUSY(x)                         (((x) >> 25) & 0x1)
14562306a36Sopenharmony_ci#define   C_000E40_TIM_BUSY                            0xFDFFFFFF
14662306a36Sopenharmony_ci#define   S_000E40_GA_BUSY(x)                          (((x) & 0x1) << 26)
14762306a36Sopenharmony_ci#define   G_000E40_GA_BUSY(x)                          (((x) >> 26) & 0x1)
14862306a36Sopenharmony_ci#define   C_000E40_GA_BUSY                             0xFBFFFFFF
14962306a36Sopenharmony_ci#define   S_000E40_CBA2D_BUSY(x)                       (((x) & 0x1) << 27)
15062306a36Sopenharmony_ci#define   G_000E40_CBA2D_BUSY(x)                       (((x) >> 27) & 0x1)
15162306a36Sopenharmony_ci#define   C_000E40_CBA2D_BUSY                          0xF7FFFFFF
15262306a36Sopenharmony_ci#define   S_000E40_GUI_ACTIVE(x)                       (((x) & 0x1) << 31)
15362306a36Sopenharmony_ci#define   G_000E40_GUI_ACTIVE(x)                       (((x) >> 31) & 0x1)
15462306a36Sopenharmony_ci#define   C_000E40_GUI_ACTIVE                          0x7FFFFFFF
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci/* CLK registers */
15762306a36Sopenharmony_ci#define R_00000D_SCLK_CNTL                           0x00000D
15862306a36Sopenharmony_ci#define   S_00000D_SCLK_SRC_SEL(x)                     (((x) & 0x7) << 0)
15962306a36Sopenharmony_ci#define   G_00000D_SCLK_SRC_SEL(x)                     (((x) >> 0) & 0x7)
16062306a36Sopenharmony_ci#define   C_00000D_SCLK_SRC_SEL                        0xFFFFFFF8
16162306a36Sopenharmony_ci#define   S_00000D_CP_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 3)
16262306a36Sopenharmony_ci#define   G_00000D_CP_MAX_DYN_STOP_LAT(x)              (((x) >> 3) & 0x1)
16362306a36Sopenharmony_ci#define   C_00000D_CP_MAX_DYN_STOP_LAT                 0xFFFFFFF7
16462306a36Sopenharmony_ci#define   S_00000D_HDP_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 4)
16562306a36Sopenharmony_ci#define   G_00000D_HDP_MAX_DYN_STOP_LAT(x)             (((x) >> 4) & 0x1)
16662306a36Sopenharmony_ci#define   C_00000D_HDP_MAX_DYN_STOP_LAT                0xFFFFFFEF
16762306a36Sopenharmony_ci#define   S_00000D_TV_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 5)
16862306a36Sopenharmony_ci#define   G_00000D_TV_MAX_DYN_STOP_LAT(x)              (((x) >> 5) & 0x1)
16962306a36Sopenharmony_ci#define   C_00000D_TV_MAX_DYN_STOP_LAT                 0xFFFFFFDF
17062306a36Sopenharmony_ci#define   S_00000D_E2_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 6)
17162306a36Sopenharmony_ci#define   G_00000D_E2_MAX_DYN_STOP_LAT(x)              (((x) >> 6) & 0x1)
17262306a36Sopenharmony_ci#define   C_00000D_E2_MAX_DYN_STOP_LAT                 0xFFFFFFBF
17362306a36Sopenharmony_ci#define   S_00000D_SE_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 7)
17462306a36Sopenharmony_ci#define   G_00000D_SE_MAX_DYN_STOP_LAT(x)              (((x) >> 7) & 0x1)
17562306a36Sopenharmony_ci#define   C_00000D_SE_MAX_DYN_STOP_LAT                 0xFFFFFF7F
17662306a36Sopenharmony_ci#define   S_00000D_IDCT_MAX_DYN_STOP_LAT(x)            (((x) & 0x1) << 8)
17762306a36Sopenharmony_ci#define   G_00000D_IDCT_MAX_DYN_STOP_LAT(x)            (((x) >> 8) & 0x1)
17862306a36Sopenharmony_ci#define   C_00000D_IDCT_MAX_DYN_STOP_LAT               0xFFFFFEFF
17962306a36Sopenharmony_ci#define   S_00000D_VIP_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 9)
18062306a36Sopenharmony_ci#define   G_00000D_VIP_MAX_DYN_STOP_LAT(x)             (((x) >> 9) & 0x1)
18162306a36Sopenharmony_ci#define   C_00000D_VIP_MAX_DYN_STOP_LAT                0xFFFFFDFF
18262306a36Sopenharmony_ci#define   S_00000D_RE_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 10)
18362306a36Sopenharmony_ci#define   G_00000D_RE_MAX_DYN_STOP_LAT(x)              (((x) >> 10) & 0x1)
18462306a36Sopenharmony_ci#define   C_00000D_RE_MAX_DYN_STOP_LAT                 0xFFFFFBFF
18562306a36Sopenharmony_ci#define   S_00000D_PB_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 11)
18662306a36Sopenharmony_ci#define   G_00000D_PB_MAX_DYN_STOP_LAT(x)              (((x) >> 11) & 0x1)
18762306a36Sopenharmony_ci#define   C_00000D_PB_MAX_DYN_STOP_LAT                 0xFFFFF7FF
18862306a36Sopenharmony_ci#define   S_00000D_TAM_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 12)
18962306a36Sopenharmony_ci#define   G_00000D_TAM_MAX_DYN_STOP_LAT(x)             (((x) >> 12) & 0x1)
19062306a36Sopenharmony_ci#define   C_00000D_TAM_MAX_DYN_STOP_LAT                0xFFFFEFFF
19162306a36Sopenharmony_ci#define   S_00000D_TDM_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 13)
19262306a36Sopenharmony_ci#define   G_00000D_TDM_MAX_DYN_STOP_LAT(x)             (((x) >> 13) & 0x1)
19362306a36Sopenharmony_ci#define   C_00000D_TDM_MAX_DYN_STOP_LAT                0xFFFFDFFF
19462306a36Sopenharmony_ci#define   S_00000D_RB_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 14)
19562306a36Sopenharmony_ci#define   G_00000D_RB_MAX_DYN_STOP_LAT(x)              (((x) >> 14) & 0x1)
19662306a36Sopenharmony_ci#define   C_00000D_RB_MAX_DYN_STOP_LAT                 0xFFFFBFFF
19762306a36Sopenharmony_ci#define   S_00000D_FORCE_DISP2(x)                      (((x) & 0x1) << 15)
19862306a36Sopenharmony_ci#define   G_00000D_FORCE_DISP2(x)                      (((x) >> 15) & 0x1)
19962306a36Sopenharmony_ci#define   C_00000D_FORCE_DISP2                         0xFFFF7FFF
20062306a36Sopenharmony_ci#define   S_00000D_FORCE_CP(x)                         (((x) & 0x1) << 16)
20162306a36Sopenharmony_ci#define   G_00000D_FORCE_CP(x)                         (((x) >> 16) & 0x1)
20262306a36Sopenharmony_ci#define   C_00000D_FORCE_CP                            0xFFFEFFFF
20362306a36Sopenharmony_ci#define   S_00000D_FORCE_HDP(x)                        (((x) & 0x1) << 17)
20462306a36Sopenharmony_ci#define   G_00000D_FORCE_HDP(x)                        (((x) >> 17) & 0x1)
20562306a36Sopenharmony_ci#define   C_00000D_FORCE_HDP                           0xFFFDFFFF
20662306a36Sopenharmony_ci#define   S_00000D_FORCE_DISP1(x)                      (((x) & 0x1) << 18)
20762306a36Sopenharmony_ci#define   G_00000D_FORCE_DISP1(x)                      (((x) >> 18) & 0x1)
20862306a36Sopenharmony_ci#define   C_00000D_FORCE_DISP1                         0xFFFBFFFF
20962306a36Sopenharmony_ci#define   S_00000D_FORCE_TOP(x)                        (((x) & 0x1) << 19)
21062306a36Sopenharmony_ci#define   G_00000D_FORCE_TOP(x)                        (((x) >> 19) & 0x1)
21162306a36Sopenharmony_ci#define   C_00000D_FORCE_TOP                           0xFFF7FFFF
21262306a36Sopenharmony_ci#define   S_00000D_FORCE_E2(x)                         (((x) & 0x1) << 20)
21362306a36Sopenharmony_ci#define   G_00000D_FORCE_E2(x)                         (((x) >> 20) & 0x1)
21462306a36Sopenharmony_ci#define   C_00000D_FORCE_E2                            0xFFEFFFFF
21562306a36Sopenharmony_ci#define   S_00000D_FORCE_VAP(x)                        (((x) & 0x1) << 21)
21662306a36Sopenharmony_ci#define   G_00000D_FORCE_VAP(x)                        (((x) >> 21) & 0x1)
21762306a36Sopenharmony_ci#define   C_00000D_FORCE_VAP                           0xFFDFFFFF
21862306a36Sopenharmony_ci#define   S_00000D_FORCE_IDCT(x)                       (((x) & 0x1) << 22)
21962306a36Sopenharmony_ci#define   G_00000D_FORCE_IDCT(x)                       (((x) >> 22) & 0x1)
22062306a36Sopenharmony_ci#define   C_00000D_FORCE_IDCT                          0xFFBFFFFF
22162306a36Sopenharmony_ci#define   S_00000D_FORCE_VIP(x)                        (((x) & 0x1) << 23)
22262306a36Sopenharmony_ci#define   G_00000D_FORCE_VIP(x)                        (((x) >> 23) & 0x1)
22362306a36Sopenharmony_ci#define   C_00000D_FORCE_VIP                           0xFF7FFFFF
22462306a36Sopenharmony_ci#define   S_00000D_FORCE_RE(x)                         (((x) & 0x1) << 24)
22562306a36Sopenharmony_ci#define   G_00000D_FORCE_RE(x)                         (((x) >> 24) & 0x1)
22662306a36Sopenharmony_ci#define   C_00000D_FORCE_RE                            0xFEFFFFFF
22762306a36Sopenharmony_ci#define   S_00000D_FORCE_SR(x)                         (((x) & 0x1) << 25)
22862306a36Sopenharmony_ci#define   G_00000D_FORCE_SR(x)                         (((x) >> 25) & 0x1)
22962306a36Sopenharmony_ci#define   C_00000D_FORCE_SR                            0xFDFFFFFF
23062306a36Sopenharmony_ci#define   S_00000D_FORCE_PX(x)                         (((x) & 0x1) << 26)
23162306a36Sopenharmony_ci#define   G_00000D_FORCE_PX(x)                         (((x) >> 26) & 0x1)
23262306a36Sopenharmony_ci#define   C_00000D_FORCE_PX                            0xFBFFFFFF
23362306a36Sopenharmony_ci#define   S_00000D_FORCE_TX(x)                         (((x) & 0x1) << 27)
23462306a36Sopenharmony_ci#define   G_00000D_FORCE_TX(x)                         (((x) >> 27) & 0x1)
23562306a36Sopenharmony_ci#define   C_00000D_FORCE_TX                            0xF7FFFFFF
23662306a36Sopenharmony_ci#define   S_00000D_FORCE_US(x)                         (((x) & 0x1) << 28)
23762306a36Sopenharmony_ci#define   G_00000D_FORCE_US(x)                         (((x) >> 28) & 0x1)
23862306a36Sopenharmony_ci#define   C_00000D_FORCE_US                            0xEFFFFFFF
23962306a36Sopenharmony_ci#define   S_00000D_FORCE_TV_SCLK(x)                    (((x) & 0x1) << 29)
24062306a36Sopenharmony_ci#define   G_00000D_FORCE_TV_SCLK(x)                    (((x) >> 29) & 0x1)
24162306a36Sopenharmony_ci#define   C_00000D_FORCE_TV_SCLK                       0xDFFFFFFF
24262306a36Sopenharmony_ci#define   S_00000D_FORCE_SU(x)                         (((x) & 0x1) << 30)
24362306a36Sopenharmony_ci#define   G_00000D_FORCE_SU(x)                         (((x) >> 30) & 0x1)
24462306a36Sopenharmony_ci#define   C_00000D_FORCE_SU                            0xBFFFFFFF
24562306a36Sopenharmony_ci#define   S_00000D_FORCE_OV0(x)                        (((x) & 0x1) << 31)
24662306a36Sopenharmony_ci#define   G_00000D_FORCE_OV0(x)                        (((x) >> 31) & 0x1)
24762306a36Sopenharmony_ci#define   C_00000D_FORCE_OV0                           0x7FFFFFFF
24862306a36Sopenharmony_ci
24962306a36Sopenharmony_ci#endif
250