FILE
xe_configfs.h
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/xe/xe_configfs.h
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#include <xe_hw_engine_types.h> 12 13struct pci_dev; 14 15#if IS_ENABLED(CONFIG_CONFIGFS_FS) 16int xe_configfs_init(void); 17void xe_configfs_exit(void); 18void xe_configfs_check_device(struct pci_dev *pdev); 19bool xe_configfs_get_survivability_mode(struct pci_dev *pdev); 20bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev); 21bool xe_configfs_media_gt_allowed(struct pci_dev *pdev); 22u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev); 23bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev); 24u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev, 25 enum xe_engine_class class, 26 const u32 **cs); 27u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, 28 enum xe_engine_class class, 29 const u32 **cs); 30#ifdef CONFIG_PCI_IOV 31unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev); 32#endif 33#else 34static inline int xe_configfs_init(void) { return 0; } 35static inline void xe_configfs_exit(void) { } 36static inline void xe_configfs_check_device(struct pci_dev *pdev) { } 37static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; } 38static inline bool xe_configfs_primary_gt_allowed(struct pci_dev *pdev) { return true; } 39static inline bool xe_configfs_media_gt_allowed(struct pci_dev *pdev) { return true; } 40static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; } 41static inline bool xe_configfs_get_psmi_enabled(struct pci_dev *pdev) { return false; } 42static inline u32 xe_configfs_get_ctx_restore_mid_bb(struct pci_dev *pdev, 43 enum xe_engine_class class, 44 const u32 **cs) { return 0; } 45static inline u32 xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev, 46 enum xe_engine_class class, 47 const u32 **cs) { return 0; } 48static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev) { return UINT_MAX; } 49#endif 50 51#endif
~/
Read-only file preview.