1 /* SPDX-License-Identifier: MIT */
3 * Copyright(c) 2022, Intel Corporation. All rights reserved.
6 #ifndef __INTEL_PXP_GSCCS_H__
7 #define __INTEL_PXP_GSCCS_H__
9 #include <linux/types.h>
13 #define GSC_REPLY_LATENCY_MS 210
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.
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)
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);
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);
30 static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp)
34 static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp)
41 bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
43 #endif /*__INTEL_PXP_GSCCS_H__ */