perf tools: Don't clone maps from parent when synthesizing forks
[linux/fpc-iii.git] / drivers / media / platform / mtk-vcodec / venc_vpu_if.h
blob215d1e01362e6484534fa937411a43904a14b144
1 /*
2 * Copyright (c) 2016 MediaTek Inc.
3 * Author: PoChun Lin <pochun.lin@mediatek.com>
5 * This program is free software; you can redistribute it and/or
6 * modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef _VENC_VPU_IF_H_
17 #define _VENC_VPU_IF_H_
19 #include "mtk_vpu.h"
20 #include "venc_drv_if.h"
23 * struct venc_vpu_inst - encoder VPU driver instance
24 * @wq_hd: wait queue used for vpu cmd trigger then wait vpu interrupt done
25 * @signaled: flag used for checking vpu interrupt done
26 * @failure: flag to show vpu cmd succeeds or not
27 * @state: enum venc_ipi_msg_enc_state
28 * @bs_size: bitstream size for skip frame case usage
29 * @is_key_frm: key frame flag
30 * @inst_addr: VPU instance addr
31 * @vsi: driver structure allocated by VPU side and shared to AP side for
32 * control and info share
33 * @id: the id of inter-processor interrupt
34 * @ctx: context for v4l2 layer integration
35 * @dev: device for v4l2 layer integration
37 struct venc_vpu_inst {
38 wait_queue_head_t wq_hd;
39 int signaled;
40 int failure;
41 int state;
42 int bs_size;
43 int is_key_frm;
44 unsigned int inst_addr;
45 void *vsi;
46 enum ipi_id id;
47 struct mtk_vcodec_ctx *ctx;
48 struct platform_device *dev;
51 int vpu_enc_init(struct venc_vpu_inst *vpu);
52 int vpu_enc_set_param(struct venc_vpu_inst *vpu,
53 enum venc_set_param_type id,
54 struct venc_enc_param *param);
55 int vpu_enc_encode(struct venc_vpu_inst *vpu, unsigned int bs_mode,
56 struct venc_frm_buf *frm_buf,
57 struct mtk_vcodec_mem *bs_buf,
58 unsigned int *bs_size);
59 int vpu_enc_deinit(struct venc_vpu_inst *vpu);
61 #endif