xref: /linux/drivers/gpu/drm/xe/tests/xe_pci_test.h (revision 7bdbfb4e36e34eb788e44f27666bf0a2b3b90803)
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 
13 struct xe_device;
14 struct xe_graphics_desc;
15 struct xe_media_desc;
16 
17 typedef int (*xe_device_fn)(struct xe_device *);
18 typedef void (*xe_graphics_fn)(const struct xe_graphics_desc *);
19 typedef void (*xe_media_fn)(const struct xe_media_desc *);
20 
21 int xe_call_for_each_device(xe_device_fn xe_fn);
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_platform platform;
27 	enum xe_subplatform subplatform;
28 	u32 graphics_verx100;
29 	u32 media_verx100;
30 	u32 graphics_step;
31 	u32 media_step;
32 };
33 
34 int xe_pci_fake_device_init(struct xe_device *xe);
35 
36 #endif
37