1 /* SPDX-License-Identifier: MIT */
3 * Copyright(c) 2020, Intel Corporation. All rights reserved.
6 #ifndef __INTEL_PXP_H__
7 #define __INTEL_PXP_H__
9 #include <linux/errno.h>
10 #include <linux/types.h>
12 struct drm_gem_object;
13 struct drm_i915_private;
16 bool intel_pxp_is_supported(const struct intel_pxp *pxp);
17 bool intel_pxp_is_enabled(const struct intel_pxp *pxp);
18 bool intel_pxp_is_active(const struct intel_pxp *pxp);
20 int intel_pxp_init(struct drm_i915_private *i915);
21 void intel_pxp_fini(struct drm_i915_private *i915);
23 void intel_pxp_init_hw(struct intel_pxp *pxp);
24 void intel_pxp_fini_hw(struct intel_pxp *pxp);
26 void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp);
27 void intel_pxp_tee_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
29 int intel_pxp_get_readiness_status(struct intel_pxp *pxp, int timeout_ms);
30 int intel_pxp_get_backend_timeout_ms(struct intel_pxp *pxp);
31 int intel_pxp_start(struct intel_pxp *pxp);
32 void intel_pxp_end(struct intel_pxp *pxp);
34 int intel_pxp_key_check(struct intel_pxp *pxp,
35 struct drm_gem_object *obj,
38 void intel_pxp_invalidate(struct intel_pxp *pxp);
40 #endif /* __INTEL_PXP_H__ */