1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2025 Intel Corporation 4 */ 5 6 #ifndef _XE_SRIOV_VF_CCS_H_ 7 #define _XE_SRIOV_VF_CCS_H_ 8 9 #include "xe_device_types.h" 10 #include "xe_sriov.h" 11 #include "xe_sriov_vf_ccs_types.h" 12 13 struct drm_printer; 14 struct xe_device; 15 struct xe_bo; 16 17 int xe_sriov_vf_ccs_init(struct xe_device *xe); 18 int xe_sriov_vf_ccs_attach_bo(struct xe_bo *bo); 19 int xe_sriov_vf_ccs_detach_bo(struct xe_bo *bo); 20 int xe_sriov_vf_ccs_register_context(struct xe_device *xe); 21 void xe_sriov_vf_ccs_print(struct xe_device *xe, struct drm_printer *p); 22 23 static inline bool xe_sriov_vf_ccs_ready(struct xe_device *xe) 24 { 25 xe_assert(xe, IS_SRIOV_VF(xe)); 26 return xe->sriov.vf.ccs.initialized; 27 } 28 29 #define IS_VF_CCS_READY(xe) ({ \ 30 struct xe_device *xe__ = (xe); \ 31 IS_SRIOV_VF(xe__) && xe_sriov_vf_ccs_ready(xe__); \ 32 }) 33 34 #endif 35