Lines Matching full: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()
762 struct tegra_display_hub *hub = tegra->hub; in tegra_shared_plane_create() local
778 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
833 tegra_display_hub_get_state(struct tegra_display_hub *hub, in tegra_display_hub_get_state() argument
838 priv = drm_atomic_get_private_obj_state(state, &hub->base); in tegra_display_hub_get_state()
854 if (!tegra->hub) in tegra_display_hub_atomic_check()
857 hub_state = tegra_display_hub_get_state(tegra->hub, state); in tegra_display_hub_atomic_check()
862 * The display hub display clock needs to be fed by the display clock in tegra_display_hub_atomic_check()
915 struct tegra_display_hub *hub = tegra->hub; in tegra_display_hub_atomic_commit() local
917 struct device *dev = hub->client.dev; in tegra_display_hub_atomic_commit()
920 hub_state = to_tegra_display_hub_state(hub->base.state); in tegra_display_hub_atomic_commit()
928 err = clk_set_parent(hub->clk_disp, hub_state->clk); in tegra_display_hub_atomic_commit()
931 hub->clk_disp, hub_state->clk, err); in tegra_display_hub_atomic_commit()
940 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_init() local
949 drm_atomic_private_obj_init(drm, &hub->base, &state->base, in tegra_display_hub_init()
952 tegra->hub = hub; in tegra_display_hub_init()
962 drm_atomic_private_obj_fini(&tegra->hub->base); in tegra_display_hub_exit()
963 tegra->hub = NULL; in tegra_display_hub_exit()
970 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_suspend() local
972 unsigned int i = hub->num_heads; in tegra_display_hub_runtime_suspend()
975 err = reset_control_assert(hub->rst); in tegra_display_hub_runtime_suspend()
980 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_suspend()
982 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_suspend()
983 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_suspend()
984 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_suspend()
993 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_resume() local
1004 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_runtime_resume()
1008 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_runtime_resume()
1012 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_runtime_resume()
1016 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_runtime_resume()
1017 err = clk_prepare_enable(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
1022 err = reset_control_deassert(hub->rst); in tegra_display_hub_runtime_resume()
1030 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
1032 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_resume()
1034 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_resume()
1036 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_resume()
1053 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
1064 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
1065 if (!hub) in tegra_display_hub_probe()
1068 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
1070 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
1071 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
1072 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
1076 if (hub->soc->supports_dsc) { in tegra_display_hub_probe()
1077 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
1078 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
1079 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
1084 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
1085 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
1086 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
1090 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
1091 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
1092 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
1096 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
1097 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
1098 if (!hub->wgrps) in tegra_display_hub_probe()
1101 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
1102 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
1119 hub->num_heads = of_get_child_count(pdev->dev.of_node); in tegra_display_hub_probe()
1121 hub->clk_heads = devm_kcalloc(&pdev->dev, hub->num_heads, sizeof(clk), in tegra_display_hub_probe()
1123 if (!hub->clk_heads) in tegra_display_hub_probe()
1126 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_probe()
1142 hub->clk_heads[i] = clk; in tegra_display_hub_probe()
1148 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
1152 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
1155 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
1156 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
1157 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
1159 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
1171 host1x_client_unregister(&hub->client); in tegra_display_hub_probe()
1178 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
1181 host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
1183 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_remove()
1184 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_remove()
1217 .name = "tegra-display-hub",