summaryrefslogtreecommitdiff
path: root/drivers/media/platform/sti/hva/hva-mem.h
diff options
context:
space:
mode:
authorJean-Christophe Trotin <jean-christophe.trotin@st.com>2016-09-05 11:06:29 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-09 10:32:34 -0300
commit57b2c0628b6042b7cfad387fe54951ddf7185fd2 (patch)
tree472bb482e9a21e249439573dc7f28a67ff0b1cff /drivers/media/platform/sti/hva/hva-mem.h
parent9ef0b3f3f88d2a177e3403dd57e373d97f1c389c (diff)
[media] st-hva: multi-format video encoder V4L2 driver
This patch adds V4L2 HVA (Hardware Video Accelerator) video encoder driver for STMicroelectronics SoC. It uses the V4L2 mem2mem framework. This patch only contains the core parts of the driver: - the V4L2 interface with the userland (hva-v4l2.c) - the hardware services (hva-hw.c) - the memory management utilities (hva-mem.c) This patch doesn't include the support of specific codec (e.g. H.264) video encoding: this support is part of subsequent patches. Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/sti/hva/hva-mem.h')
-rw-r--r--drivers/media/platform/sti/hva/hva-mem.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/media/platform/sti/hva/hva-mem.h b/drivers/media/platform/sti/hva/hva-mem.h
new file mode 100644
index 000000000000..a95c728a45e6
--- /dev/null
+++ b/drivers/media/platform/sti/hva/hva-mem.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) STMicroelectronics SA 2015
+ * Authors: Yannick Fertre <yannick.fertre@st.com>
+ * Hugues Fruchet <hugues.fruchet@st.com>
+ * License terms: GNU General Public License (GPL), version 2
+ */
+
+#ifndef HVA_MEM_H
+#define HVA_MEM_H
+
+/**
+ * struct hva_buffer - hva buffer
+ *
+ * @name: name of requester
+ * @paddr: physical address (for hardware)
+ * @vaddr: virtual address (kernel can read/write)
+ * @size: size of buffer
+ */
+struct hva_buffer {
+ const char *name;
+ dma_addr_t paddr;
+ void *vaddr;
+ u32 size;
+};
+
+int hva_mem_alloc(struct hva_ctx *ctx,
+ __u32 size,
+ const char *name,
+ struct hva_buffer **buf);
+
+void hva_mem_free(struct hva_ctx *ctx,
+ struct hva_buffer *buf);
+
+#endif /* HVA_MEM_H */