Lines Matching refs:wgrp
96 static int tegra_windowgroup_enable(struct tegra_windowgroup *wgrp) in tegra_windowgroup_enable() argument
100 mutex_lock(&wgrp->lock); in tegra_windowgroup_enable()
102 if (wgrp->usecount == 0) { in tegra_windowgroup_enable()
103 err = host1x_client_resume(wgrp->parent); in tegra_windowgroup_enable()
105 dev_err(wgrp->parent->dev, "failed to resume: %d\n", err); in tegra_windowgroup_enable()
109 reset_control_deassert(wgrp->rst); in tegra_windowgroup_enable()
112 wgrp->usecount++; in tegra_windowgroup_enable()
115 mutex_unlock(&wgrp->lock); in tegra_windowgroup_enable()
119 static void tegra_windowgroup_disable(struct tegra_windowgroup *wgrp) in tegra_windowgroup_disable() argument
123 mutex_lock(&wgrp->lock); in tegra_windowgroup_disable()
125 if (wgrp->usecount == 1) { in tegra_windowgroup_disable()
126 err = reset_control_assert(wgrp->rst); in tegra_windowgroup_disable()
129 wgrp->index); in tegra_windowgroup_disable()
132 host1x_client_suspend(wgrp->parent); in tegra_windowgroup_disable()
135 wgrp->usecount--; in tegra_windowgroup_disable()
136 mutex_unlock(&wgrp->lock); in tegra_windowgroup_disable()
150 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_prepare() local
153 if (wgrp->parent) in tegra_display_hub_prepare()
154 tegra_windowgroup_enable(wgrp); in tegra_display_hub_prepare()
169 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_cleanup() local
172 if (wgrp->parent) in tegra_display_hub_cleanup()
173 tegra_windowgroup_disable(wgrp); in tegra_display_hub_cleanup()
553 unsigned int wgrp, in tegra_shared_plane_create() argument
575 plane->wgrp = &hub->wgrps[wgrp]; in tegra_shared_plane_create()
576 plane->wgrp->parent = &dc->client; in tegra_shared_plane_create()
889 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_probe() local
893 mutex_init(&wgrp->lock); in tegra_display_hub_probe()
894 wgrp->usecount = 0; in tegra_display_hub_probe()
895 wgrp->index = i; in tegra_display_hub_probe()
897 wgrp->rst = devm_reset_control_get(&pdev->dev, id); in tegra_display_hub_probe()
898 if (IS_ERR(wgrp->rst)) in tegra_display_hub_probe()
899 return PTR_ERR(wgrp->rst); in tegra_display_hub_probe()
901 err = reset_control_assert(wgrp->rst); in tegra_display_hub_probe()
976 struct tegra_windowgroup *wgrp = &hub->wgrps[i]; in tegra_display_hub_remove() local
978 mutex_destroy(&wgrp->lock); in tegra_display_hub_remove()