xref: /linux/drivers/gpu/drm/xe/tests/xe_pci_test.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1 /* SPDX-License-Identifier: GPL-2.0 AND MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef _XE_PCI_TEST_H_
7 #define _XE_PCI_TEST_H_
8 
9 #include <linux/types.h>
10 
11 #include "xe_platform_types.h"
12 #include "xe_sriov_types.h"
13 
14 struct xe_device;
15 struct xe_graphics_desc;
16 struct xe_media_desc;
17 
18 typedef int (*xe_device_fn)(struct xe_device *);
19 typedef void (*xe_graphics_fn)(const struct xe_graphics_desc *);
20 typedef void (*xe_media_fn)(const struct xe_media_desc *);
21 
22 void xe_call_for_each_graphics_ip(xe_graphics_fn xe_fn);
23 void xe_call_for_each_media_ip(xe_media_fn xe_fn);
24 
25 struct xe_pci_fake_data {
26 	enum xe_sriov_mode sriov_mode;
27 	enum xe_platform platform;
28 	enum xe_subplatform subplatform;
29 	u32 graphics_verx100;
30 	u32 media_verx100;
31 	u32 graphics_step;
32 	u32 media_step;
33 };
34 
35 int xe_pci_fake_device_init(struct xe_device *xe);
36 
37 const void *xe_pci_live_device_gen_param(const void *prev, char *desc);
38 
39 #endif
40