122 lines · c
1/*2 * Copyright 2023 Advanced Micro Devices, Inc.3 *4 * Permission is hereby granted, free of charge, to any person obtaining a5 * copy of this software and associated documentation files (the "Software"),6 * to deal in the Software without restriction, including without limitation7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,8 * and/or sell copies of the Software, and to permit persons to whom the9 * Software is furnished to do so, subject to the following conditions:10 *11 * The above copyright notice and this permission notice shall be included in12 * all copies or substantial portions of the Software.13 *14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR20 * OTHER DEALINGS IN THE SOFTWARE.21 *22 */23#ifndef __CLEARSTATE_GFX12_H_24#define __CLEARSTATE_GFX12_H_25 26static const unsigned int gfx12_SECT_CONTEXT_def_1[] = {270x00000000, //mmSC_MEM_TEMPORAL280x00000000, //mmSC_MEM_SPEC_READ290x00000000, //mmPA_SC_VPORT_0_TL300x00000000, //mmPA_SC_VPORT_0_BR310x00000000, //mmPA_SC_VPORT_1_TL320x00000000, //mmPA_SC_VPORT_1_BR330x00000000, //mmPA_SC_VPORT_2_TL340x00000000, //mmPA_SC_VPORT_2_BR350x00000000, //mmPA_SC_VPORT_3_TL360x00000000, //mmPA_SC_VPORT_3_BR370x00000000, //mmPA_SC_VPORT_4_TL380x00000000, //mmPA_SC_VPORT_4_BR390x00000000, //mmPA_SC_VPORT_5_TL400x00000000, //mmPA_SC_VPORT_5_BR410x00000000, //mmPA_SC_VPORT_6_TL420x00000000, //mmPA_SC_VPORT_6_BR430x00000000, //mmPA_SC_VPORT_7_TL440x00000000, //mmPA_SC_VPORT_7_BR450x00000000, //mmPA_SC_VPORT_8_TL460x00000000, //mmPA_SC_VPORT_8_BR470x00000000, //mmPA_SC_VPORT_9_TL480x00000000, //mmPA_SC_VPORT_9_BR490x00000000, //mmPA_SC_VPORT_10_TL500x00000000, //mmPA_SC_VPORT_10_BR510x00000000, //mmPA_SC_VPORT_11_TL520x00000000, //mmPA_SC_VPORT_11_BR530x00000000, //mmPA_SC_VPORT_12_TL540x00000000, //mmPA_SC_VPORT_12_BR550x00000000, //mmPA_SC_VPORT_13_TL560x00000000, //mmPA_SC_VPORT_13_BR570x00000000, //mmPA_SC_VPORT_14_TL580x00000000, //mmPA_SC_VPORT_14_BR590x00000000, //mmPA_SC_VPORT_15_TL600x00000000, //mmPA_SC_VPORT_15_BR61};62 63static const unsigned int gfx12_SECT_CONTEXT_def_2[] = {640x00000000, //mmPA_CL_PROG_NEAR_CLIP_Z650x00000000, //mmPA_RATE_CNTL66};67 68static const unsigned int gfx12_SECT_CONTEXT_def_3[] = {690x00000000, //mmCP_PERFMON_CNTX_CNTL70};71 72static const unsigned int gfx12_SECT_CONTEXT_def_4[] = {730x00000000, //mmCONTEXT_RESERVED_REG0740x00000000, //mmCONTEXT_RESERVED_REG1750x00000000, //mmPA_SC_CLIPRECT_0_EXT760x00000000, //mmPA_SC_CLIPRECT_1_EXT770x00000000, //mmPA_SC_CLIPRECT_2_EXT780x00000000, //mmPA_SC_CLIPRECT_3_EXT79};80 81static const unsigned int gfx12_SECT_CONTEXT_def_5[] = {820x00000000, //mmPA_SC_HIZ_INFO830x00000000, //mmPA_SC_HIS_INFO840x00000000, //mmPA_SC_HIZ_BASE850x00000000, //mmPA_SC_HIZ_BASE_EXT860x00000000, //mmPA_SC_HIZ_SIZE_XY870x00000000, //mmPA_SC_HIS_BASE880x00000000, //mmPA_SC_HIS_BASE_EXT890x00000000, //mmPA_SC_HIS_SIZE_XY900x00000000, //mmPA_SC_BINNER_OUTPUT_TIMEOUT_CNTL910x00000000, //mmPA_SC_BINNER_DYNAMIC_BATCH_LIMIT920x00000000, //mmPA_SC_HISZ_CONTROL93};94 95static const unsigned int gfx12_SECT_CONTEXT_def_6[] = {960x00000000, //mmCB_MEM0_INFO970x00000000, //mmCB_MEM1_INFO980x00000000, //mmCB_MEM2_INFO990x00000000, //mmCB_MEM3_INFO1000x00000000, //mmCB_MEM4_INFO1010x00000000, //mmCB_MEM5_INFO1020x00000000, //mmCB_MEM6_INFO1030x00000000, //mmCB_MEM7_INFO104};105 106static const struct cs_extent_def gfx12_SECT_CONTEXT_defs[] = {107 {gfx12_SECT_CONTEXT_def_1, 0x0000a03e, 34 },108 {gfx12_SECT_CONTEXT_def_2, 0x0000a0cc, 2 },109 {gfx12_SECT_CONTEXT_def_3, 0x0000a0d8, 1 },110 {gfx12_SECT_CONTEXT_def_4, 0x0000a0db, 6 },111 {gfx12_SECT_CONTEXT_def_5, 0x0000a2e5, 11 },112 {gfx12_SECT_CONTEXT_def_6, 0x0000a3c0, 8 },113 { 0, 0, 0 }114};115 116static const struct cs_section_def gfx12_cs_data[] = {117 { gfx12_SECT_CONTEXT_defs, SECT_CONTEXT },118 { 0, SECT_NONE }119};120 121#endif /* __CLEARSTATE_GFX12_H_ */122