1*57e252bfSMichael Neumann /* 2*57e252bfSMichael Neumann * Copyright 2012 Advanced Micro Devices, Inc. 3*57e252bfSMichael Neumann * 4*57e252bfSMichael Neumann * Permission is hereby granted, free of charge, to any person obtaining a 5*57e252bfSMichael Neumann * copy of this software and associated documentation files (the "Software"), 6*57e252bfSMichael Neumann * to deal in the Software without restriction, including without limitation 7*57e252bfSMichael Neumann * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*57e252bfSMichael Neumann * and/or sell copies of the Software, and to permit persons to whom the 9*57e252bfSMichael Neumann * Software is furnished to do so, subject to the following conditions: 10*57e252bfSMichael Neumann * 11*57e252bfSMichael Neumann * The above copyright notice and this permission notice (including the next 12*57e252bfSMichael Neumann * paragraph) shall be included in all copies or substantial portions of the 13*57e252bfSMichael Neumann * Software. 14*57e252bfSMichael Neumann * 15*57e252bfSMichael Neumann * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16*57e252bfSMichael Neumann * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17*57e252bfSMichael Neumann * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18*57e252bfSMichael Neumann * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19*57e252bfSMichael Neumann * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20*57e252bfSMichael Neumann * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21*57e252bfSMichael Neumann * DEALINGS IN THE SOFTWARE. 22*57e252bfSMichael Neumann * 23*57e252bfSMichael Neumann * Authors: 24*57e252bfSMichael Neumann * Alex Deucher <alexander.deucher@amd.com> 25*57e252bfSMichael Neumann */ 26*57e252bfSMichael Neumann 27*57e252bfSMichael Neumann #include <linux/types.h> 28*57e252bfSMichael Neumann #include <linux/bug.h> 29*57e252bfSMichael Neumann #include <linux/kernel.h> 30*57e252bfSMichael Neumann 31*57e252bfSMichael Neumann const u32 cik_default_state[] = 32*57e252bfSMichael Neumann { 33*57e252bfSMichael Neumann 0xc0066900, 34*57e252bfSMichael Neumann 0x00000000, 35*57e252bfSMichael Neumann 0x00000060, /* DB_RENDER_CONTROL */ 36*57e252bfSMichael Neumann 0x00000000, /* DB_COUNT_CONTROL */ 37*57e252bfSMichael Neumann 0x00000000, /* DB_DEPTH_VIEW */ 38*57e252bfSMichael Neumann 0x0000002a, /* DB_RENDER_OVERRIDE */ 39*57e252bfSMichael Neumann 0x00000000, /* DB_RENDER_OVERRIDE2 */ 40*57e252bfSMichael Neumann 0x00000000, /* DB_HTILE_DATA_BASE */ 41*57e252bfSMichael Neumann 42*57e252bfSMichael Neumann 0xc0046900, 43*57e252bfSMichael Neumann 0x00000008, 44*57e252bfSMichael Neumann 0x00000000, /* DB_DEPTH_BOUNDS_MIN */ 45*57e252bfSMichael Neumann 0x00000000, /* DB_DEPTH_BOUNDS_MAX */ 46*57e252bfSMichael Neumann 0x00000000, /* DB_STENCIL_CLEAR */ 47*57e252bfSMichael Neumann 0x00000000, /* DB_DEPTH_CLEAR */ 48*57e252bfSMichael Neumann 49*57e252bfSMichael Neumann 0xc0036900, 50*57e252bfSMichael Neumann 0x0000000f, 51*57e252bfSMichael Neumann 0x00000000, /* DB_DEPTH_INFO */ 52*57e252bfSMichael Neumann 0x00000000, /* DB_Z_INFO */ 53*57e252bfSMichael Neumann 0x00000000, /* DB_STENCIL_INFO */ 54*57e252bfSMichael Neumann 55*57e252bfSMichael Neumann 0xc0016900, 56*57e252bfSMichael Neumann 0x00000080, 57*57e252bfSMichael Neumann 0x00000000, /* PA_SC_WINDOW_OFFSET */ 58*57e252bfSMichael Neumann 59*57e252bfSMichael Neumann 0xc00d6900, 60*57e252bfSMichael Neumann 0x00000083, 61*57e252bfSMichael Neumann 0x0000ffff, /* PA_SC_CLIPRECT_RULE */ 62*57e252bfSMichael Neumann 0x00000000, /* PA_SC_CLIPRECT_0_TL */ 63*57e252bfSMichael Neumann 0x20002000, /* PA_SC_CLIPRECT_0_BR */ 64*57e252bfSMichael Neumann 0x00000000, 65*57e252bfSMichael Neumann 0x20002000, 66*57e252bfSMichael Neumann 0x00000000, 67*57e252bfSMichael Neumann 0x20002000, 68*57e252bfSMichael Neumann 0x00000000, 69*57e252bfSMichael Neumann 0x20002000, 70*57e252bfSMichael Neumann 0xaaaaaaaa, /* PA_SC_EDGERULE */ 71*57e252bfSMichael Neumann 0x00000000, /* PA_SU_HARDWARE_SCREEN_OFFSET */ 72*57e252bfSMichael Neumann 0x0000000f, /* CB_TARGET_MASK */ 73*57e252bfSMichael Neumann 0x0000000f, /* CB_SHADER_MASK */ 74*57e252bfSMichael Neumann 75*57e252bfSMichael Neumann 0xc0226900, 76*57e252bfSMichael Neumann 0x00000094, 77*57e252bfSMichael Neumann 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */ 78*57e252bfSMichael Neumann 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */ 79*57e252bfSMichael Neumann 0x80000000, 80*57e252bfSMichael Neumann 0x20002000, 81*57e252bfSMichael Neumann 0x80000000, 82*57e252bfSMichael Neumann 0x20002000, 83*57e252bfSMichael Neumann 0x80000000, 84*57e252bfSMichael Neumann 0x20002000, 85*57e252bfSMichael Neumann 0x80000000, 86*57e252bfSMichael Neumann 0x20002000, 87*57e252bfSMichael Neumann 0x80000000, 88*57e252bfSMichael Neumann 0x20002000, 89*57e252bfSMichael Neumann 0x80000000, 90*57e252bfSMichael Neumann 0x20002000, 91*57e252bfSMichael Neumann 0x80000000, 92*57e252bfSMichael Neumann 0x20002000, 93*57e252bfSMichael Neumann 0x80000000, 94*57e252bfSMichael Neumann 0x20002000, 95*57e252bfSMichael Neumann 0x80000000, 96*57e252bfSMichael Neumann 0x20002000, 97*57e252bfSMichael Neumann 0x80000000, 98*57e252bfSMichael Neumann 0x20002000, 99*57e252bfSMichael Neumann 0x80000000, 100*57e252bfSMichael Neumann 0x20002000, 101*57e252bfSMichael Neumann 0x80000000, 102*57e252bfSMichael Neumann 0x20002000, 103*57e252bfSMichael Neumann 0x80000000, 104*57e252bfSMichael Neumann 0x20002000, 105*57e252bfSMichael Neumann 0x80000000, 106*57e252bfSMichael Neumann 0x20002000, 107*57e252bfSMichael Neumann 0x80000000, 108*57e252bfSMichael Neumann 0x20002000, 109*57e252bfSMichael Neumann 0x00000000, /* PA_SC_VPORT_ZMIN_0 */ 110*57e252bfSMichael Neumann 0x3f800000, /* PA_SC_VPORT_ZMAX_0 */ 111*57e252bfSMichael Neumann 112*57e252bfSMichael Neumann 0xc0046900, 113*57e252bfSMichael Neumann 0x00000100, 114*57e252bfSMichael Neumann 0xffffffff, /* VGT_MAX_VTX_INDX */ 115*57e252bfSMichael Neumann 0x00000000, /* VGT_MIN_VTX_INDX */ 116*57e252bfSMichael Neumann 0x00000000, /* VGT_INDX_OFFSET */ 117*57e252bfSMichael Neumann 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */ 118*57e252bfSMichael Neumann 119*57e252bfSMichael Neumann 0xc0046900, 120*57e252bfSMichael Neumann 0x00000105, 121*57e252bfSMichael Neumann 0x00000000, /* CB_BLEND_RED */ 122*57e252bfSMichael Neumann 0x00000000, /* CB_BLEND_GREEN */ 123*57e252bfSMichael Neumann 0x00000000, /* CB_BLEND_BLUE */ 124*57e252bfSMichael Neumann 0x00000000, /* CB_BLEND_ALPHA */ 125*57e252bfSMichael Neumann 126*57e252bfSMichael Neumann 0xc0016900, 127*57e252bfSMichael Neumann 0x000001e0, 128*57e252bfSMichael Neumann 0x00000000, /* CB_BLEND0_CONTROL */ 129*57e252bfSMichael Neumann 130*57e252bfSMichael Neumann 0xc00c6900, 131*57e252bfSMichael Neumann 0x00000200, 132*57e252bfSMichael Neumann 0x00000000, /* DB_DEPTH_CONTROL */ 133*57e252bfSMichael Neumann 0x00000000, /* DB_EQAA */ 134*57e252bfSMichael Neumann 0x00cc0010, /* CB_COLOR_CONTROL */ 135*57e252bfSMichael Neumann 0x00000210, /* DB_SHADER_CONTROL */ 136*57e252bfSMichael Neumann 0x00010000, /* PA_CL_CLIP_CNTL */ 137*57e252bfSMichael Neumann 0x00000004, /* PA_SU_SC_MODE_CNTL */ 138*57e252bfSMichael Neumann 0x00000100, /* PA_CL_VTE_CNTL */ 139*57e252bfSMichael Neumann 0x00000000, /* PA_CL_VS_OUT_CNTL */ 140*57e252bfSMichael Neumann 0x00000000, /* PA_CL_NANINF_CNTL */ 141*57e252bfSMichael Neumann 0x00000000, /* PA_SU_LINE_STIPPLE_CNTL */ 142*57e252bfSMichael Neumann 0x00000000, /* PA_SU_LINE_STIPPLE_SCALE */ 143*57e252bfSMichael Neumann 0x00000000, /* PA_SU_PRIM_FILTER_CNTL */ 144*57e252bfSMichael Neumann 145*57e252bfSMichael Neumann 0xc0116900, 146*57e252bfSMichael Neumann 0x00000280, 147*57e252bfSMichael Neumann 0x00000000, /* PA_SU_POINT_SIZE */ 148*57e252bfSMichael Neumann 0x00000000, /* PA_SU_POINT_MINMAX */ 149*57e252bfSMichael Neumann 0x00000008, /* PA_SU_LINE_CNTL */ 150*57e252bfSMichael Neumann 0x00000000, /* PA_SC_LINE_STIPPLE */ 151*57e252bfSMichael Neumann 0x00000000, /* VGT_OUTPUT_PATH_CNTL */ 152*57e252bfSMichael Neumann 0x00000000, /* VGT_HOS_CNTL */ 153*57e252bfSMichael Neumann 0x00000000, 154*57e252bfSMichael Neumann 0x00000000, 155*57e252bfSMichael Neumann 0x00000000, 156*57e252bfSMichael Neumann 0x00000000, 157*57e252bfSMichael Neumann 0x00000000, 158*57e252bfSMichael Neumann 0x00000000, 159*57e252bfSMichael Neumann 0x00000000, 160*57e252bfSMichael Neumann 0x00000000, 161*57e252bfSMichael Neumann 0x00000000, 162*57e252bfSMichael Neumann 0x00000000, 163*57e252bfSMichael Neumann 0x00000000, /* VGT_GS_MODE */ 164*57e252bfSMichael Neumann 165*57e252bfSMichael Neumann 0xc0026900, 166*57e252bfSMichael Neumann 0x00000292, 167*57e252bfSMichael Neumann 0x00000000, /* PA_SC_MODE_CNTL_0 */ 168*57e252bfSMichael Neumann 0x00000000, /* PA_SC_MODE_CNTL_1 */ 169*57e252bfSMichael Neumann 170*57e252bfSMichael Neumann 0xc0016900, 171*57e252bfSMichael Neumann 0x000002a1, 172*57e252bfSMichael Neumann 0x00000000, /* VGT_PRIMITIVEID_EN */ 173*57e252bfSMichael Neumann 174*57e252bfSMichael Neumann 0xc0016900, 175*57e252bfSMichael Neumann 0x000002a5, 176*57e252bfSMichael Neumann 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_EN */ 177*57e252bfSMichael Neumann 178*57e252bfSMichael Neumann 0xc0026900, 179*57e252bfSMichael Neumann 0x000002a8, 180*57e252bfSMichael Neumann 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */ 181*57e252bfSMichael Neumann 0x00000000, 182*57e252bfSMichael Neumann 183*57e252bfSMichael Neumann 0xc0026900, 184*57e252bfSMichael Neumann 0x000002ad, 185*57e252bfSMichael Neumann 0x00000000, /* VGT_REUSE_OFF */ 186*57e252bfSMichael Neumann 0x00000000, 187*57e252bfSMichael Neumann 188*57e252bfSMichael Neumann 0xc0016900, 189*57e252bfSMichael Neumann 0x000002d5, 190*57e252bfSMichael Neumann 0x00000000, /* VGT_SHADER_STAGES_EN */ 191*57e252bfSMichael Neumann 192*57e252bfSMichael Neumann 0xc0016900, 193*57e252bfSMichael Neumann 0x000002dc, 194*57e252bfSMichael Neumann 0x0000aa00, /* DB_ALPHA_TO_MASK */ 195*57e252bfSMichael Neumann 196*57e252bfSMichael Neumann 0xc0066900, 197*57e252bfSMichael Neumann 0x000002de, 198*57e252bfSMichael Neumann 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */ 199*57e252bfSMichael Neumann 0x00000000, 200*57e252bfSMichael Neumann 0x00000000, 201*57e252bfSMichael Neumann 0x00000000, 202*57e252bfSMichael Neumann 0x00000000, 203*57e252bfSMichael Neumann 0x00000000, 204*57e252bfSMichael Neumann 205*57e252bfSMichael Neumann 0xc0026900, 206*57e252bfSMichael Neumann 0x000002e5, 207*57e252bfSMichael Neumann 0x00000000, /* VGT_STRMOUT_CONFIG */ 208*57e252bfSMichael Neumann 0x00000000, 209*57e252bfSMichael Neumann 210*57e252bfSMichael Neumann 0xc01b6900, 211*57e252bfSMichael Neumann 0x000002f5, 212*57e252bfSMichael Neumann 0x76543210, /* PA_SC_CENTROID_PRIORITY_0 */ 213*57e252bfSMichael Neumann 0xfedcba98, /* PA_SC_CENTROID_PRIORITY_1 */ 214*57e252bfSMichael Neumann 0x00000000, /* PA_SC_LINE_CNTL */ 215*57e252bfSMichael Neumann 0x00000000, /* PA_SC_AA_CONFIG */ 216*57e252bfSMichael Neumann 0x00000005, /* PA_SU_VTX_CNTL */ 217*57e252bfSMichael Neumann 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */ 218*57e252bfSMichael Neumann 0x3f800000, /* PA_CL_GB_VERT_DISC_ADJ */ 219*57e252bfSMichael Neumann 0x3f800000, /* PA_CL_GB_HORZ_CLIP_ADJ */ 220*57e252bfSMichael Neumann 0x3f800000, /* PA_CL_GB_HORZ_DISC_ADJ */ 221*57e252bfSMichael Neumann 0x00000000, /* PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 */ 222*57e252bfSMichael Neumann 0x00000000, 223*57e252bfSMichael Neumann 0x00000000, 224*57e252bfSMichael Neumann 0x00000000, 225*57e252bfSMichael Neumann 0x00000000, 226*57e252bfSMichael Neumann 0x00000000, 227*57e252bfSMichael Neumann 0x00000000, 228*57e252bfSMichael Neumann 0x00000000, 229*57e252bfSMichael Neumann 0x00000000, 230*57e252bfSMichael Neumann 0x00000000, 231*57e252bfSMichael Neumann 0x00000000, 232*57e252bfSMichael Neumann 0x00000000, 233*57e252bfSMichael Neumann 0x00000000, 234*57e252bfSMichael Neumann 0x00000000, 235*57e252bfSMichael Neumann 0x00000000, 236*57e252bfSMichael Neumann 0x00000000, 237*57e252bfSMichael Neumann 0xffffffff, /* PA_SC_AA_MASK_X0Y0_X1Y0 */ 238*57e252bfSMichael Neumann 0xffffffff, 239*57e252bfSMichael Neumann 240*57e252bfSMichael Neumann 0xc0026900, 241*57e252bfSMichael Neumann 0x00000316, 242*57e252bfSMichael Neumann 0x0000000e, /* VGT_VERTEX_REUSE_BLOCK_CNTL */ 243*57e252bfSMichael Neumann 0x00000010, /* */ 244*57e252bfSMichael Neumann }; 245*57e252bfSMichael Neumann 246*57e252bfSMichael Neumann const u32 cik_default_size = ARRAY_SIZE(cik_default_state); 247