Lines Matching full:mdp

785 static int mdp_comp_get_id(struct mdp_dev *mdp, enum mdp_comp_type type, u32 alias_id)  in mdp_comp_get_id()  argument
789 for (i = 0; i < mdp->mdp_data->comp_data_len; i++) in mdp_comp_get_id()
790 if (mdp->mdp_data->comp_data[i].match.type == type && in mdp_comp_get_id()
791 mdp->mdp_data->comp_data[i].match.alias_id == alias_id) in mdp_comp_get_id()
872 static int mdp_get_subsys_id(struct mdp_dev *mdp, struct device *dev, in mdp_get_subsys_id() argument
891 index = mdp->mdp_data->comp_data[comp->public_id].info.dts_reg_ofst; in mdp_get_subsys_id()
906 static void __mdp_comp_init(struct mdp_dev *mdp, struct device_node *node, in __mdp_comp_init() argument
913 index = mdp->mdp_data->comp_data[comp->public_id].info.dts_reg_ofst; in __mdp_comp_init()
919 comp->mdp_dev = mdp; in __mdp_comp_init()
924 static int mdp_comp_init(struct mdp_dev *mdp, struct device_node *node, in mdp_comp_init() argument
927 struct device *dev = &mdp->pdev->dev; in mdp_comp_init()
947 comp->type = mdp->mdp_data->comp_data[id].match.type; in mdp_comp_init()
948 comp->inner_id = mdp->mdp_data->comp_data[id].match.inner_id; in mdp_comp_init()
949 comp->alias_id = mdp->mdp_data->comp_data[id].match.alias_id; in mdp_comp_init()
951 __mdp_comp_init(mdp, node, comp); in mdp_comp_init()
953 comp->clk_num = mdp->mdp_data->comp_data[id].info.clk_num; in mdp_comp_init()
959 clk_ofst = mdp->mdp_data->comp_data[id].info.clk_ofst; in mdp_comp_init()
967 mdp_get_subsys_id(mdp, dev, node, comp); in mdp_comp_init()
1007 static struct mdp_comp *mdp_comp_create(struct mdp_dev *mdp, in mdp_comp_create() argument
1011 struct device *dev = &mdp->pdev->dev; in mdp_comp_create()
1015 if (mdp->comp[id]) in mdp_comp_create()
1022 ret = mdp_comp_init(mdp, node, comp, id); in mdp_comp_create()
1027 mdp->comp[id] = comp; in mdp_comp_create()
1028 mdp->comp[id]->mdp_dev = mdp; in mdp_comp_create()
1036 static int mdp_comp_sub_create(struct mdp_dev *mdp) in mdp_comp_sub_create() argument
1038 struct device *dev = &mdp->pdev->dev; in mdp_comp_sub_create()
1050 of_id = of_match_node(mdp->mdp_data->mdp_sub_comp_dt_ids, node); in mdp_comp_sub_create()
1061 id = mdp_comp_get_id(mdp, type, alias_id); in mdp_comp_sub_create()
1071 comp = mdp_comp_create(mdp, node, id); in mdp_comp_sub_create()
1084 void mdp_comp_destroy(struct mdp_dev *mdp) in mdp_comp_destroy() argument
1088 for (i = 0; i < ARRAY_SIZE(mdp->comp); i++) { in mdp_comp_destroy()
1089 if (mdp->comp[i]) { in mdp_comp_destroy()
1090 if (is_dma_capable(mdp->comp[i]->type)) in mdp_comp_destroy()
1091 pm_runtime_disable(mdp->comp[i]->comp_dev); in mdp_comp_destroy()
1092 mdp_comp_deinit(mdp->comp[i]); in mdp_comp_destroy()
1093 devm_kfree(mdp->comp[i]->comp_dev, mdp->comp[i]); in mdp_comp_destroy()
1094 mdp->comp[i] = NULL; in mdp_comp_destroy()
1099 int mdp_comp_config(struct mdp_dev *mdp) in mdp_comp_config() argument
1101 struct device *dev = &mdp->pdev->dev; in mdp_comp_config()
1106 p_id = mdp->mdp_data->mdp_plat_id; in mdp_comp_config()
1109 /* Iterate over sibling MDP function blocks */ in mdp_comp_config()
1128 id = mdp_comp_get_id(mdp, type, alias_id); in mdp_comp_config()
1137 comp = mdp_comp_create(mdp, node, id); in mdp_comp_config()
1149 ret = mdp_comp_sub_create(mdp); in mdp_comp_config()
1156 mdp_comp_destroy(mdp); in mdp_comp_config()
1160 int mdp_comp_ctx_config(struct mdp_dev *mdp, struct mdp_comp_ctx *ctx, in mdp_comp_ctx_config() argument
1164 struct device *dev = &mdp->pdev->dev; in mdp_comp_ctx_config()
1178 public_id = mdp_cfg_get_id_public(mdp, arg); in mdp_comp_ctx_config()
1184 ctx->comp = mdp->comp[public_id]; in mdp_comp_ctx_config()