mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/nouveau: tegra: Explicitly specify PMC instance to use
Currently the kernel relies on a global variable to reference the PMC context. Use an explicit lookup for the PMC and pass that to the public PMC APIs. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
64e609f929
commit
3ef27f1ad5
|
|
@ -18,6 +18,8 @@ struct nvkm_device_tegra {
|
|||
|
||||
struct regulator *vdd;
|
||||
|
||||
struct tegra_pmc *pmc;
|
||||
|
||||
struct {
|
||||
/*
|
||||
* Protects accesses to mm from subsystems
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev)
|
|||
reset_control_assert(tdev->rst);
|
||||
udelay(10);
|
||||
|
||||
ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
|
||||
ret = tegra_pmc_powergate_remove_clamping(tdev->pmc,
|
||||
TEGRA_POWERGATE_3D);
|
||||
if (ret)
|
||||
goto err_clamp;
|
||||
udelay(10);
|
||||
|
|
@ -307,6 +308,12 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
|
|||
goto free;
|
||||
}
|
||||
|
||||
tdev->pmc = devm_tegra_pmc_get(&pdev->dev);
|
||||
if (IS_ERR(tdev->pmc)) {
|
||||
ret = PTR_ERR(tdev->pmc);
|
||||
goto free;
|
||||
}
|
||||
|
||||
/**
|
||||
* The IOMMU bit defines the upper limit of the GPU-addressable space.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user