root/drivers/media/platform/mtk-vcodec/venc_vpu_if.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /*
   3  * Copyright (c) 2016 MediaTek Inc.
   4  * Author: PoChun Lin <pochun.lin@mediatek.com>
   5  */
   6 
   7 #ifndef _VENC_VPU_IF_H_
   8 #define _VENC_VPU_IF_H_
   9 
  10 #include "mtk_vpu.h"
  11 #include "venc_drv_if.h"
  12 
  13 /*
  14  * struct venc_vpu_inst - encoder VPU driver instance
  15  * @wq_hd: wait queue used for vpu cmd trigger then wait vpu interrupt done
  16  * @signaled: flag used for checking vpu interrupt done
  17  * @failure: flag to show vpu cmd succeeds or not
  18  * @state: enum venc_ipi_msg_enc_state
  19  * @bs_size: bitstream size for skip frame case usage
  20  * @is_key_frm: key frame flag
  21  * @inst_addr: VPU instance addr
  22  * @vsi: driver structure allocated by VPU side and shared to AP side for
  23  *       control and info share
  24  * @id: the id of inter-processor interrupt
  25  * @ctx: context for v4l2 layer integration
  26  * @dev: device for v4l2 layer integration
  27  */
  28 struct venc_vpu_inst {
  29         wait_queue_head_t wq_hd;
  30         int signaled;
  31         int failure;
  32         int state;
  33         int bs_size;
  34         int is_key_frm;
  35         unsigned int inst_addr;
  36         void *vsi;
  37         enum ipi_id id;
  38         struct mtk_vcodec_ctx *ctx;
  39         struct platform_device *dev;
  40 };
  41 
  42 int vpu_enc_init(struct venc_vpu_inst *vpu);
  43 int vpu_enc_set_param(struct venc_vpu_inst *vpu,
  44                       enum venc_set_param_type id,
  45                       struct venc_enc_param *param);
  46 int vpu_enc_encode(struct venc_vpu_inst *vpu, unsigned int bs_mode,
  47                    struct venc_frm_buf *frm_buf,
  48                    struct mtk_vcodec_mem *bs_buf,
  49                    unsigned int *bs_size);
  50 int vpu_enc_deinit(struct venc_vpu_inst *vpu);
  51 
  52 #endif

/* [<][>][^][v][top][bottom][index][help] */