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>
13 struct drm_i915_gem_object;
15 #ifdef CONFIG_DRM_I915_PXP
16 struct intel_gt *pxp_to_gt(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 void intel_pxp_init(struct intel_pxp *pxp);
21 void intel_pxp_fini(struct intel_pxp *pxp);
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);
28 int intel_pxp_start(struct intel_pxp *pxp);
30 int intel_pxp_key_check(struct intel_pxp *pxp,
31 struct drm_i915_gem_object *obj,
34 void intel_pxp_invalidate(struct intel_pxp *pxp);
36 static inline void intel_pxp_init(struct intel_pxp *pxp)
40 static inline void intel_pxp_fini(struct intel_pxp *pxp)
44 static inline int intel_pxp_start(struct intel_pxp *pxp)
49 static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
54 static inline bool intel_pxp_is_active(const struct intel_pxp *pxp)
59 static inline int intel_pxp_key_check(struct intel_pxp *pxp,
60 struct drm_i915_gem_object *obj,
67 #endif /* __INTEL_PXP_H__ */