xref: /linux/drivers/gpu/drm/xe/tests/xe_pci_test.h (revision 8e1bb4a41aa78d6105e59186af3dcd545fc66e70)
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 int xe_call_for_each_device(xe_device_fn xe_fn);
23 void xe_call_for_each_graphics_ip(xe_graphics_fn xe_fn);
24 void xe_call_for_each_media_ip(xe_media_fn xe_fn);
25 
26 struct xe_pci_fake_data {
27 	enum xe_sriov_mode sriov_mode;
28 	enum xe_platform platform;
29 	enum xe_subplatform subplatform;
30 	u32 graphics_verx100;
31 	u32 media_verx100;
32 	u32 graphics_step;
33 	u32 media_step;
34 };
35 
36 int xe_pci_fake_device_init(struct xe_device *xe);
37 
38 #endif
39