1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright(c) 2022, Intel Corporation. All rights reserved. 4 */ 5 6 #ifndef __INTEL_PXP_GSCCS_H__ 7 #define __INTEL_PXP_GSCCS_H__ 8 9 #include <linux/types.h> 10 11 struct intel_pxp; 12 13 #define GSC_REPLY_LATENCY_MS 210 14 /* 15 * Max FW response time is 200ms, to which we add 10ms to account for overhead 16 * such as request preparation, GuC submission to hw and pipeline completion times. 17 */ 18 #define GSC_PENDING_RETRY_MAXCOUNT 40 19 #define GSC_PENDING_RETRY_PAUSE_MS 50 20 #define GSCFW_MAX_ROUND_TRIP_LATENCY_MS (GSC_PENDING_RETRY_MAXCOUNT * GSC_PENDING_RETRY_PAUSE_MS) 21 22 #ifdef CONFIG_DRM_I915_PXP 23 void intel_pxp_gsccs_fini(struct intel_pxp *pxp); 24 int intel_pxp_gsccs_init(struct intel_pxp *pxp); 25 26 int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, int arb_session_id); 27 void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id); 28 bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp); 29 30 #else intel_pxp_gsccs_fini(struct intel_pxp * pxp)31static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp) 32 { 33 } 34 intel_pxp_gsccs_init(struct intel_pxp * pxp)35static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp) 36 { 37 return 0; 38 } 39 intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp * pxp)40static inline bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp) 41 { 42 return false; 43 } 44 45 #endif 46 47 #endif /*__INTEL_PXP_GSCCS_H__ */ 48