1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright © 2018 Intel Corporation 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation 7bf215546Sopenharmony_ci * on the rights to use, copy, modify, merge, publish, distribute, sub 8bf215546Sopenharmony_ci * license, and/or sell copies of the Software, and to permit persons to whom 9bf215546Sopenharmony_ci * the Software is furnished to do so, subject to the following conditions: 10bf215546Sopenharmony_ci * 11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next 12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 13bf215546Sopenharmony_ci * Software. 14bf215546Sopenharmony_ci * 15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18bf215546Sopenharmony_ci * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 19bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 21bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. 22bf215546Sopenharmony_ci */ 23bf215546Sopenharmony_ci#ifndef IRIS_DEFINES_H 24bf215546Sopenharmony_ci#define IRIS_DEFINES_H 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci/** 27bf215546Sopenharmony_ci * @file iris_defines.h 28bf215546Sopenharmony_ci * 29bf215546Sopenharmony_ci * Random hardware #defines that we're not using GENXML for. 30bf215546Sopenharmony_ci */ 31bf215546Sopenharmony_ci 32bf215546Sopenharmony_ci#define MI_PREDICATE (0xC << 23) 33bf215546Sopenharmony_ci# define MI_PREDICATE_LOADOP_KEEP (0 << 6) 34bf215546Sopenharmony_ci# define MI_PREDICATE_LOADOP_LOAD (2 << 6) 35bf215546Sopenharmony_ci# define MI_PREDICATE_LOADOP_LOADINV (3 << 6) 36bf215546Sopenharmony_ci# define MI_PREDICATE_COMBINEOP_SET (0 << 3) 37bf215546Sopenharmony_ci# define MI_PREDICATE_COMBINEOP_AND (1 << 3) 38bf215546Sopenharmony_ci# define MI_PREDICATE_COMBINEOP_OR (2 << 3) 39bf215546Sopenharmony_ci# define MI_PREDICATE_COMBINEOP_XOR (3 << 3) 40bf215546Sopenharmony_ci# define MI_PREDICATE_COMPAREOP_TRUE (0 << 0) 41bf215546Sopenharmony_ci# define MI_PREDICATE_COMPAREOP_FALSE (1 << 0) 42bf215546Sopenharmony_ci# define MI_PREDICATE_COMPAREOP_SRCS_EQUAL (2 << 0) 43bf215546Sopenharmony_ci# define MI_PREDICATE_COMPAREOP_DELTAS_EQUAL (3 << 0) 44bf215546Sopenharmony_ci 45bf215546Sopenharmony_ci/* Predicate registers */ 46bf215546Sopenharmony_ci#define MI_PREDICATE_SRC0 0x2400 47bf215546Sopenharmony_ci#define MI_PREDICATE_SRC1 0x2408 48bf215546Sopenharmony_ci#define MI_PREDICATE_DATA 0x2410 49bf215546Sopenharmony_ci#define MI_PREDICATE_RESULT 0x2418 50bf215546Sopenharmony_ci#define MI_PREDICATE_RESULT_1 0x241C 51bf215546Sopenharmony_ci#define MI_PREDICATE_RESULT_2 0x2214 52bf215546Sopenharmony_ci 53bf215546Sopenharmony_ci#define CS_GPR(n) (0x2600 + (n) * 8) 54bf215546Sopenharmony_ci 55bf215546Sopenharmony_ci/* The number of bits in our TIMESTAMP queries. */ 56bf215546Sopenharmony_ci#define TIMESTAMP_BITS 36 57bf215546Sopenharmony_ci 58bf215546Sopenharmony_ci/* For gfx12 we set the streamout buffers using 4 separate commands 59bf215546Sopenharmony_ci * (3DSTATE_SO_BUFFER_INDEX_*) instead of 3DSTATE_SO_BUFFER. However the layout 60bf215546Sopenharmony_ci * of the 3DSTATE_SO_BUFFER_INDEX_* commands is identical to that of 61bf215546Sopenharmony_ci * 3DSTATE_SO_BUFFER apart from the SOBufferIndex field, so for now we use the 62bf215546Sopenharmony_ci * 3DSTATE_SO_BUFFER command, but change the 3DCommandSubOpcode. 63bf215546Sopenharmony_ci * SO_BUFFER_INDEX_0_CMD is actually the 3DCommandSubOpcode for 64bf215546Sopenharmony_ci * 3DSTATE_SO_BUFFER_INDEX_0. 65bf215546Sopenharmony_ci */ 66bf215546Sopenharmony_ci#define SO_BUFFER_INDEX_0_CMD 0x60 67bf215546Sopenharmony_ci 68bf215546Sopenharmony_ci#endif 69