File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed
drivers/media/platform/mediatek/mdp3 Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,24 @@ static const struct mdp_comp_data mt8183_mdp_comp_data[MDP_MAX_COMP_COUNT] = {
144
144
},
145
145
};
146
146
147
+ static const struct of_device_id mt8183_sub_comp_dt_ids [] = {
148
+ {
149
+ .compatible = "mediatek,mt8183-mdp3-wdma" ,
150
+ .data = (void * )MDP_COMP_TYPE_PATH ,
151
+ }, {
152
+ .compatible = "mediatek,mt8183-mdp3-wrot" ,
153
+ .data = (void * )MDP_COMP_TYPE_PATH ,
154
+ },
155
+ {}
156
+ };
157
+
147
158
const struct mtk_mdp_driver_data mt8183_mdp_driver_data = {
148
159
.mdp_probe_infra = mt8183_mdp_probe_infra ,
149
160
.mdp_cfg = & mt8183_plat_cfg ,
150
161
.mdp_mutex_table_idx = mt8183_mutex_idx ,
151
162
.comp_data = mt8183_mdp_comp_data ,
152
163
.comp_data_len = ARRAY_SIZE (mt8183_mdp_comp_data ),
164
+ .mdp_sub_comp_dt_ids = mt8183_sub_comp_dt_ids ,
153
165
};
154
166
155
167
s32 mdp_cfg_get_id_inner (struct mdp_dev * mdp_dev , enum mtk_mdp_comp_id id )
Original file line number Diff line number Diff line change @@ -610,17 +610,6 @@ static const struct of_device_id mdp_comp_dt_ids[] = {
610
610
{}
611
611
};
612
612
613
- static const struct of_device_id mdp_sub_comp_dt_ids [] = {
614
- {
615
- .compatible = "mediatek,mt8183-mdp3-wdma" ,
616
- .data = (void * )MDP_COMP_TYPE_PATH ,
617
- }, {
618
- .compatible = "mediatek,mt8183-mdp3-wrot" ,
619
- .data = (void * )MDP_COMP_TYPE_PATH ,
620
- },
621
- {}
622
- };
623
-
624
613
static inline bool is_dma_capable (const enum mdp_comp_type type )
625
614
{
626
615
return (type == MDP_COMP_TYPE_RDMA ||
@@ -871,6 +860,7 @@ static int mdp_comp_sub_create(struct mdp_dev *mdp)
871
860
{
872
861
struct device * dev = & mdp -> pdev -> dev ;
873
862
struct device_node * node , * parent ;
863
+ const struct mtk_mdp_driver_data * data = mdp -> mdp_data ;
874
864
875
865
parent = dev -> of_node -> parent ;
876
866
@@ -880,7 +870,7 @@ static int mdp_comp_sub_create(struct mdp_dev *mdp)
880
870
int id , alias_id ;
881
871
struct mdp_comp * comp ;
882
872
883
- of_id = of_match_node (mdp_sub_comp_dt_ids , node );
873
+ of_id = of_match_node (data -> mdp_sub_comp_dt_ids , node );
884
874
if (!of_id )
885
875
continue ;
886
876
if (!of_device_is_available (node )) {
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ struct mtk_mdp_driver_data {
56
56
const u32 * mdp_mutex_table_idx ;
57
57
const struct mdp_comp_data * comp_data ;
58
58
unsigned int comp_data_len ;
59
+ const struct of_device_id * mdp_sub_comp_dt_ids ;
59
60
};
60
61
61
62
struct mdp_dev {
You can’t perform that action at this time.
0 commit comments