1 /* SPDX-License-Identifier: GPL-2.0
3 * Copyright 2016-2018 HabanaLabs, Ltd.
11 #include <linux/types.h>
23 #define HL_BD_SIZE sizeof(struct hl_bd)
28 * BD_CTL_REPEAT_VALID tells the CP whether the repeat field in the BD CTL is
29 * valid. 1 means the repeat field is valid, 0 means not-valid,
32 #define BD_CTL_REPEAT_VALID_SHIFT 24
33 #define BD_CTL_REPEAT_VALID_MASK 0x01000000
35 #define BD_CTL_SHADOW_INDEX_SHIFT 0
36 #define BD_CTL_SHADOW_INDEX_MASK 0x00000FFF
42 #define BD_CTL_COMP_OFFSET_SHIFT 16
43 #define BD_CTL_COMP_OFFSET_MASK 0x00FF0000
45 #define BD_CTL_COMP_DATA_SHIFT 0
46 #define BD_CTL_COMP_DATA_MASK 0x0000FFFF
56 #define HL_CQ_ENTRY_SIZE sizeof(struct hl_cq_entry)
58 #define CQ_ENTRY_READY_SHIFT 31
59 #define CQ_ENTRY_READY_MASK 0x80000000
61 #define CQ_ENTRY_SHADOW_INDEX_VALID_SHIFT 30
62 #define CQ_ENTRY_SHADOW_INDEX_VALID_MASK 0x40000000
64 #define CQ_ENTRY_SHADOW_INDEX_SHIFT BD_CTL_SHADOW_INDEX_SHIFT
65 #define CQ_ENTRY_SHADOW_INDEX_MASK BD_CTL_SHADOW_INDEX_MASK
68 #endif /* QMAN_IF_H */