Lines Matching full:hub

153 int tegra_display_hub_prepare(struct tegra_display_hub *hub)  in tegra_display_hub_prepare()  argument
163 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_prepare()
164 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_prepare()
174 void tegra_display_hub_cleanup(struct tegra_display_hub *hub) in tegra_display_hub_cleanup() argument
182 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_cleanup()
183 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_cleanup()
754 struct tegra_display_hub *hub = tegra->hub; in tegra_shared_plane_create() local
770 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
825 tegra_display_hub_get_state(struct tegra_display_hub *hub, in tegra_display_hub_get_state() argument
830 priv = drm_atomic_get_private_obj_state(state, &hub->base); in tegra_display_hub_get_state()
846 if (!tegra->hub) in tegra_display_hub_atomic_check()
849 hub_state = tegra_display_hub_get_state(tegra->hub, state); in tegra_display_hub_atomic_check()
854 * The display hub display clock needs to be fed by the display clock in tegra_display_hub_atomic_check()
907 struct tegra_display_hub *hub = tegra->hub; in tegra_display_hub_atomic_commit() local
909 struct device *dev = hub->client.dev; in tegra_display_hub_atomic_commit()
912 hub_state = to_tegra_display_hub_state(hub->base.state); in tegra_display_hub_atomic_commit()
920 err = clk_set_parent(hub->clk_disp, hub_state->clk); in tegra_display_hub_atomic_commit()
923 hub->clk_disp, hub_state->clk, err); in tegra_display_hub_atomic_commit()
932 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_init() local
941 drm_atomic_private_obj_init(drm, &hub->base, &state->base, in tegra_display_hub_init()
944 tegra->hub = hub; in tegra_display_hub_init()
954 drm_atomic_private_obj_fini(&tegra->hub->base); in tegra_display_hub_exit()
955 tegra->hub = NULL; in tegra_display_hub_exit()
962 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_suspend() local
964 unsigned int i = hub->num_heads; in tegra_display_hub_runtime_suspend()
967 err = reset_control_assert(hub->rst); in tegra_display_hub_runtime_suspend()
972 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_suspend()
974 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_suspend()
975 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_suspend()
976 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_suspend()
985 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_resume() local
996 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_runtime_resume()
1000 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_runtime_resume()
1004 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_runtime_resume()
1008 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_runtime_resume()
1009 err = clk_prepare_enable(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
1014 err = reset_control_deassert(hub->rst); in tegra_display_hub_runtime_resume()
1022 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
1024 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_resume()
1026 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_resume()
1028 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_resume()
1045 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
1056 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
1057 if (!hub) in tegra_display_hub_probe()
1060 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
1062 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
1063 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
1064 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
1068 if (hub->soc->supports_dsc) { in tegra_display_hub_probe()
1069 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
1070 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
1071 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
1076 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
1077 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
1078 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
1082 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
1083 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
1084 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
1088 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
1089 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
1090 if (!hub->wgrps) in tegra_display_hub_probe()
1093 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
1094 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
1111 hub->num_heads = of_get_child_count(pdev->dev.of_node); in tegra_display_hub_probe()
1113 hub->clk_heads = devm_kcalloc(&pdev->dev, hub->num_heads, sizeof(clk), in tegra_display_hub_probe()
1115 if (!hub->clk_heads) in tegra_display_hub_probe()
1118 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_probe()
1134 hub->clk_heads[i] = clk; in tegra_display_hub_probe()
1140 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
1144 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
1147 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
1148 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
1149 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
1151 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
1163 host1x_client_unregister(&hub->client); in tegra_display_hub_probe()
1170 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
1174 err = host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
1180 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_remove()
1181 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_remove()
1216 .name = "tegra-display-hub",