xref: /linux/drivers/gpu/drm/xe/xe_gt_sriov_pf_control.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023-2024 Intel Corporation
4  */
5 
6 #ifndef _XE_GT_SRIOV_PF_CONTROL_H_
7 #define _XE_GT_SRIOV_PF_CONTROL_H_
8 
9 #include <linux/errno.h>
10 #include <linux/types.h>
11 
12 struct xe_gt;
13 
14 int xe_gt_sriov_pf_control_init(struct xe_gt *gt);
15 void xe_gt_sriov_pf_control_restart(struct xe_gt *gt);
16 
17 int xe_gt_sriov_pf_control_pause_vf(struct xe_gt *gt, unsigned int vfid);
18 int xe_gt_sriov_pf_control_resume_vf(struct xe_gt *gt, unsigned int vfid);
19 int xe_gt_sriov_pf_control_stop_vf(struct xe_gt *gt, unsigned int vfid);
20 int xe_gt_sriov_pf_control_trigger_flr(struct xe_gt *gt, unsigned int vfid);
21 
22 #ifdef CONFIG_PCI_IOV
23 int xe_gt_sriov_pf_control_process_guc2pf(struct xe_gt *gt, const u32 *msg, u32 len);
24 #else
25 static inline int xe_gt_sriov_pf_control_process_guc2pf(struct xe_gt *gt, const u32 *msg, u32 len)
26 {
27 	return -EPROTO;
28 }
29 #endif
30 
31 #endif
32