summaryrefslogtreecommitdiff
path: root/drivers/tee/tee_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tee/tee_private.h')
-rw-r--r--drivers/tee/tee_private.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/tee/tee_private.h b/drivers/tee/tee_private.h
index 9bc50605227c..6bde688bfcb1 100644
--- a/drivers/tee/tee_private.h
+++ b/drivers/tee/tee_private.h
@@ -8,20 +8,28 @@
#include <linux/cdev.h>
#include <linux/completion.h>
#include <linux/device.h>
+#include <linux/dma-buf.h>
#include <linux/kref.h>
#include <linux/mutex.h>
#include <linux/types.h>
-int tee_shm_get_fd(struct tee_shm *shm);
-
-bool tee_device_get(struct tee_device *teedev);
-void tee_device_put(struct tee_device *teedev);
+/* extra references appended to shm object for registered shared memory */
+struct tee_shm_dmabuf_ref {
+ struct tee_shm shm;
+ size_t offset;
+ struct dma_buf *dmabuf;
+ struct tee_shm *parent_shm;
+};
-void teedev_ctx_get(struct tee_context *ctx);
-void teedev_ctx_put(struct tee_context *ctx);
+int tee_shm_get_fd(struct tee_shm *shm);
struct tee_shm *tee_shm_alloc_user_buf(struct tee_context *ctx, size_t size);
struct tee_shm *tee_shm_register_user_buf(struct tee_context *ctx,
unsigned long addr, size_t length);
+int tee_heap_update_from_dma_buf(struct tee_device *teedev,
+ struct dma_buf *dmabuf, size_t *offset,
+ struct tee_shm *shm,
+ struct tee_shm **parent_shm);
+
#endif /*TEE_PRIVATE_H*/