xref: /linux/drivers/gpu/drm/xe/abi/gsc_proxy_commands_abi.h (revision ef9226cd56b718c79184a3466d32984a51cb449c)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef _ABI_GSC_PROXY_COMMANDS_ABI_H
7 #define _ABI_GSC_PROXY_COMMANDS_ABI_H
8 
9 #include <linux/types.h>
10 
11 /* Heci client ID for proxy commands */
12 #define HECI_MEADDRESS_PROXY 10
13 
14 /* FW-defined proxy header */
15 struct xe_gsc_proxy_header {
16 	/*
17 	 * hdr:
18 	 * Bits 0-7: type of the proxy message (see enum xe_gsc_proxy_type)
19 	 * Bits 8-15: rsvd
20 	 * Bits 16-31: length in bytes of the payload following the proxy header
21 	 */
22 	u32 hdr;
23 #define GSC_PROXY_TYPE		 GENMASK(7, 0)
24 #define GSC_PROXY_PAYLOAD_LENGTH GENMASK(31, 16)
25 
26 	u32 source;		/* Source of the Proxy message */
27 	u32 destination;	/* Destination of the Proxy message */
28 #define GSC_PROXY_ADDRESSING_KMD  0x10000
29 #define GSC_PROXY_ADDRESSING_GSC  0x20000
30 #define GSC_PROXY_ADDRESSING_CSME 0x30000
31 
32 	u32 status;		/* Command status */
33 } __packed;
34 
35 /* FW-defined proxy types */
36 enum xe_gsc_proxy_type {
37 	GSC_PROXY_MSG_TYPE_PROXY_INVALID = 0,
38 	GSC_PROXY_MSG_TYPE_PROXY_QUERY = 1,
39 	GSC_PROXY_MSG_TYPE_PROXY_PAYLOAD = 2,
40 	GSC_PROXY_MSG_TYPE_PROXY_END = 3,
41 	GSC_PROXY_MSG_TYPE_PROXY_NOTIFICATION = 4,
42 };
43 
44 #endif
45