Lines Matching full:hub

139 int tegra_display_hub_prepare(struct tegra_display_hub *hub)  in tegra_display_hub_prepare()  argument
149 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_prepare()
150 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_prepare()
160 void tegra_display_hub_cleanup(struct tegra_display_hub *hub) in tegra_display_hub_cleanup() argument
168 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_cleanup()
169 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_cleanup()
558 struct tegra_display_hub *hub = tegra->hub; in tegra_shared_plane_create() local
575 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
627 tegra_display_hub_get_state(struct tegra_display_hub *hub, in tegra_display_hub_get_state() argument
632 priv = drm_atomic_get_private_obj_state(state, &hub->base); in tegra_display_hub_get_state()
648 if (!tegra->hub) in tegra_display_hub_atomic_check()
651 hub_state = tegra_display_hub_get_state(tegra->hub, state); in tegra_display_hub_atomic_check()
656 * The display hub display clock needs to be fed by the display clock in tegra_display_hub_atomic_check()
709 struct tegra_display_hub *hub = tegra->hub; in tegra_display_hub_atomic_commit() local
711 struct device *dev = hub->client.dev; in tegra_display_hub_atomic_commit()
714 hub_state = to_tegra_display_hub_state(hub->base.state); in tegra_display_hub_atomic_commit()
722 err = clk_set_parent(hub->clk_disp, hub_state->clk); in tegra_display_hub_atomic_commit()
725 hub->clk_disp, hub_state->clk, err); in tegra_display_hub_atomic_commit()
734 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_init() local
743 drm_atomic_private_obj_init(drm, &hub->base, &state->base, in tegra_display_hub_init()
746 tegra->hub = hub; in tegra_display_hub_init()
756 drm_atomic_private_obj_fini(&tegra->hub->base); in tegra_display_hub_exit()
757 tegra->hub = NULL; in tegra_display_hub_exit()
764 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_suspend() local
766 unsigned int i = hub->num_heads; in tegra_display_hub_runtime_suspend()
769 err = reset_control_assert(hub->rst); in tegra_display_hub_runtime_suspend()
774 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_suspend()
776 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_suspend()
777 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_suspend()
778 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_suspend()
787 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_runtime_resume() local
798 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_runtime_resume()
802 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_runtime_resume()
806 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_runtime_resume()
810 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_runtime_resume()
811 err = clk_prepare_enable(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
816 err = reset_control_deassert(hub->rst); in tegra_display_hub_runtime_resume()
824 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_runtime_resume()
826 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_runtime_resume()
828 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_runtime_resume()
830 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_runtime_resume()
846 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
851 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
852 if (!hub) in tegra_display_hub_probe()
855 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
857 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
858 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
859 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
863 if (hub->soc->supports_dsc) { in tegra_display_hub_probe()
864 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
865 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
866 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
871 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
872 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
873 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
877 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
878 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
879 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
883 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
884 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
885 if (!hub->wgrps) in tegra_display_hub_probe()
888 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
889 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
906 hub->num_heads = of_get_child_count(pdev->dev.of_node); in tegra_display_hub_probe()
908 hub->clk_heads = devm_kcalloc(&pdev->dev, hub->num_heads, sizeof(clk), in tegra_display_hub_probe()
910 if (!hub->clk_heads) in tegra_display_hub_probe()
913 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_probe()
929 hub->clk_heads[i] = clk; in tegra_display_hub_probe()
935 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
939 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
942 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
943 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
944 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
946 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
958 host1x_client_unregister(&hub->client); in tegra_display_hub_probe()
965 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
969 err = host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
975 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_remove()
976 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_remove()
1011 .name = "tegra-display-hub",