.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2015-2016 MediaTek Inc. |
---|
3 | 4 | * Author: Houlong Wei <houlong.wei@mediatek.com> |
---|
4 | 5 | * Ming Hsiu Tsai <minghsiu.tsai@mediatek.com> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #ifndef __MTK_MDP_CORE_H__ |
---|
.. | .. |
---|
36 | 28 | #define MTK_MDP_FMT_FLAG_CAPTURE BIT(1) |
---|
37 | 29 | |
---|
38 | 30 | #define MTK_MDP_VPU_INIT BIT(0) |
---|
39 | | -#define MTK_MDP_SRC_FMT BIT(1) |
---|
40 | | -#define MTK_MDP_DST_FMT BIT(2) |
---|
41 | 31 | #define MTK_MDP_CTX_ERROR BIT(5) |
---|
42 | 32 | |
---|
43 | 33 | /** |
---|
44 | | - * struct mtk_mdp_pix_align - alignement of image |
---|
| 34 | + * struct mtk_mdp_pix_align - alignment of image |
---|
45 | 35 | * @org_w: source alignment of width |
---|
46 | 36 | * @org_h: source alignment of height |
---|
47 | 37 | * @target_w: dst alignment of width |
---|
.. | .. |
---|
122 | 112 | /** |
---|
123 | 113 | * struct mtk_mdp_variant - image processor variant information |
---|
124 | 114 | * @pix_max: maximum limit of image size |
---|
125 | | - * @pix_min: minimun limit of image size |
---|
126 | | - * @pix_align: alignement of image |
---|
| 115 | + * @pix_min: minimum limit of image size |
---|
| 116 | + * @pix_align: alignment of image |
---|
127 | 117 | * @h_scale_up_max: maximum scale-up in horizontal |
---|
128 | 118 | * @v_scale_up_max: maximum scale-up in vertical |
---|
129 | 119 | * @h_scale_down_max: maximum scale-down in horizontal |
---|
.. | .. |
---|
146 | 136 | * @pdev: pointer to the image processor platform device |
---|
147 | 137 | * @variant: the IP variant information |
---|
148 | 138 | * @id: image processor device index (0..MTK_MDP_MAX_DEVS) |
---|
149 | | - * @comp: MDP function components |
---|
| 139 | + * @comp_list: list of MDP function components |
---|
150 | 140 | * @m2m_dev: v4l2 memory-to-memory device data |
---|
151 | 141 | * @ctx_list: list of struct mtk_mdp_ctx |
---|
152 | 142 | * @vdev: video device for image processor driver |
---|
.. | .. |
---|
164 | 154 | struct platform_device *pdev; |
---|
165 | 155 | struct mtk_mdp_variant *variant; |
---|
166 | 156 | u16 id; |
---|
167 | | - struct mtk_mdp_comp *comp[MTK_MDP_COMP_ID_MAX]; |
---|
| 157 | + struct list_head comp_list; |
---|
168 | 158 | struct v4l2_m2m_dev *m2m_dev; |
---|
169 | 159 | struct list_head ctx_list; |
---|
170 | 160 | struct video_device *vdev; |
---|
.. | .. |
---|
231 | 221 | |
---|
232 | 222 | extern int mtk_mdp_dbg_level; |
---|
233 | 223 | |
---|
| 224 | +void mtk_mdp_register_component(struct mtk_mdp_dev *mdp, |
---|
| 225 | + struct mtk_mdp_comp *comp); |
---|
| 226 | + |
---|
| 227 | +void mtk_mdp_unregister_component(struct mtk_mdp_dev *mdp, |
---|
| 228 | + struct mtk_mdp_comp *comp); |
---|
| 229 | + |
---|
234 | 230 | #if defined(DEBUG) |
---|
235 | 231 | |
---|
236 | 232 | #define mtk_mdp_dbg(level, fmt, args...) \ |
---|