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.
16 struct i915_pxp_component_ops {
18 * @owner: Module providing the ops.
23 * @send: Send a PXP message.
25 int (*send)(struct device *dev, const void *message, size_t size,
26 unsigned long timeout_ms);
28 * @recv: Receive a PXP message.
30 int (*recv)(struct device *dev, void *buffer, size_t size,
31 unsigned long timeout_ms);
33 * @gsc_command: Send a GSC command.
35 ssize_t (*gsc_command)(struct device *dev, u8 client_id, u32 fence_id,
36 struct scatterlist *sg_in, size_t total_in_len,
37 struct scatterlist *sg_out);
42 * struct i915_pxp_component - Used for communication between i915 and TEE
43 * drivers for the PXP services
45 struct i915_pxp_component {
47 * @tee_dev: device that provide the PXP service from TEE Bus.
49 struct device *tee_dev;
52 * @ops: Ops implemented by TEE driver, used by i915 driver.
54 const struct i915_pxp_component_ops *ops;
57 * @mutex: To protect the above members.
62 #endif /* _I915_TEE_PXP_INTERFACE_H_ */