Lines Matching full:mdp
1614 static int mdp_comp_get_id(struct mdp_dev *mdp, enum mdp_comp_type type, u32 alias_id) in mdp_comp_get_id() argument
1618 for (i = 0; i < mdp->mdp_data->comp_data_len; i++) in mdp_comp_get_id()
1619 if (mdp->mdp_data->comp_data[i].match.type == type && in mdp_comp_get_id()
1620 mdp->mdp_data->comp_data[i].match.alias_id == alias_id) in mdp_comp_get_id()
1733 static int mdp_get_subsys_id(struct mdp_dev *mdp, struct device *dev, in mdp_get_subsys_id() argument
1752 index = mdp->mdp_data->comp_data[comp->public_id].info.dts_reg_ofst; in mdp_get_subsys_id()
1767 static void __mdp_comp_init(struct mdp_dev *mdp, struct device_node *node, in __mdp_comp_init() argument
1774 index = mdp->mdp_data->comp_data[comp->public_id].info.dts_reg_ofst; in __mdp_comp_init()
1780 comp->mdp_dev = mdp; in __mdp_comp_init()
1785 static int mdp_comp_init(struct mdp_dev *mdp, struct device_node *node, in mdp_comp_init() argument
1788 struct device *dev = &mdp->pdev->dev; in mdp_comp_init()
1808 comp->type = mdp->mdp_data->comp_data[id].match.type; in mdp_comp_init()
1809 comp->inner_id = mdp->mdp_data->comp_data[id].match.inner_id; in mdp_comp_init()
1810 comp->alias_id = mdp->mdp_data->comp_data[id].match.alias_id; in mdp_comp_init()
1812 __mdp_comp_init(mdp, node, comp); in mdp_comp_init()
1814 comp->clk_num = mdp->mdp_data->comp_data[id].info.clk_num; in mdp_comp_init()
1820 clk_ofst = mdp->mdp_data->comp_data[id].info.clk_ofst; in mdp_comp_init()
1828 mdp_get_subsys_id(mdp, dev, node, comp); in mdp_comp_init()
1868 static struct mdp_comp *mdp_comp_create(struct mdp_dev *mdp, in mdp_comp_create() argument
1872 struct device *dev = &mdp->pdev->dev; in mdp_comp_create()
1876 if (mdp->comp[id]) in mdp_comp_create()
1883 ret = mdp_comp_init(mdp, node, comp, id); in mdp_comp_create()
1888 mdp->comp[id] = comp; in mdp_comp_create()
1889 mdp->comp[id]->mdp_dev = mdp; in mdp_comp_create()
1897 static int mdp_comp_sub_create(struct mdp_dev *mdp) in mdp_comp_sub_create() argument
1899 struct device *dev = &mdp->pdev->dev; in mdp_comp_sub_create()
1911 of_id = of_match_node(mdp->mdp_data->mdp_sub_comp_dt_ids, node); in mdp_comp_sub_create()
1922 id = mdp_comp_get_id(mdp, type, alias_id); in mdp_comp_sub_create()
1932 comp = mdp_comp_create(mdp, node, id); in mdp_comp_sub_create()
1945 void mdp_comp_destroy(struct mdp_dev *mdp) in mdp_comp_destroy() argument
1949 for (i = 0; i < ARRAY_SIZE(mdp->comp); i++) { in mdp_comp_destroy()
1950 if (mdp->comp[i]) { in mdp_comp_destroy()
1951 if (is_dma_capable(mdp->comp[i]->type)) in mdp_comp_destroy()
1952 pm_runtime_disable(mdp->comp[i]->comp_dev); in mdp_comp_destroy()
1953 mdp_comp_deinit(mdp->comp[i]); in mdp_comp_destroy()
1954 devm_kfree(mdp->comp[i]->comp_dev, mdp->comp[i]); in mdp_comp_destroy()
1955 mdp->comp[i] = NULL; in mdp_comp_destroy()
1960 int mdp_comp_config(struct mdp_dev *mdp) in mdp_comp_config() argument
1962 struct device *dev = &mdp->pdev->dev; in mdp_comp_config()
1967 p_id = mdp->mdp_data->mdp_plat_id; in mdp_comp_config()
1970 /* Iterate over sibling MDP function blocks */ in mdp_comp_config()
1989 id = mdp_comp_get_id(mdp, type, alias_id); in mdp_comp_config()
1998 comp = mdp_comp_create(mdp, node, id); in mdp_comp_config()
2011 ret = mdp_comp_sub_create(mdp); in mdp_comp_config()
2018 mdp_comp_destroy(mdp); in mdp_comp_config()
2022 int mdp_comp_ctx_config(struct mdp_dev *mdp, struct mdp_comp_ctx *ctx, in mdp_comp_ctx_config() argument
2026 struct device *dev = &mdp->pdev->dev; in mdp_comp_ctx_config()
2042 public_id = mdp_cfg_get_id_public(mdp, arg); in mdp_comp_ctx_config()
2048 ctx->comp = mdp->comp[public_id]; in mdp_comp_ctx_config()