| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2016 MediaTek Inc. |
|---|
| 3 | 4 | * Author: Jungchang Tsao <jungchang.tsao@mediatek.com> |
|---|
| 4 | 5 | * Daniel Hsiao <daniel.hsiao@mediatek.com> |
|---|
| 5 | 6 | * 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. |
|---|
| 16 | 7 | */ |
|---|
| 17 | 8 | |
|---|
| 18 | 9 | #ifndef _VENC_IPI_MSG_H_ |
|---|
| .. | .. |
|---|
| 71 | 62 | uint32_t data[8]; |
|---|
| 72 | 63 | }; |
|---|
| 73 | 64 | |
|---|
| 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 | + |
|---|
| 74 | 70 | /** |
|---|
| 75 | 71 | * struct venc_ap_ipi_msg_enc - AP to VPU enc cmd structure |
|---|
| 76 | 72 | * @msg_id: message id (AP_IPIMSG_XXX_ENC_ENCODE) |
|---|
| .. | .. |
|---|
| 89 | 85 | uint32_t input_addr[3]; |
|---|
| 90 | 86 | uint32_t bs_addr; |
|---|
| 91 | 87 | 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]; |
|---|
| 92 | 101 | }; |
|---|
| 93 | 102 | |
|---|
| 94 | 103 | /** |
|---|
| .. | .. |
|---|
| 129 | 138 | * @venc_inst: AP encoder instance (struct venc_vp8_inst/venc_h264_inst *) |
|---|
| 130 | 139 | * @vpu_inst_addr: VPU encoder instance addr |
|---|
| 131 | 140 | * (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. |
|---|
| 135 | 145 | */ |
|---|
| 136 | 146 | struct venc_vpu_ipi_msg_init { |
|---|
| 137 | 147 | uint32_t msg_id; |
|---|
| 138 | 148 | uint32_t status; |
|---|
| 139 | 149 | uint64_t venc_inst; |
|---|
| 140 | 150 | uint32_t vpu_inst_addr; |
|---|
| 141 | | - uint32_t reserved; |
|---|
| 151 | + uint32_t venc_abi_version; |
|---|
| 142 | 152 | }; |
|---|
| 143 | 153 | |
|---|
| 144 | 154 | /** |
|---|