xref: /linux/drivers/gpu/drm/xe/xe_configfs.h (revision e7e86d7697c6ed1dbbde18d7185c35b6967945ed)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2025 Intel Corporation
4  */
5 #ifndef _XE_CONFIGFS_H_
6 #define _XE_CONFIGFS_H_
7 
8 #include <linux/limits.h>
9 #include <linux/types.h>
10 
11 struct pci_dev;
12 
13 #if IS_ENABLED(CONFIG_CONFIGFS_FS)
14 int xe_configfs_init(void);
15 void xe_configfs_exit(void);
16 bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
17 void xe_configfs_clear_survivability_mode(struct pci_dev *pdev);
18 u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev);
19 #else
20 static inline int xe_configfs_init(void) { return 0; }
21 static inline void xe_configfs_exit(void) { }
22 static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; }
23 static inline void xe_configfs_clear_survivability_mode(struct pci_dev *pdev) { }
24 static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
25 #endif
26 
27 #endif
28