hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/platform/mtk-vcodec/vdec_vpu_if.h
....@@ -1,25 +1,19 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Copyright (c) 2016 MediaTek Inc.
34 * 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.
135 */
146
157 #ifndef _VDEC_VPU_IF_H_
168 #define _VDEC_VPU_IF_H_
179
18
-#include "mtk_vpu.h"
10
+#include "mtk_vcodec_fw.h"
11
+
12
+struct mtk_vcodec_ctx;
1913
2014 /**
2115 * 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
2317 * @vsi : driver structure allocated by VPU side and shared to AP side
2418 * for control and info share
2519 * @failure : VPU execution result status, 0: success, others: fail
....@@ -31,15 +25,14 @@
3125 * @handler : ipi handler for each decoder
3226 */
3327 struct vdec_vpu_inst {
34
- enum ipi_id id;
28
+ int id;
3529 void *vsi;
3630 int32_t failure;
3731 uint32_t inst_addr;
3832 unsigned int signaled;
3933 struct mtk_vcodec_ctx *ctx;
40
- struct platform_device *dev;
4134 wait_queue_head_t wq;
42
- ipi_handler_t handler;
35
+ mtk_vcodec_ipi_handler handler;
4336 };
4437
4538 /**
....@@ -62,7 +55,7 @@
6255 /**
6356 * vpu_dec_end - end decoding, basically the function will be invoked once
6457 * 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
6659 * and check if there is a new decoded frame available to display.
6760 *
6861 * @vpu : instance for vdec_vpu_inst
....@@ -83,14 +76,5 @@
8376 * @vpu: instance for vdec_vpu_inst
8477 */
8578 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);
9579
9680 #endif