Lines Matching refs:hub

131 int tegra_display_hub_prepare(struct tegra_display_hub *hub)  in tegra_display_hub_prepare()  argument
141 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_prepare()
142 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_prepare()
150 void tegra_display_hub_cleanup(struct tegra_display_hub *hub) in tegra_display_hub_cleanup() argument
158 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_cleanup()
159 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_cleanup()
536 struct tegra_display_hub *hub = tegra->hub; in tegra_shared_plane_create() local
553 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
605 tegra_display_hub_get_state(struct tegra_display_hub *hub, in tegra_display_hub_get_state() argument
608 struct drm_device *drm = dev_get_drvdata(hub->client.parent); in tegra_display_hub_get_state()
613 priv = drm_atomic_get_private_obj_state(state, &hub->base); in tegra_display_hub_get_state()
629 if (!tegra->hub) in tegra_display_hub_atomic_check()
632 hub_state = tegra_display_hub_get_state(tegra->hub, state); in tegra_display_hub_atomic_check()
685 struct tegra_display_hub *hub = tegra->hub; in tegra_display_hub_atomic_commit() local
687 struct device *dev = hub->client.dev; in tegra_display_hub_atomic_commit()
690 hub_state = to_tegra_display_hub_state(hub->base.state); in tegra_display_hub_atomic_commit()
698 err = clk_set_parent(hub->clk_disp, hub_state->clk); in tegra_display_hub_atomic_commit()
701 hub->clk_disp, hub_state->clk, err); in tegra_display_hub_atomic_commit()
710 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_init() local
719 drm_atomic_private_obj_init(drm, &hub->base, &state->base, in tegra_display_hub_init()
722 tegra->hub = hub; in tegra_display_hub_init()
732 drm_atomic_private_obj_fini(&tegra->hub->base); in tegra_display_hub_exit()
733 tegra->hub = NULL; in tegra_display_hub_exit()
746 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
751 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
752 if (!hub) in tegra_display_hub_probe()
755 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
757 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
758 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
759 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
763 if (hub->soc->supports_dsc) { in tegra_display_hub_probe()
764 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
765 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
766 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
771 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
772 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
773 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
777 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
778 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
779 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
783 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
784 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
785 if (!hub->wgrps) in tegra_display_hub_probe()
788 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
789 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
806 hub->num_heads = of_get_child_count(pdev->dev.of_node); in tegra_display_hub_probe()
808 hub->clk_heads = devm_kcalloc(&pdev->dev, hub->num_heads, sizeof(clk), in tegra_display_hub_probe()
810 if (!hub->clk_heads) in tegra_display_hub_probe()
813 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_probe()
829 hub->clk_heads[i] = clk; in tegra_display_hub_probe()
835 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
839 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
842 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
843 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
844 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
846 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
856 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
859 err = host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
872 struct tegra_display_hub *hub = dev_get_drvdata(dev); in tegra_display_hub_suspend() local
873 unsigned int i = hub->num_heads; in tegra_display_hub_suspend()
876 err = reset_control_assert(hub->rst); in tegra_display_hub_suspend()
881 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_suspend()
883 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_suspend()
884 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_suspend()
885 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_suspend()
892 struct tegra_display_hub *hub = dev_get_drvdata(dev); in tegra_display_hub_resume() local
896 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_resume()
900 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_resume()
904 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_resume()
908 for (i = 0; i < hub->num_heads; i++) { in tegra_display_hub_resume()
909 err = clk_prepare_enable(hub->clk_heads[i]); in tegra_display_hub_resume()
914 err = reset_control_deassert(hub->rst); in tegra_display_hub_resume()
922 clk_disable_unprepare(hub->clk_heads[i]); in tegra_display_hub_resume()
924 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_resume()
926 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_resume()
928 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_resume()