1926deccbSFrançois Tigeot /* 2926deccbSFrançois Tigeot * Copyright 2011 Advanced Micro Devices, Inc. 3926deccbSFrançois Tigeot * 4926deccbSFrançois Tigeot * Permission is hereby granted, free of charge, to any person obtaining a 5926deccbSFrançois Tigeot * copy of this software and associated documentation files (the "Software"), 6926deccbSFrançois Tigeot * to deal in the Software without restriction, including without limitation 7926deccbSFrançois Tigeot * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8926deccbSFrançois Tigeot * and/or sell copies of the Software, and to permit persons to whom the 9926deccbSFrançois Tigeot * Software is furnished to do so, subject to the following conditions: 10926deccbSFrançois Tigeot * 11926deccbSFrançois Tigeot * The above copyright notice and this permission notice (including the next 12926deccbSFrançois Tigeot * paragraph) shall be included in all copies or substantial portions of the 13926deccbSFrançois Tigeot * Software. 14926deccbSFrançois Tigeot * 15926deccbSFrançois Tigeot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16926deccbSFrançois Tigeot * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17926deccbSFrançois Tigeot * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18926deccbSFrançois Tigeot * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19926deccbSFrançois Tigeot * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20926deccbSFrançois Tigeot * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21926deccbSFrançois Tigeot * DEALINGS IN THE SOFTWARE. 22926deccbSFrançois Tigeot * 23926deccbSFrançois Tigeot * Authors: 24926deccbSFrançois Tigeot * Alex Deucher <alexander.deucher@amd.com> 25926deccbSFrançois Tigeot */ 26926deccbSFrançois Tigeot 27*c4ef309bSzrj #include <linux/types.h> 28*c4ef309bSzrj #include <linux/bug.h> 29*c4ef309bSzrj #include <linux/kernel.h> 30926deccbSFrançois Tigeot 31926deccbSFrançois Tigeot const u32 si_default_state[] = 32926deccbSFrançois Tigeot { 33926deccbSFrançois Tigeot 0xc0066900, 34926deccbSFrançois Tigeot 0x00000000, 35926deccbSFrançois Tigeot 0x00000060, /* DB_RENDER_CONTROL */ 36926deccbSFrançois Tigeot 0x00000000, /* DB_COUNT_CONTROL */ 37926deccbSFrançois Tigeot 0x00000000, /* DB_DEPTH_VIEW */ 38926deccbSFrançois Tigeot 0x0000002a, /* DB_RENDER_OVERRIDE */ 39926deccbSFrançois Tigeot 0x00000000, /* DB_RENDER_OVERRIDE2 */ 40926deccbSFrançois Tigeot 0x00000000, /* DB_HTILE_DATA_BASE */ 41926deccbSFrançois Tigeot 42926deccbSFrançois Tigeot 0xc0046900, 43926deccbSFrançois Tigeot 0x00000008, 44926deccbSFrançois Tigeot 0x00000000, /* DB_DEPTH_BOUNDS_MIN */ 45926deccbSFrançois Tigeot 0x00000000, /* DB_DEPTH_BOUNDS_MAX */ 46926deccbSFrançois Tigeot 0x00000000, /* DB_STENCIL_CLEAR */ 47926deccbSFrançois Tigeot 0x00000000, /* DB_DEPTH_CLEAR */ 48926deccbSFrançois Tigeot 49926deccbSFrançois Tigeot 0xc0036900, 50926deccbSFrançois Tigeot 0x0000000f, 51926deccbSFrançois Tigeot 0x00000000, /* DB_DEPTH_INFO */ 52926deccbSFrançois Tigeot 0x00000000, /* DB_Z_INFO */ 53926deccbSFrançois Tigeot 0x00000000, /* DB_STENCIL_INFO */ 54926deccbSFrançois Tigeot 55926deccbSFrançois Tigeot 0xc0016900, 56926deccbSFrançois Tigeot 0x00000080, 57926deccbSFrançois Tigeot 0x00000000, /* PA_SC_WINDOW_OFFSET */ 58926deccbSFrançois Tigeot 59926deccbSFrançois Tigeot 0xc00d6900, 60926deccbSFrançois Tigeot 0x00000083, 61926deccbSFrançois Tigeot 0x0000ffff, /* PA_SC_CLIPRECT_RULE */ 62926deccbSFrançois Tigeot 0x00000000, /* PA_SC_CLIPRECT_0_TL */ 63926deccbSFrançois Tigeot 0x20002000, /* PA_SC_CLIPRECT_0_BR */ 64926deccbSFrançois Tigeot 0x00000000, 65926deccbSFrançois Tigeot 0x20002000, 66926deccbSFrançois Tigeot 0x00000000, 67926deccbSFrançois Tigeot 0x20002000, 68926deccbSFrançois Tigeot 0x00000000, 69926deccbSFrançois Tigeot 0x20002000, 70926deccbSFrançois Tigeot 0xaaaaaaaa, /* PA_SC_EDGERULE */ 71926deccbSFrançois Tigeot 0x00000000, /* PA_SU_HARDWARE_SCREEN_OFFSET */ 72926deccbSFrançois Tigeot 0x0000000f, /* CB_TARGET_MASK */ 73926deccbSFrançois Tigeot 0x0000000f, /* CB_SHADER_MASK */ 74926deccbSFrançois Tigeot 75926deccbSFrançois Tigeot 0xc0226900, 76926deccbSFrançois Tigeot 0x00000094, 77926deccbSFrançois Tigeot 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */ 78926deccbSFrançois Tigeot 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */ 79926deccbSFrançois Tigeot 0x80000000, 80926deccbSFrançois Tigeot 0x20002000, 81926deccbSFrançois Tigeot 0x80000000, 82926deccbSFrançois Tigeot 0x20002000, 83926deccbSFrançois Tigeot 0x80000000, 84926deccbSFrançois Tigeot 0x20002000, 85926deccbSFrançois Tigeot 0x80000000, 86926deccbSFrançois Tigeot 0x20002000, 87926deccbSFrançois Tigeot 0x80000000, 88926deccbSFrançois Tigeot 0x20002000, 89926deccbSFrançois Tigeot 0x80000000, 90926deccbSFrançois Tigeot 0x20002000, 91926deccbSFrançois Tigeot 0x80000000, 92926deccbSFrançois Tigeot 0x20002000, 93926deccbSFrançois Tigeot 0x80000000, 94926deccbSFrançois Tigeot 0x20002000, 95926deccbSFrançois Tigeot 0x80000000, 96926deccbSFrançois Tigeot 0x20002000, 97926deccbSFrançois Tigeot 0x80000000, 98926deccbSFrançois Tigeot 0x20002000, 99926deccbSFrançois Tigeot 0x80000000, 100926deccbSFrançois Tigeot 0x20002000, 101926deccbSFrançois Tigeot 0x80000000, 102926deccbSFrançois Tigeot 0x20002000, 103926deccbSFrançois Tigeot 0x80000000, 104926deccbSFrançois Tigeot 0x20002000, 105926deccbSFrançois Tigeot 0x80000000, 106926deccbSFrançois Tigeot 0x20002000, 107926deccbSFrançois Tigeot 0x80000000, 108926deccbSFrançois Tigeot 0x20002000, 109926deccbSFrançois Tigeot 0x00000000, /* PA_SC_VPORT_ZMIN_0 */ 110926deccbSFrançois Tigeot 0x3f800000, /* PA_SC_VPORT_ZMAX_0 */ 111926deccbSFrançois Tigeot 112926deccbSFrançois Tigeot 0xc0026900, 113926deccbSFrançois Tigeot 0x000000d9, 114926deccbSFrançois Tigeot 0x00000000, /* CP_RINGID */ 115926deccbSFrançois Tigeot 0x00000000, /* CP_VMID */ 116926deccbSFrançois Tigeot 117926deccbSFrançois Tigeot 0xc0046900, 118926deccbSFrançois Tigeot 0x00000100, 119926deccbSFrançois Tigeot 0xffffffff, /* VGT_MAX_VTX_INDX */ 120926deccbSFrançois Tigeot 0x00000000, /* VGT_MIN_VTX_INDX */ 121926deccbSFrançois Tigeot 0x00000000, /* VGT_INDX_OFFSET */ 122926deccbSFrançois Tigeot 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */ 123926deccbSFrançois Tigeot 124926deccbSFrançois Tigeot 0xc0046900, 125926deccbSFrançois Tigeot 0x00000105, 126926deccbSFrançois Tigeot 0x00000000, /* CB_BLEND_RED */ 127926deccbSFrançois Tigeot 0x00000000, /* CB_BLEND_GREEN */ 128926deccbSFrançois Tigeot 0x00000000, /* CB_BLEND_BLUE */ 129926deccbSFrançois Tigeot 0x00000000, /* CB_BLEND_ALPHA */ 130926deccbSFrançois Tigeot 131926deccbSFrançois Tigeot 0xc0016900, 132926deccbSFrançois Tigeot 0x000001e0, 133926deccbSFrançois Tigeot 0x00000000, /* CB_BLEND0_CONTROL */ 134926deccbSFrançois Tigeot 135926deccbSFrançois Tigeot 0xc00e6900, 136926deccbSFrançois Tigeot 0x00000200, 137926deccbSFrançois Tigeot 0x00000000, /* DB_DEPTH_CONTROL */ 138926deccbSFrançois Tigeot 0x00000000, /* DB_EQAA */ 139926deccbSFrançois Tigeot 0x00cc0010, /* CB_COLOR_CONTROL */ 140926deccbSFrançois Tigeot 0x00000210, /* DB_SHADER_CONTROL */ 141926deccbSFrançois Tigeot 0x00010000, /* PA_CL_CLIP_CNTL */ 142926deccbSFrançois Tigeot 0x00000004, /* PA_SU_SC_MODE_CNTL */ 143926deccbSFrançois Tigeot 0x00000100, /* PA_CL_VTE_CNTL */ 144926deccbSFrançois Tigeot 0x00000000, /* PA_CL_VS_OUT_CNTL */ 145926deccbSFrançois Tigeot 0x00000000, /* PA_CL_NANINF_CNTL */ 146926deccbSFrançois Tigeot 0x00000000, /* PA_SU_LINE_STIPPLE_CNTL */ 147926deccbSFrançois Tigeot 0x00000000, /* PA_SU_LINE_STIPPLE_SCALE */ 148926deccbSFrançois Tigeot 0x00000000, /* PA_SU_PRIM_FILTER_CNTL */ 149926deccbSFrançois Tigeot 0x00000000, /* */ 150926deccbSFrançois Tigeot 0x00000000, /* */ 151926deccbSFrançois Tigeot 152926deccbSFrançois Tigeot 0xc0116900, 153926deccbSFrançois Tigeot 0x00000280, 154926deccbSFrançois Tigeot 0x00000000, /* PA_SU_POINT_SIZE */ 155926deccbSFrançois Tigeot 0x00000000, /* PA_SU_POINT_MINMAX */ 156926deccbSFrançois Tigeot 0x00000008, /* PA_SU_LINE_CNTL */ 157926deccbSFrançois Tigeot 0x00000000, /* PA_SC_LINE_STIPPLE */ 158926deccbSFrançois Tigeot 0x00000000, /* VGT_OUTPUT_PATH_CNTL */ 159926deccbSFrançois Tigeot 0x00000000, /* VGT_HOS_CNTL */ 160926deccbSFrançois Tigeot 0x00000000, 161926deccbSFrançois Tigeot 0x00000000, 162926deccbSFrançois Tigeot 0x00000000, 163926deccbSFrançois Tigeot 0x00000000, 164926deccbSFrançois Tigeot 0x00000000, 165926deccbSFrançois Tigeot 0x00000000, 166926deccbSFrançois Tigeot 0x00000000, 167926deccbSFrançois Tigeot 0x00000000, 168926deccbSFrançois Tigeot 0x00000000, 169926deccbSFrançois Tigeot 0x00000000, 170926deccbSFrançois Tigeot 0x00000000, /* VGT_GS_MODE */ 171926deccbSFrançois Tigeot 172926deccbSFrançois Tigeot 0xc0026900, 173926deccbSFrançois Tigeot 0x00000292, 174926deccbSFrançois Tigeot 0x00000000, /* PA_SC_MODE_CNTL_0 */ 175926deccbSFrançois Tigeot 0x00000000, /* PA_SC_MODE_CNTL_1 */ 176926deccbSFrançois Tigeot 177926deccbSFrançois Tigeot 0xc0016900, 178926deccbSFrançois Tigeot 0x000002a1, 179926deccbSFrançois Tigeot 0x00000000, /* VGT_PRIMITIVEID_EN */ 180926deccbSFrançois Tigeot 181926deccbSFrançois Tigeot 0xc0016900, 182926deccbSFrançois Tigeot 0x000002a5, 183926deccbSFrançois Tigeot 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_EN */ 184926deccbSFrançois Tigeot 185926deccbSFrançois Tigeot 0xc0026900, 186926deccbSFrançois Tigeot 0x000002a8, 187926deccbSFrançois Tigeot 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */ 188926deccbSFrançois Tigeot 0x00000000, 189926deccbSFrançois Tigeot 190926deccbSFrançois Tigeot 0xc0026900, 191926deccbSFrançois Tigeot 0x000002ad, 192926deccbSFrançois Tigeot 0x00000000, /* VGT_REUSE_OFF */ 193926deccbSFrançois Tigeot 0x00000000, 194926deccbSFrançois Tigeot 195926deccbSFrançois Tigeot 0xc0016900, 196926deccbSFrançois Tigeot 0x000002d5, 197926deccbSFrançois Tigeot 0x00000000, /* VGT_SHADER_STAGES_EN */ 198926deccbSFrançois Tigeot 199926deccbSFrançois Tigeot 0xc0016900, 200926deccbSFrançois Tigeot 0x000002dc, 201926deccbSFrançois Tigeot 0x0000aa00, /* DB_ALPHA_TO_MASK */ 202926deccbSFrançois Tigeot 203926deccbSFrançois Tigeot 0xc0066900, 204926deccbSFrançois Tigeot 0x000002de, 205926deccbSFrançois Tigeot 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */ 206926deccbSFrançois Tigeot 0x00000000, 207926deccbSFrançois Tigeot 0x00000000, 208926deccbSFrançois Tigeot 0x00000000, 209926deccbSFrançois Tigeot 0x00000000, 210926deccbSFrançois Tigeot 0x00000000, 211926deccbSFrançois Tigeot 212926deccbSFrançois Tigeot 0xc0026900, 213926deccbSFrançois Tigeot 0x000002e5, 214926deccbSFrançois Tigeot 0x00000000, /* VGT_STRMOUT_CONFIG */ 215926deccbSFrançois Tigeot 0x00000000, 216926deccbSFrançois Tigeot 217926deccbSFrançois Tigeot 0xc01b6900, 218926deccbSFrançois Tigeot 0x000002f5, 219926deccbSFrançois Tigeot 0x76543210, /* PA_SC_CENTROID_PRIORITY_0 */ 220926deccbSFrançois Tigeot 0xfedcba98, /* PA_SC_CENTROID_PRIORITY_1 */ 221926deccbSFrançois Tigeot 0x00000000, /* PA_SC_LINE_CNTL */ 222926deccbSFrançois Tigeot 0x00000000, /* PA_SC_AA_CONFIG */ 223926deccbSFrançois Tigeot 0x00000005, /* PA_SU_VTX_CNTL */ 224926deccbSFrançois Tigeot 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */ 225926deccbSFrançois Tigeot 0x3f800000, /* PA_CL_GB_VERT_DISC_ADJ */ 226926deccbSFrançois Tigeot 0x3f800000, /* PA_CL_GB_HORZ_CLIP_ADJ */ 227926deccbSFrançois Tigeot 0x3f800000, /* PA_CL_GB_HORZ_DISC_ADJ */ 228926deccbSFrançois Tigeot 0x00000000, /* PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 */ 229926deccbSFrançois Tigeot 0x00000000, 230926deccbSFrançois Tigeot 0x00000000, 231926deccbSFrançois Tigeot 0x00000000, 232926deccbSFrançois Tigeot 0x00000000, 233926deccbSFrançois Tigeot 0x00000000, 234926deccbSFrançois Tigeot 0x00000000, 235926deccbSFrançois Tigeot 0x00000000, 236926deccbSFrançois Tigeot 0x00000000, 237926deccbSFrançois Tigeot 0x00000000, 238926deccbSFrançois Tigeot 0x00000000, 239926deccbSFrançois Tigeot 0x00000000, 240926deccbSFrançois Tigeot 0x00000000, 241926deccbSFrançois Tigeot 0x00000000, 242926deccbSFrançois Tigeot 0x00000000, 243926deccbSFrançois Tigeot 0x00000000, 244926deccbSFrançois Tigeot 0xffffffff, /* PA_SC_AA_MASK_X0Y0_X1Y0 */ 245926deccbSFrançois Tigeot 0xffffffff, 246926deccbSFrançois Tigeot 247926deccbSFrançois Tigeot 0xc0026900, 248926deccbSFrançois Tigeot 0x00000316, 249926deccbSFrançois Tigeot 0x0000000e, /* VGT_VERTEX_REUSE_BLOCK_CNTL */ 250926deccbSFrançois Tigeot 0x00000010, /* */ 251926deccbSFrançois Tigeot }; 252926deccbSFrançois Tigeot 253*c4ef309bSzrj const u32 si_default_size = ARRAY_SIZE(si_default_state); 254