Lines Matching full:hub
133 int tegra_display_hub_prepare(struct tegra_display_hub *hub) in tegra_display_hub_prepare() argument
143 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_prepare()
144 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_prepare()
154 void tegra_display_hub_cleanup(struct tegra_display_hub *hub) in tegra_display_hub_cleanup() argument
162 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_cleanup()
163 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_cleanup()
542 struct tegra_display_hub *hub = tegra->hub; in tegra_shared_plane_create() local
559 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
611 tegra_display_hub_get_state(struct tegra_display_hub *hub, in tegra_display_hub_get_state() argument
614 struct drm_device *drm = dev_get_drvdata(hub->client.parent); in tegra_display_hub_get_state()
619 priv = drm_atomic_get_private_obj_state(state, &hub->base); in tegra_display_hub_get_state()
635 if (!tegra->hub) in tegra_display_hub_atomic_check()
638 hub_state = tegra_display_hub_get_state(tegra->hub, state); in tegra_display_hub_atomic_check()
643 * The display hub display clock needs to be fed by the display clock in tegra_display_hub_atomic_check()
691 struct tegra_display_hub *hub = tegra->hub; in tegra_display_hub_atomic_commit() local
693 struct device *dev = hub->client.dev; in tegra_display_hub_atomic_commit()
696 hub_state = to_tegra_display_hub_state(hub->base.state); in tegra_display_hub_atomic_commit()
704 err = clk_set_parent(hub->clk_disp, hub_state->clk); in tegra_display_hub_atomic_commit()
707 hub->clk_disp, hub_state->clk, err); in tegra_display_hub_atomic_commit()
716 struct tegra_display_hub *hub = to_tegra_display_hub(client); in tegra_display_hub_init() local
725 drm_atomic_private_obj_init(&hub->base, &state->base, in tegra_display_hub_init()
728 tegra->hub = hub; in tegra_display_hub_init()
738 drm_atomic_private_obj_fini(&tegra->hub->base); in tegra_display_hub_exit()
739 tegra->hub = NULL; in tegra_display_hub_exit()
751 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
755 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
756 if (!hub) in tegra_display_hub_probe()
759 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
761 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
762 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
763 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
767 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
768 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
769 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
773 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
774 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
775 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
779 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
780 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
781 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
785 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
786 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
787 if (!hub->wgrps) in tegra_display_hub_probe()
790 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
791 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
809 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
813 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
816 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
817 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
818 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
820 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
830 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
833 err = host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
846 struct tegra_display_hub *hub = dev_get_drvdata(dev); in tegra_display_hub_suspend() local
849 err = reset_control_assert(hub->rst); in tegra_display_hub_suspend()
853 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_suspend()
854 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_suspend()
855 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_suspend()
862 struct tegra_display_hub *hub = dev_get_drvdata(dev); in tegra_display_hub_resume() local
865 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_resume()
869 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_resume()
873 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_resume()
877 err = reset_control_deassert(hub->rst); in tegra_display_hub_resume()
884 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_resume()
886 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_resume()
888 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_resume()
913 .name = "tegra-display-hub",