hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/platform/mtk-mdp/mtk_mdp_comp.h
....@@ -1,15 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2016 MediaTek Inc.
34 * Author: Ming Hsiu Tsai <minghsiu.tsai@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 __MTK_MDP_COMP_H__
....@@ -30,41 +22,26 @@
3022 MTK_MDP_COMP_TYPE_MAX,
3123 };
3224
33
-enum mtk_mdp_comp_id {
34
- MTK_MDP_COMP_RDMA0,
35
- MTK_MDP_COMP_RDMA1,
36
- MTK_MDP_COMP_RSZ0,
37
- MTK_MDP_COMP_RSZ1,
38
- MTK_MDP_COMP_RSZ2,
39
- MTK_MDP_COMP_WDMA,
40
- MTK_MDP_COMP_WROT0,
41
- MTK_MDP_COMP_WROT1,
42
- MTK_MDP_COMP_ID_MAX,
43
-};
44
-
4525 /**
4626 * struct mtk_mdp_comp - the MDP's function component data
27
+ * @node: list node to track sibing MDP components
4728 * @dev_node: component device node
4829 * @clk: clocks required for component
49
- * @regs: Mapped address of component registers.
5030 * @larb_dev: SMI device required for component
5131 * @type: component type
52
- * @id: component ID
5332 */
5433 struct mtk_mdp_comp {
34
+ struct list_head node;
5535 struct device_node *dev_node;
5636 struct clk *clk[2];
57
- void __iomem *regs;
5837 struct device *larb_dev;
5938 enum mtk_mdp_comp_type type;
60
- enum mtk_mdp_comp_id id;
6139 };
6240
6341 int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
64
- struct mtk_mdp_comp *comp, enum mtk_mdp_comp_id comp_id);
42
+ struct mtk_mdp_comp *comp,
43
+ enum mtk_mdp_comp_type comp_type);
6544 void mtk_mdp_comp_deinit(struct device *dev, struct mtk_mdp_comp *comp);
66
-int mtk_mdp_comp_get_id(struct device *dev, struct device_node *node,
67
- enum mtk_mdp_comp_type comp_type);
6845 void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp);
6946 void mtk_mdp_comp_clock_off(struct device *dev, struct mtk_mdp_comp *comp);
7047