1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2020 Intel Corporation
6 #ifndef _I915_PXP_TEE_INTERFACE_H_
7 #define _I915_PXP_TEE_INTERFACE_H_
9 #include <linux/mutex.h>
10 #include <linux/device.h>
14 * struct i915_pxp_component_ops - ops for PXP services.
15 * @owner: Module providing the ops
16 * @send: sends data to PXP
17 * @receive: receives data from PXP
19 struct i915_pxp_component_ops {
21 * @owner: owner of the module provding the ops
25 int (*send)(struct device *dev, const void *message, size_t size,
26 unsigned long timeout_ms);
27 int (*recv)(struct device *dev, void *buffer, size_t size,
28 unsigned long timeout_ms);
29 ssize_t (*gsc_command)(struct device *dev, u8 client_id, u32 fence_id,
30 struct scatterlist *sg_in, size_t total_in_len,
31 struct scatterlist *sg_out);
36 * struct i915_pxp_component - Used for communication between i915 and TEE
37 * drivers for the PXP services
38 * @tee_dev: device that provide the PXP service from TEE Bus.
39 * @pxp_ops: Ops implemented by TEE driver, used by i915 driver.
41 struct i915_pxp_component {
42 struct device *tee_dev;
43 const struct i915_pxp_component_ops *ops;
45 /* To protect the above members. */
49 #endif /* _I915_TEE_PXP_INTERFACE_H_ */