xref: /openbmc/linux/drivers/gpu/drm/radeon/rv250d.h (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
1*d4550907SJerome Glisse /*
2*d4550907SJerome Glisse  * Copyright 2008 Advanced Micro Devices, Inc.
3*d4550907SJerome Glisse  * Copyright 2008 Red Hat Inc.
4*d4550907SJerome Glisse  * Copyright 2009 Jerome Glisse.
5*d4550907SJerome Glisse  *
6*d4550907SJerome Glisse  * Permission is hereby granted, free of charge, to any person obtaining a
7*d4550907SJerome Glisse  * copy of this software and associated documentation files (the "Software"),
8*d4550907SJerome Glisse  * to deal in the Software without restriction, including without limitation
9*d4550907SJerome Glisse  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10*d4550907SJerome Glisse  * and/or sell copies of the Software, and to permit persons to whom the
11*d4550907SJerome Glisse  * Software is furnished to do so, subject to the following conditions:
12*d4550907SJerome Glisse  *
13*d4550907SJerome Glisse  * The above copyright notice and this permission notice shall be included in
14*d4550907SJerome Glisse  * all copies or substantial portions of the Software.
15*d4550907SJerome Glisse  *
16*d4550907SJerome Glisse  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*d4550907SJerome Glisse  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*d4550907SJerome Glisse  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19*d4550907SJerome Glisse  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20*d4550907SJerome Glisse  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21*d4550907SJerome Glisse  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22*d4550907SJerome Glisse  * OTHER DEALINGS IN THE SOFTWARE.
23*d4550907SJerome Glisse  *
24*d4550907SJerome Glisse  * Authors: Dave Airlie
25*d4550907SJerome Glisse  *          Alex Deucher
26*d4550907SJerome Glisse  *          Jerome Glisse
27*d4550907SJerome Glisse  */
28*d4550907SJerome Glisse #ifndef __RV250D_H__
29*d4550907SJerome Glisse #define __RV250D_H__
30*d4550907SJerome Glisse 
31*d4550907SJerome Glisse #define R_00000D_SCLK_CNTL_M6                        0x00000D
32*d4550907SJerome Glisse #define   S_00000D_SCLK_SRC_SEL(x)                     (((x) & 0x7) << 0)
33*d4550907SJerome Glisse #define   G_00000D_SCLK_SRC_SEL(x)                     (((x) >> 0) & 0x7)
34*d4550907SJerome Glisse #define   C_00000D_SCLK_SRC_SEL                        0xFFFFFFF8
35*d4550907SJerome Glisse #define   S_00000D_CP_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 3)
36*d4550907SJerome Glisse #define   G_00000D_CP_MAX_DYN_STOP_LAT(x)              (((x) >> 3) & 0x1)
37*d4550907SJerome Glisse #define   C_00000D_CP_MAX_DYN_STOP_LAT                 0xFFFFFFF7
38*d4550907SJerome Glisse #define   S_00000D_HDP_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 4)
39*d4550907SJerome Glisse #define   G_00000D_HDP_MAX_DYN_STOP_LAT(x)             (((x) >> 4) & 0x1)
40*d4550907SJerome Glisse #define   C_00000D_HDP_MAX_DYN_STOP_LAT                0xFFFFFFEF
41*d4550907SJerome Glisse #define   S_00000D_TV_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 5)
42*d4550907SJerome Glisse #define   G_00000D_TV_MAX_DYN_STOP_LAT(x)              (((x) >> 5) & 0x1)
43*d4550907SJerome Glisse #define   C_00000D_TV_MAX_DYN_STOP_LAT                 0xFFFFFFDF
44*d4550907SJerome Glisse #define   S_00000D_E2_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 6)
45*d4550907SJerome Glisse #define   G_00000D_E2_MAX_DYN_STOP_LAT(x)              (((x) >> 6) & 0x1)
46*d4550907SJerome Glisse #define   C_00000D_E2_MAX_DYN_STOP_LAT                 0xFFFFFFBF
47*d4550907SJerome Glisse #define   S_00000D_SE_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 7)
48*d4550907SJerome Glisse #define   G_00000D_SE_MAX_DYN_STOP_LAT(x)              (((x) >> 7) & 0x1)
49*d4550907SJerome Glisse #define   C_00000D_SE_MAX_DYN_STOP_LAT                 0xFFFFFF7F
50*d4550907SJerome Glisse #define   S_00000D_IDCT_MAX_DYN_STOP_LAT(x)            (((x) & 0x1) << 8)
51*d4550907SJerome Glisse #define   G_00000D_IDCT_MAX_DYN_STOP_LAT(x)            (((x) >> 8) & 0x1)
52*d4550907SJerome Glisse #define   C_00000D_IDCT_MAX_DYN_STOP_LAT               0xFFFFFEFF
53*d4550907SJerome Glisse #define   S_00000D_VIP_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 9)
54*d4550907SJerome Glisse #define   G_00000D_VIP_MAX_DYN_STOP_LAT(x)             (((x) >> 9) & 0x1)
55*d4550907SJerome Glisse #define   C_00000D_VIP_MAX_DYN_STOP_LAT                0xFFFFFDFF
56*d4550907SJerome Glisse #define   S_00000D_RE_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 10)
57*d4550907SJerome Glisse #define   G_00000D_RE_MAX_DYN_STOP_LAT(x)              (((x) >> 10) & 0x1)
58*d4550907SJerome Glisse #define   C_00000D_RE_MAX_DYN_STOP_LAT                 0xFFFFFBFF
59*d4550907SJerome Glisse #define   S_00000D_PB_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 11)
60*d4550907SJerome Glisse #define   G_00000D_PB_MAX_DYN_STOP_LAT(x)              (((x) >> 11) & 0x1)
61*d4550907SJerome Glisse #define   C_00000D_PB_MAX_DYN_STOP_LAT                 0xFFFFF7FF
62*d4550907SJerome Glisse #define   S_00000D_TAM_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 12)
63*d4550907SJerome Glisse #define   G_00000D_TAM_MAX_DYN_STOP_LAT(x)             (((x) >> 12) & 0x1)
64*d4550907SJerome Glisse #define   C_00000D_TAM_MAX_DYN_STOP_LAT                0xFFFFEFFF
65*d4550907SJerome Glisse #define   S_00000D_TDM_MAX_DYN_STOP_LAT(x)             (((x) & 0x1) << 13)
66*d4550907SJerome Glisse #define   G_00000D_TDM_MAX_DYN_STOP_LAT(x)             (((x) >> 13) & 0x1)
67*d4550907SJerome Glisse #define   C_00000D_TDM_MAX_DYN_STOP_LAT                0xFFFFDFFF
68*d4550907SJerome Glisse #define   S_00000D_RB_MAX_DYN_STOP_LAT(x)              (((x) & 0x1) << 14)
69*d4550907SJerome Glisse #define   G_00000D_RB_MAX_DYN_STOP_LAT(x)              (((x) >> 14) & 0x1)
70*d4550907SJerome Glisse #define   C_00000D_RB_MAX_DYN_STOP_LAT                 0xFFFFBFFF
71*d4550907SJerome Glisse #define   S_00000D_FORCE_DISP2(x)                      (((x) & 0x1) << 15)
72*d4550907SJerome Glisse #define   G_00000D_FORCE_DISP2(x)                      (((x) >> 15) & 0x1)
73*d4550907SJerome Glisse #define   C_00000D_FORCE_DISP2                         0xFFFF7FFF
74*d4550907SJerome Glisse #define   S_00000D_FORCE_CP(x)                         (((x) & 0x1) << 16)
75*d4550907SJerome Glisse #define   G_00000D_FORCE_CP(x)                         (((x) >> 16) & 0x1)
76*d4550907SJerome Glisse #define   C_00000D_FORCE_CP                            0xFFFEFFFF
77*d4550907SJerome Glisse #define   S_00000D_FORCE_HDP(x)                        (((x) & 0x1) << 17)
78*d4550907SJerome Glisse #define   G_00000D_FORCE_HDP(x)                        (((x) >> 17) & 0x1)
79*d4550907SJerome Glisse #define   C_00000D_FORCE_HDP                           0xFFFDFFFF
80*d4550907SJerome Glisse #define   S_00000D_FORCE_DISP1(x)                      (((x) & 0x1) << 18)
81*d4550907SJerome Glisse #define   G_00000D_FORCE_DISP1(x)                      (((x) >> 18) & 0x1)
82*d4550907SJerome Glisse #define   C_00000D_FORCE_DISP1                         0xFFFBFFFF
83*d4550907SJerome Glisse #define   S_00000D_FORCE_TOP(x)                        (((x) & 0x1) << 19)
84*d4550907SJerome Glisse #define   G_00000D_FORCE_TOP(x)                        (((x) >> 19) & 0x1)
85*d4550907SJerome Glisse #define   C_00000D_FORCE_TOP                           0xFFF7FFFF
86*d4550907SJerome Glisse #define   S_00000D_FORCE_E2(x)                         (((x) & 0x1) << 20)
87*d4550907SJerome Glisse #define   G_00000D_FORCE_E2(x)                         (((x) >> 20) & 0x1)
88*d4550907SJerome Glisse #define   C_00000D_FORCE_E2                            0xFFEFFFFF
89*d4550907SJerome Glisse #define   S_00000D_FORCE_SE(x)                         (((x) & 0x1) << 21)
90*d4550907SJerome Glisse #define   G_00000D_FORCE_SE(x)                         (((x) >> 21) & 0x1)
91*d4550907SJerome Glisse #define   C_00000D_FORCE_SE                            0xFFDFFFFF
92*d4550907SJerome Glisse #define   S_00000D_FORCE_IDCT(x)                       (((x) & 0x1) << 22)
93*d4550907SJerome Glisse #define   G_00000D_FORCE_IDCT(x)                       (((x) >> 22) & 0x1)
94*d4550907SJerome Glisse #define   C_00000D_FORCE_IDCT                          0xFFBFFFFF
95*d4550907SJerome Glisse #define   S_00000D_FORCE_VIP(x)                        (((x) & 0x1) << 23)
96*d4550907SJerome Glisse #define   G_00000D_FORCE_VIP(x)                        (((x) >> 23) & 0x1)
97*d4550907SJerome Glisse #define   C_00000D_FORCE_VIP                           0xFF7FFFFF
98*d4550907SJerome Glisse #define   S_00000D_FORCE_RE(x)                         (((x) & 0x1) << 24)
99*d4550907SJerome Glisse #define   G_00000D_FORCE_RE(x)                         (((x) >> 24) & 0x1)
100*d4550907SJerome Glisse #define   C_00000D_FORCE_RE                            0xFEFFFFFF
101*d4550907SJerome Glisse #define   S_00000D_FORCE_PB(x)                         (((x) & 0x1) << 25)
102*d4550907SJerome Glisse #define   G_00000D_FORCE_PB(x)                         (((x) >> 25) & 0x1)
103*d4550907SJerome Glisse #define   C_00000D_FORCE_PB                            0xFDFFFFFF
104*d4550907SJerome Glisse #define   S_00000D_FORCE_TAM(x)                        (((x) & 0x1) << 26)
105*d4550907SJerome Glisse #define   G_00000D_FORCE_TAM(x)                        (((x) >> 26) & 0x1)
106*d4550907SJerome Glisse #define   C_00000D_FORCE_TAM                           0xFBFFFFFF
107*d4550907SJerome Glisse #define   S_00000D_FORCE_TDM(x)                        (((x) & 0x1) << 27)
108*d4550907SJerome Glisse #define   G_00000D_FORCE_TDM(x)                        (((x) >> 27) & 0x1)
109*d4550907SJerome Glisse #define   C_00000D_FORCE_TDM                           0xF7FFFFFF
110*d4550907SJerome Glisse #define   S_00000D_FORCE_RB(x)                         (((x) & 0x1) << 28)
111*d4550907SJerome Glisse #define   G_00000D_FORCE_RB(x)                         (((x) >> 28) & 0x1)
112*d4550907SJerome Glisse #define   C_00000D_FORCE_RB                            0xEFFFFFFF
113*d4550907SJerome Glisse #define   S_00000D_FORCE_TV_SCLK(x)                    (((x) & 0x1) << 29)
114*d4550907SJerome Glisse #define   G_00000D_FORCE_TV_SCLK(x)                    (((x) >> 29) & 0x1)
115*d4550907SJerome Glisse #define   C_00000D_FORCE_TV_SCLK                       0xDFFFFFFF
116*d4550907SJerome Glisse #define   S_00000D_FORCE_SUBPIC(x)                     (((x) & 0x1) << 30)
117*d4550907SJerome Glisse #define   G_00000D_FORCE_SUBPIC(x)                     (((x) >> 30) & 0x1)
118*d4550907SJerome Glisse #define   C_00000D_FORCE_SUBPIC                        0xBFFFFFFF
119*d4550907SJerome Glisse #define   S_00000D_FORCE_OV0(x)                        (((x) & 0x1) << 31)
120*d4550907SJerome Glisse #define   G_00000D_FORCE_OV0(x)                        (((x) >> 31) & 0x1)
121*d4550907SJerome Glisse #define   C_00000D_FORCE_OV0                           0x7FFFFFFF
122*d4550907SJerome Glisse 
123*d4550907SJerome Glisse #endif
124