forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/media/platform/mtk-vcodec/venc_ipi_msg.h
....@@ -1,18 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Copyright (c) 2016 MediaTek Inc.
34 * Author: Jungchang Tsao <jungchang.tsao@mediatek.com>
45 * Daniel Hsiao <daniel.hsiao@mediatek.com>
56 * Tiffany Lin <tiffany.lin@mediatek.com>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
167 */
178
189 #ifndef _VENC_IPI_MSG_H_
....@@ -71,6 +62,11 @@
7162 uint32_t data[8];
7263 };
7364
65
+struct venc_ap_ipi_msg_set_param_ext {
66
+ struct venc_ap_ipi_msg_set_param base;
67
+ uint32_t data_ext[24];
68
+};
69
+
7470 /**
7571 * struct venc_ap_ipi_msg_enc - AP to VPU enc cmd structure
7672 * @msg_id: message id (AP_IPIMSG_XXX_ENC_ENCODE)
....@@ -89,6 +85,19 @@
8985 uint32_t input_addr[3];
9086 uint32_t bs_addr;
9187 uint32_t bs_size;
88
+};
89
+
90
+/**
91
+ * struct venc_ap_ipi_msg_enc_ext - AP to SCP extended enc cmd structure
92
+ *
93
+ * @base: base msg structure
94
+ * @data_item: number of items in the data array
95
+ * @data[8]: data array to store the set parameters
96
+ */
97
+struct venc_ap_ipi_msg_enc_ext {
98
+ struct venc_ap_ipi_msg_enc base;
99
+ uint32_t data_item;
100
+ uint32_t data[32];
92101 };
93102
94103 /**
....@@ -129,16 +138,17 @@
129138 * @venc_inst: AP encoder instance (struct venc_vp8_inst/venc_h264_inst *)
130139 * @vpu_inst_addr: VPU encoder instance addr
131140 * (struct venc_vp8_vsi/venc_h264_vsi *)
132
- * @reserved: reserved for future use. vpu is running in 32bit. Without
133
- * this reserved field, if kernel run in 64bit. this struct size
134
- * will be different between kernel and vpu
141
+ * @venc_abi_version: ABI version of the firmware. Kernel can use it to
142
+ * ensure that it is compatible with the firmware.
143
+ * For MT8173 the value of this field is undefined and
144
+ * should not be used.
135145 */
136146 struct venc_vpu_ipi_msg_init {
137147 uint32_t msg_id;
138148 uint32_t status;
139149 uint64_t venc_inst;
140150 uint32_t vpu_inst_addr;
141
- uint32_t reserved;
151
+ uint32_t venc_abi_version;
142152 };
143153
144154 /**