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 int (*recv)(struct device *dev, void *buffer, size_t size);
27 ssize_t (*gsc_command)(struct device *dev, u8 client_id, u32 fence_id,
28 struct scatterlist *sg_in, size_t total_in_len,
29 struct scatterlist *sg_out);
34 * struct i915_pxp_component - Used for communication between i915 and TEE
35 * drivers for the PXP services
36 * @tee_dev: device that provide the PXP service from TEE Bus.
37 * @pxp_ops: Ops implemented by TEE driver, used by i915 driver.
39 struct i915_pxp_component {
40 struct device *tee_dev;
41 const struct i915_pxp_component_ops *ops;
43 /* To protect the above members. */
47 #endif /* _I915_TEE_PXP_INTERFACE_H_ */