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_rebase(struct xe_device *xe); 22 void xe_sriov_vf_ccs_print(struct xe_device *xe, struct drm_printer *p); 23 24 static inline bool xe_sriov_vf_ccs_ready(struct xe_device *xe) 25 { 26 xe_assert(xe, IS_SRIOV_VF(xe)); 27 return xe->sriov.vf.ccs.initialized; 28 } 29 30 #define IS_VF_CCS_READY(xe) ({ \ 31 struct xe_device *xe__ = (xe); \ 32 IS_SRIOV_VF(xe__) && xe_sriov_vf_ccs_ready(xe__); \ 33 }) 34 35 #endif 36