Lines Matching refs:hub
156 int tegra_display_hub_prepare(struct tegra_display_hub *hub) in tegra_display_hub_prepare() argument
166 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_prepare()
167 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_prepare()
177 void tegra_display_hub_cleanup(struct tegra_display_hub *hub) in tegra_display_hub_cleanup() argument
185 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_cleanup()
186 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_cleanup()
763 struct tegra_display_hub *hub = tegra->hub; in tegra_shared_plane_create() local
779 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
834 tegra_display_hub_get_state(struct tegra_display_hub *hub, in tegra_display_hub_get_state() argument
839 priv = drm_atomic_get_private_obj_state(state, &hub->base); in tegra_display_hub_get_state()
855 if (!tegra->hub) in tegra_display_hub_atomic_check()
858 hub_state = tegra_display_hub_get_state(tegra->hub, state); in tegra_display_hub_atomic_check()
916 struct tegra_display_hub *hub = tegra->hub; in tegra_display_hub_atomic_commit() local
918 struct device *dev = hub->client.dev; in tegra_display_hub_atomic_commit()
921 hub_state = to_tegra_display_hub_state(hub->base.state); in tegra_display_hub_atomic_commit()
929 err = clk_set_parent(hub->clk_disp, hub_state->clk); in tegra_display_hub_atomic_commit()
932 hub->clk_disp, hub_state->clk, err); in tegra_display_hub_atomic_commit()
941 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_init() local
950 drm_atomic_private_obj_init(drm, &hub->base, &state->base, in tegra_display_hub_init()
953 tegra->hub = hub; in tegra_display_hub_init()
963 drm_atomic_private_obj_fini(&tegra->hub->base); in tegra_display_hub_exit()
964 tegra->hub = NULL; in tegra_display_hub_exit()
971 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_suspend() local
973 unsigned int i = hub->num_heads; in tegra_display_hub_runtime_suspend()
976 err = reset_control_assert(hub->rst); in tegra_display_hub_runtime_suspend()
981 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_suspend()
983 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_suspend()
984 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_suspend()
985 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_suspend()
994 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_resume() local
1005 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_runtime_resume()
1009 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_runtime_resume()
1013 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_runtime_resume()
1017 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_runtime_resume()
1018 err = clk_prepare_enable(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
1023 err = reset_control_deassert(hub->rst); in tegra_display_hub_runtime_resume()
1031 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
1033 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_resume()
1035 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_resume()
1037 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_resume()
1054 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
1065 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
1066 if (!hub) in tegra_display_hub_probe()
1069 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
1071 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
1072 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
1073 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
1077 if (hub->soc->supports_dsc) { in tegra_display_hub_probe()
1078 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
1079 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
1080 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
1085 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
1086 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
1087 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
1091 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
1092 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
1093 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
1097 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
1098 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
1099 if (!hub->wgrps) in tegra_display_hub_probe()
1102 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
1103 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
1120 hub->num_heads = of_get_child_count(pdev->dev.of_node); in tegra_display_hub_probe()
1122 hub->clk_heads = devm_kcalloc(&pdev->dev, hub->num_heads, sizeof(clk), in tegra_display_hub_probe()
1124 if (!hub->clk_heads) in tegra_display_hub_probe()
1127 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_probe()
1143 hub->clk_heads[i] = clk; in tegra_display_hub_probe()
1149 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
1153 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
1156 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
1157 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
1158 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
1160 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
1172 host1x_client_unregister(&hub->client); in tegra_display_hub_probe()
1179 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
1182 host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
1184 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_remove()
1185 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_remove()