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