mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 03:42:52 +00:00
57b2c0628b
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>
35 lines
741 B
C
35 lines
741 B
C
/*
|
|
* 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 */
|