| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2016 MediaTek Inc. |
|---|
| 3 | 4 | * Author: PC Chen <pc.chen@mediatek.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | |
|---|
| 15 | 7 | #ifndef _VDEC_VPU_IF_H_ |
|---|
| 16 | 8 | #define _VDEC_VPU_IF_H_ |
|---|
| 17 | 9 | |
|---|
| 18 | | -#include "mtk_vpu.h" |
|---|
| 10 | +#include "mtk_vcodec_fw.h" |
|---|
| 11 | + |
|---|
| 12 | +struct mtk_vcodec_ctx; |
|---|
| 19 | 13 | |
|---|
| 20 | 14 | /** |
|---|
| 21 | 15 | * struct vdec_vpu_inst - VPU instance for video codec |
|---|
| 22 | | - * @ipi_id : ipi id for each decoder |
|---|
| 16 | + * @id : ipi msg id for each decoder |
|---|
| 23 | 17 | * @vsi : driver structure allocated by VPU side and shared to AP side |
|---|
| 24 | 18 | * for control and info share |
|---|
| 25 | 19 | * @failure : VPU execution result status, 0: success, others: fail |
|---|
| .. | .. |
|---|
| 31 | 25 | * @handler : ipi handler for each decoder |
|---|
| 32 | 26 | */ |
|---|
| 33 | 27 | struct vdec_vpu_inst { |
|---|
| 34 | | - enum ipi_id id; |
|---|
| 28 | + int id; |
|---|
| 35 | 29 | void *vsi; |
|---|
| 36 | 30 | int32_t failure; |
|---|
| 37 | 31 | uint32_t inst_addr; |
|---|
| 38 | 32 | unsigned int signaled; |
|---|
| 39 | 33 | struct mtk_vcodec_ctx *ctx; |
|---|
| 40 | | - struct platform_device *dev; |
|---|
| 41 | 34 | wait_queue_head_t wq; |
|---|
| 42 | | - ipi_handler_t handler; |
|---|
| 35 | + mtk_vcodec_ipi_handler handler; |
|---|
| 43 | 36 | }; |
|---|
| 44 | 37 | |
|---|
| 45 | 38 | /** |
|---|
| .. | .. |
|---|
| 62 | 55 | /** |
|---|
| 63 | 56 | * vpu_dec_end - end decoding, basically the function will be invoked once |
|---|
| 64 | 57 | * when HW decoding done interrupt received successfully. The |
|---|
| 65 | | - * decoder in VPU will continute to do referene frame management |
|---|
| 58 | + * decoder in VPU will continue to do reference frame management |
|---|
| 66 | 59 | * and check if there is a new decoded frame available to display. |
|---|
| 67 | 60 | * |
|---|
| 68 | 61 | * @vpu : instance for vdec_vpu_inst |
|---|
| .. | .. |
|---|
| 83 | 76 | * @vpu: instance for vdec_vpu_inst |
|---|
| 84 | 77 | */ |
|---|
| 85 | 78 | int vpu_dec_reset(struct vdec_vpu_inst *vpu); |
|---|
| 86 | | - |
|---|
| 87 | | -/** |
|---|
| 88 | | - * vpu_dec_ipi_handler - Handler for VPU ipi message. |
|---|
| 89 | | - * |
|---|
| 90 | | - * @data: ipi message |
|---|
| 91 | | - * @len : length of ipi message |
|---|
| 92 | | - * @priv: callback private data which is passed by decoder when register. |
|---|
| 93 | | - */ |
|---|
| 94 | | -void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv); |
|---|
| 95 | 79 | |
|---|
| 96 | 80 | #endif |
|---|