hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
....@@ -1,16 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2015-2016 MediaTek Inc.
34 * Author: Houlong Wei <houlong.wei@mediatek.com>
45 * 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.
146 */
157
168 #ifndef __MTK_MDP_CORE_H__
....@@ -36,12 +28,10 @@
3628 #define MTK_MDP_FMT_FLAG_CAPTURE BIT(1)
3729
3830 #define MTK_MDP_VPU_INIT BIT(0)
39
-#define MTK_MDP_SRC_FMT BIT(1)
40
-#define MTK_MDP_DST_FMT BIT(2)
4131 #define MTK_MDP_CTX_ERROR BIT(5)
4232
4333 /**
44
- * struct mtk_mdp_pix_align - alignement of image
34
+ * struct mtk_mdp_pix_align - alignment of image
4535 * @org_w: source alignment of width
4636 * @org_h: source alignment of height
4737 * @target_w: dst alignment of width
....@@ -122,8 +112,8 @@
122112 /**
123113 * struct mtk_mdp_variant - image processor variant information
124114 * @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
127117 * @h_scale_up_max: maximum scale-up in horizontal
128118 * @v_scale_up_max: maximum scale-up in vertical
129119 * @h_scale_down_max: maximum scale-down in horizontal
....@@ -146,7 +136,7 @@
146136 * @pdev: pointer to the image processor platform device
147137 * @variant: the IP variant information
148138 * @id: image processor device index (0..MTK_MDP_MAX_DEVS)
149
- * @comp: MDP function components
139
+ * @comp_list: list of MDP function components
150140 * @m2m_dev: v4l2 memory-to-memory device data
151141 * @ctx_list: list of struct mtk_mdp_ctx
152142 * @vdev: video device for image processor driver
....@@ -164,7 +154,7 @@
164154 struct platform_device *pdev;
165155 struct mtk_mdp_variant *variant;
166156 u16 id;
167
- struct mtk_mdp_comp *comp[MTK_MDP_COMP_ID_MAX];
157
+ struct list_head comp_list;
168158 struct v4l2_m2m_dev *m2m_dev;
169159 struct list_head ctx_list;
170160 struct video_device *vdev;
....@@ -231,6 +221,12 @@
231221
232222 extern int mtk_mdp_dbg_level;
233223
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
+
234230 #if defined(DEBUG)
235231
236232 #define mtk_mdp_dbg(level, fmt, args...) \