Lines Matching refs: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()
152 void tegra_display_hub_cleanup(struct tegra_display_hub *hub) in tegra_display_hub_cleanup() argument
160 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_cleanup()
161 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(&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()
745 struct tegra_display_hub *hub; in tegra_display_hub_probe() local
749 hub = devm_kzalloc(&pdev->dev, sizeof(*hub), GFP_KERNEL); in tegra_display_hub_probe()
750 if (!hub) in tegra_display_hub_probe()
753 hub->soc = of_device_get_match_data(&pdev->dev); in tegra_display_hub_probe()
755 hub->clk_disp = devm_clk_get(&pdev->dev, "disp"); in tegra_display_hub_probe()
756 if (IS_ERR(hub->clk_disp)) { in tegra_display_hub_probe()
757 err = PTR_ERR(hub->clk_disp); in tegra_display_hub_probe()
761 hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc"); in tegra_display_hub_probe()
762 if (IS_ERR(hub->clk_dsc)) { in tegra_display_hub_probe()
763 err = PTR_ERR(hub->clk_dsc); in tegra_display_hub_probe()
767 hub->clk_hub = devm_clk_get(&pdev->dev, "hub"); in tegra_display_hub_probe()
768 if (IS_ERR(hub->clk_hub)) { in tegra_display_hub_probe()
769 err = PTR_ERR(hub->clk_hub); in tegra_display_hub_probe()
773 hub->rst = devm_reset_control_get(&pdev->dev, "misc"); in tegra_display_hub_probe()
774 if (IS_ERR(hub->rst)) { in tegra_display_hub_probe()
775 err = PTR_ERR(hub->rst); in tegra_display_hub_probe()
779 hub->wgrps = devm_kcalloc(&pdev->dev, hub->soc->num_wgrps, in tegra_display_hub_probe()
780 sizeof(*hub->wgrps), GFP_KERNEL); in tegra_display_hub_probe()
781 if (!hub->wgrps) in tegra_display_hub_probe()
784 for (i = 0; i < hub->soc->num_wgrps; i++) { in tegra_display_hub_probe()
785 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe()
803 err = reset_control_assert(hub->rst); in tegra_display_hub_probe()
807 platform_set_drvdata(pdev, hub); in tegra_display_hub_probe()
810 INIT_LIST_HEAD(&hub->client.list); in tegra_display_hub_probe()
811 hub->client.ops = &tegra_display_hub_ops; in tegra_display_hub_probe()
812 hub->client.dev = &pdev->dev; in tegra_display_hub_probe()
814 err = host1x_client_register(&hub->client); in tegra_display_hub_probe()
824 struct tegra_display_hub *hub = platform_get_drvdata(pdev); in tegra_display_hub_remove() local
827 err = host1x_client_unregister(&hub->client); in tegra_display_hub_remove()
840 struct tegra_display_hub *hub = dev_get_drvdata(dev); in tegra_display_hub_suspend() local
843 err = reset_control_assert(hub->rst); in tegra_display_hub_suspend()
847 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_suspend()
848 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_suspend()
849 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_suspend()
856 struct tegra_display_hub *hub = dev_get_drvdata(dev); in tegra_display_hub_resume() local
859 err = clk_prepare_enable(hub->clk_disp); in tegra_display_hub_resume()
863 err = clk_prepare_enable(hub->clk_dsc); in tegra_display_hub_resume()
867 err = clk_prepare_enable(hub->clk_hub); in tegra_display_hub_resume()
871 err = reset_control_deassert(hub->rst); in tegra_display_hub_resume()
878 clk_disable_unprepare(hub->clk_hub); in tegra_display_hub_resume()
880 clk_disable_unprepare(hub->clk_dsc); in tegra_display_hub_resume()
882 clk_disable_unprepare(hub->clk_disp); in tegra_display_hub_resume()