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 12 struct intel_pxp; 13 struct drm_i915_gem_object; 14 15 struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp); 16 bool intel_pxp_is_enabled(const struct intel_pxp *pxp); 17 bool intel_pxp_is_active(const struct intel_pxp *pxp); 18 19 void intel_pxp_init(struct intel_pxp *pxp); 20 void intel_pxp_fini(struct intel_pxp *pxp); 21 22 void intel_pxp_init_hw(struct intel_pxp *pxp); 23 void intel_pxp_fini_hw(struct intel_pxp *pxp); 24 25 void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp); 26 27 int intel_pxp_start(struct intel_pxp *pxp); 28 29 int intel_pxp_key_check(struct intel_pxp *pxp, 30 struct drm_i915_gem_object *obj, 31 bool assign); 32 33 void intel_pxp_invalidate(struct intel_pxp *pxp); 34 35 #endif /* __INTEL_PXP_H__ */ 36