1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2017 The Linux Foundation. All rights reserved. */
7 struct a6xx_hfi_queue_table_header {
9 u32 size; /* Size of the queue table in dwords */
10 u32 qhdr0_offset; /* Offset of the first queue header */
11 u32 qhdr_size; /* Size of the queue headers */
12 u32 num_queues; /* Number of total queues */
13 u32 active_queues; /* Number of active queues */
16 struct a6xx_hfi_queue_header {
31 struct a6xx_hfi_queue {
32 struct a6xx_hfi_queue_header *header;
38 /* This is the outgoing queue to the GMU */
39 #define HFI_COMMAND_QUEUE 0
41 /* THis is the incoming response queue from the GMU */
42 #define HFI_RESPONSE_QUEUE 1
44 #define HFI_HEADER_ID(msg) ((msg) & 0xff)
45 #define HFI_HEADER_SIZE(msg) (((msg) >> 8) & 0xff)
46 #define HFI_HEADER_SEQNUM(msg) (((msg) >> 20) & 0xfff)
48 /* FIXME: Do we need this or can we use ARRAY_SIZE? */
49 #define HFI_RESPONSE_PAYLOAD_SIZE 16
51 /* HFI message types */
56 #define HFI_F2H_MSG_ACK 126
58 struct a6xx_hfi_msg_response {
62 u32 payload[HFI_RESPONSE_PAYLOAD_SIZE];
65 #define HFI_F2H_MSG_ERROR 100
67 struct a6xx_hfi_msg_error {
73 #define HFI_H2F_MSG_INIT 0
75 struct a6xx_hfi_msg_gmu_init_cmd {
83 #define HFI_H2F_MSG_FW_VERSION 1
85 struct a6xx_hfi_msg_fw_version {
87 u32 supported_version;
90 #define HFI_H2F_MSG_PERF_TABLE 4
97 struct a6xx_hfi_msg_perf_table {
102 struct perf_level gx_votes[16];
103 struct perf_level cx_votes[4];
106 #define HFI_H2F_MSG_BW_TABLE 3
108 struct a6xx_hfi_msg_bw_table {
113 u32 cnoc_wait_bitmask;
114 u32 ddr_wait_bitmask;
115 u32 cnoc_cmds_addrs[6];
116 u32 cnoc_cmds_data[2][6];
117 u32 ddr_cmds_addrs[8];
118 u32 ddr_cmds_data[16][8];
121 #define HFI_H2F_MSG_TEST 5
123 struct a6xx_hfi_msg_test {