2 * Copyright 2011 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
24 * Alex Deucher <alexander.deucher@amd.com>
27 #include <linux/types.h>
28 #include <linux/bug.h>
29 #include <linux/kernel.h>
31 const u32 si_default_state
[] =
35 0x00000060, /* DB_RENDER_CONTROL */
36 0x00000000, /* DB_COUNT_CONTROL */
37 0x00000000, /* DB_DEPTH_VIEW */
38 0x0000002a, /* DB_RENDER_OVERRIDE */
39 0x00000000, /* DB_RENDER_OVERRIDE2 */
40 0x00000000, /* DB_HTILE_DATA_BASE */
44 0x00000000, /* DB_DEPTH_BOUNDS_MIN */
45 0x00000000, /* DB_DEPTH_BOUNDS_MAX */
46 0x00000000, /* DB_STENCIL_CLEAR */
47 0x00000000, /* DB_DEPTH_CLEAR */
51 0x00000000, /* DB_DEPTH_INFO */
52 0x00000000, /* DB_Z_INFO */
53 0x00000000, /* DB_STENCIL_INFO */
57 0x00000000, /* PA_SC_WINDOW_OFFSET */
61 0x0000ffff, /* PA_SC_CLIPRECT_RULE */
62 0x00000000, /* PA_SC_CLIPRECT_0_TL */
63 0x20002000, /* PA_SC_CLIPRECT_0_BR */
70 0xaaaaaaaa, /* PA_SC_EDGERULE */
71 0x00000000, /* PA_SU_HARDWARE_SCREEN_OFFSET */
72 0x0000000f, /* CB_TARGET_MASK */
73 0x0000000f, /* CB_SHADER_MASK */
77 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */
78 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */
109 0x00000000, /* PA_SC_VPORT_ZMIN_0 */
110 0x3f800000, /* PA_SC_VPORT_ZMAX_0 */
114 0x00000000, /* CP_RINGID */
115 0x00000000, /* CP_VMID */
119 0xffffffff, /* VGT_MAX_VTX_INDX */
120 0x00000000, /* VGT_MIN_VTX_INDX */
121 0x00000000, /* VGT_INDX_OFFSET */
122 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */
126 0x00000000, /* CB_BLEND_RED */
127 0x00000000, /* CB_BLEND_GREEN */
128 0x00000000, /* CB_BLEND_BLUE */
129 0x00000000, /* CB_BLEND_ALPHA */
133 0x00000000, /* CB_BLEND0_CONTROL */
137 0x00000000, /* DB_DEPTH_CONTROL */
138 0x00000000, /* DB_EQAA */
139 0x00cc0010, /* CB_COLOR_CONTROL */
140 0x00000210, /* DB_SHADER_CONTROL */
141 0x00010000, /* PA_CL_CLIP_CNTL */
142 0x00000004, /* PA_SU_SC_MODE_CNTL */
143 0x00000100, /* PA_CL_VTE_CNTL */
144 0x00000000, /* PA_CL_VS_OUT_CNTL */
145 0x00000000, /* PA_CL_NANINF_CNTL */
146 0x00000000, /* PA_SU_LINE_STIPPLE_CNTL */
147 0x00000000, /* PA_SU_LINE_STIPPLE_SCALE */
148 0x00000000, /* PA_SU_PRIM_FILTER_CNTL */
154 0x00000000, /* PA_SU_POINT_SIZE */
155 0x00000000, /* PA_SU_POINT_MINMAX */
156 0x00000008, /* PA_SU_LINE_CNTL */
157 0x00000000, /* PA_SC_LINE_STIPPLE */
158 0x00000000, /* VGT_OUTPUT_PATH_CNTL */
159 0x00000000, /* VGT_HOS_CNTL */
170 0x00000000, /* VGT_GS_MODE */
174 0x00000000, /* PA_SC_MODE_CNTL_0 */
175 0x00000000, /* PA_SC_MODE_CNTL_1 */
179 0x00000000, /* VGT_PRIMITIVEID_EN */
183 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_EN */
187 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */
192 0x00000000, /* VGT_REUSE_OFF */
197 0x00000000, /* VGT_SHADER_STAGES_EN */
201 0x0000aa00, /* DB_ALPHA_TO_MASK */
205 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */
214 0x00000000, /* VGT_STRMOUT_CONFIG */
219 0x76543210, /* PA_SC_CENTROID_PRIORITY_0 */
220 0xfedcba98, /* PA_SC_CENTROID_PRIORITY_1 */
221 0x00000000, /* PA_SC_LINE_CNTL */
222 0x00000000, /* PA_SC_AA_CONFIG */
223 0x00000005, /* PA_SU_VTX_CNTL */
224 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */
225 0x3f800000, /* PA_CL_GB_VERT_DISC_ADJ */
226 0x3f800000, /* PA_CL_GB_HORZ_CLIP_ADJ */
227 0x3f800000, /* PA_CL_GB_HORZ_DISC_ADJ */
228 0x00000000, /* PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 */
244 0xffffffff, /* PA_SC_AA_MASK_X0Y0_X1Y0 */
249 0x0000000e, /* VGT_VERTEX_REUSE_BLOCK_CNTL */
253 const u32 si_default_size
= ARRAY_SIZE(si_default_state
);