xref: /linux/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.h (revision 220994d61cebfc04f071d69049127657c7e8191b)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023-2024 Intel Corporation
4  */
5 
6 #ifndef _XE_GT_SRIOV_PF_SERVICE_H_
7 #define _XE_GT_SRIOV_PF_SERVICE_H_
8 
9 #include <linux/errno.h>
10 #include <linux/types.h>
11 
12 struct drm_printer;
13 struct xe_gt;
14 
15 int xe_gt_sriov_pf_service_init(struct xe_gt *gt);
16 void xe_gt_sriov_pf_service_update(struct xe_gt *gt);
17 
18 int xe_gt_sriov_pf_service_print_runtime(struct xe_gt *gt, struct drm_printer *p);
19 
20 #ifdef CONFIG_PCI_IOV
21 int xe_gt_sriov_pf_service_process_request(struct xe_gt *gt, u32 origin,
22 					   const u32 *msg, u32 msg_len,
23 					   u32 *response, u32 resp_size);
24 #else
25 static inline int
xe_gt_sriov_pf_service_process_request(struct xe_gt * gt,u32 origin,const u32 * msg,u32 msg_len,u32 * response,u32 resp_size)26 xe_gt_sriov_pf_service_process_request(struct xe_gt *gt, u32 origin,
27 				       const u32 *msg, u32 msg_len,
28 				       u32 *response, u32 resp_size)
29 {
30 	return -EPROTO;
31 }
32 #endif
33 
34 #endif
35