2021-09-24 19:14:39 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Copyright(c) 2020, Intel Corporation. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INTEL_PXP_H__
|
|
|
|
#define __INTEL_PXP_H__
|
|
|
|
|
|
|
|
#include "intel_pxp_types.h"
|
|
|
|
|
2021-09-24 19:14:45 +00:00
|
|
|
struct drm_i915_gem_object;
|
|
|
|
|
2021-09-24 19:14:39 +00:00
|
|
|
static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
|
|
|
|
{
|
|
|
|
return pxp->ce;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef CONFIG_DRM_I915_PXP
|
|
|
|
struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp);
|
2021-09-24 19:14:42 +00:00
|
|
|
bool intel_pxp_is_active(const struct intel_pxp *pxp);
|
|
|
|
|
2021-09-24 19:14:39 +00:00
|
|
|
void intel_pxp_init(struct intel_pxp *pxp);
|
|
|
|
void intel_pxp_fini(struct intel_pxp *pxp);
|
2021-09-24 19:14:41 +00:00
|
|
|
|
|
|
|
void intel_pxp_init_hw(struct intel_pxp *pxp);
|
|
|
|
void intel_pxp_fini_hw(struct intel_pxp *pxp);
|
2021-09-24 19:14:44 +00:00
|
|
|
|
|
|
|
void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp);
|
2021-09-24 19:14:46 +00:00
|
|
|
|
|
|
|
int intel_pxp_start(struct intel_pxp *pxp);
|
2021-09-24 19:14:45 +00:00
|
|
|
|
2021-09-24 19:14:48 +00:00
|
|
|
int intel_pxp_key_check(struct intel_pxp *pxp,
|
|
|
|
struct drm_i915_gem_object *obj,
|
|
|
|
bool assign);
|
2021-09-24 19:14:45 +00:00
|
|
|
|
|
|
|
void intel_pxp_invalidate(struct intel_pxp *pxp);
|
2021-09-24 19:14:39 +00:00
|
|
|
#else
|
|
|
|
static inline void intel_pxp_init(struct intel_pxp *pxp)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void intel_pxp_fini(struct intel_pxp *pxp)
|
|
|
|
{
|
|
|
|
}
|
2021-09-24 19:14:44 +00:00
|
|
|
|
2021-09-24 19:14:46 +00:00
|
|
|
static inline int intel_pxp_start(struct intel_pxp *pxp)
|
2021-09-24 19:14:44 +00:00
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
2021-09-24 19:14:45 +00:00
|
|
|
|
2021-09-24 19:14:46 +00:00
|
|
|
static inline bool intel_pxp_is_active(const struct intel_pxp *pxp)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-09-24 19:14:45 +00:00
|
|
|
static inline int intel_pxp_key_check(struct intel_pxp *pxp,
|
2021-09-24 19:14:48 +00:00
|
|
|
struct drm_i915_gem_object *obj,
|
|
|
|
bool assign)
|
2021-09-24 19:14:45 +00:00
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
2021-09-24 19:14:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __INTEL_PXP_H__ */
|