1 /* 2 * Copyright © 2023 Raspberry Pi Ltd 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the next 12 * paragraph) shall be included in all copies or substantial portions of the 13 * Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 * IN THE SOFTWARE. 22 */ 23 24 #ifndef V3D_CSD_H 25 #define V3D_CSD_H 26 27 #define V3D_CSD_CFG012_WG_COUNT_SHIFT 16 28 #define V3D_CSD_CFG012_WG_OFFSET_SHIFT 0 29 /* Allow this dispatch to start while the last one is still running. */ 30 #define V3D_CSD_CFG3_OVERLAP_WITH_PREV (1 << 26) 31 /* Maximum supergroup ID. 6 bits. */ 32 #define V3D_CSD_CFG3_MAX_SG_ID_SHIFT 20 33 /* Batches per supergroup minus 1. 8 bits. */ 34 #define V3D_CSD_CFG3_BATCHES_PER_SG_M1_SHIFT 12 35 /* Workgroups per supergroup, 0 means 16 */ 36 #define V3D_CSD_CFG3_WGS_PER_SG_SHIFT 8 37 #define V3D_CSD_CFG3_WG_SIZE_SHIFT 0 38 39 #define V3D_CSD_CFG5_PROPAGATE_NANS (1 << 2) 40 #define V3D_CSD_CFG5_SINGLE_SEG (1 << 1) 41 #define V3D_CSD_CFG5_THREADING (1 << 0) 42 43 #endif 44