16e99df57SBen Goz /* 26e99df57SBen Goz * Copyright 2014 Advanced Micro Devices, Inc. 36e99df57SBen Goz * 46e99df57SBen Goz * Permission is hereby granted, free of charge, to any person obtaining a 56e99df57SBen Goz * copy of this software and associated documentation files (the "Software"), 66e99df57SBen Goz * to deal in the Software without restriction, including without limitation 76e99df57SBen Goz * the rights to use, copy, modify, merge, publish, distribute, sublicense, 86e99df57SBen Goz * and/or sell copies of the Software, and to permit persons to whom the 96e99df57SBen Goz * Software is furnished to do so, subject to the following conditions: 106e99df57SBen Goz * 116e99df57SBen Goz * The above copyright notice and this permission notice shall be included in 126e99df57SBen Goz * all copies or substantial portions of the Software. 136e99df57SBen Goz * 146e99df57SBen Goz * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 156e99df57SBen Goz * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 166e99df57SBen Goz * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 176e99df57SBen Goz * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 186e99df57SBen Goz * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 196e99df57SBen Goz * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 206e99df57SBen Goz * OTHER DEALINGS IN THE SOFTWARE. 216e99df57SBen Goz */ 226e99df57SBen Goz 236e99df57SBen Goz #ifndef CIK_REGS_H 246e99df57SBen Goz #define CIK_REGS_H 256e99df57SBen Goz 266e99df57SBen Goz /* if PTR32, these are the bases for scratch and lds */ 276e99df57SBen Goz #define PRIVATE_BASE(x) ((x) << 0) /* scratch */ 286e99df57SBen Goz #define SHARED_BASE(x) ((x) << 16) /* LDS */ 296e99df57SBen Goz #define PTR32 (1 << 0) 306e99df57SBen Goz #define ALIGNMENT_MODE(x) ((x) << 2) 316e99df57SBen Goz #define SH_MEM_ALIGNMENT_MODE_UNALIGNED 3 326e99df57SBen Goz #define DEFAULT_MTYPE(x) ((x) << 4) 336e99df57SBen Goz #define APE1_MTYPE(x) ((x) << 7) 346e99df57SBen Goz 356e99df57SBen Goz /* valid for both DEFAULT_MTYPE and APE1_MTYPE */ 362774c63eSJay Cornwall #define MTYPE_CACHED_NV 0 372774c63eSJay Cornwall #define MTYPE_CACHED 1 386e99df57SBen Goz #define MTYPE_NONCACHED 3 396e99df57SBen Goz 406e99df57SBen Goz #define DEFAULT_CP_HQD_PERSISTENT_STATE (0x33U << 8) 416e99df57SBen Goz #define PRELOAD_REQ (1 << 0) 426e99df57SBen Goz 43da73b9fbSOded Gabbay #define MQD_CONTROL_PRIV_STATE_EN (1U << 8) 44da73b9fbSOded Gabbay 45da73b9fbSOded Gabbay #define DEFAULT_MIN_IB_AVAIL_SIZE (3U << 20) 46da73b9fbSOded Gabbay 47da73b9fbSOded Gabbay #define IB_ATC_EN (1U << 23) 48da73b9fbSOded Gabbay 496e99df57SBen Goz #define QUANTUM_EN 1U 506e99df57SBen Goz #define QUANTUM_SCALE_1MS (1U << 4) 516e99df57SBen Goz #define QUANTUM_DURATION(x) ((x) << 8) 526e99df57SBen Goz 536e99df57SBen Goz #define RPTR_BLOCK_SIZE(x) ((x) << 8) 546e99df57SBen Goz #define MIN_AVAIL_SIZE(x) ((x) << 20) 556e99df57SBen Goz #define DEFAULT_RPTR_BLOCK_SIZE RPTR_BLOCK_SIZE(5) 566e99df57SBen Goz #define DEFAULT_MIN_AVAIL_SIZE MIN_AVAIL_SIZE(3) 576e99df57SBen Goz 58da73b9fbSOded Gabbay #define PQ_ATC_EN (1 << 23) 59da73b9fbSOded Gabbay #define NO_UPDATE_RPTR (1 << 27) 60da73b9fbSOded Gabbay 61da73b9fbSOded Gabbay #define DOORBELL_OFFSET(x) ((x) << 2) 62da73b9fbSOded Gabbay #define DOORBELL_EN (1 << 30) 63da73b9fbSOded Gabbay 64da73b9fbSOded Gabbay #define PRIV_STATE (1 << 30) 65da73b9fbSOded Gabbay #define KMD_QUEUE (1 << 31) 666e99df57SBen Goz 6771273adcSOded Gabbay #define AQL_ENABLE 1 6871273adcSOded Gabbay 696e99df57SBen Goz #define GRBM_GFX_INDEX 0x30800 706e99df57SBen Goz 716e99df57SBen Goz #define ATC_VMID_PASID_MAPPING_VALID (1U << 31) 726e99df57SBen Goz 736e99df57SBen Goz #endif 74