drm/nouveau/tegra: Skip manual unpowergating when not necessary
authorMikko Perttunen <mperttunen@nvidia.com>
Fri, 9 Jun 2017 12:25:39 +0000 (15:25 +0300)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:05:03 +0000 (14:05 +1000)
On Tegra186, powergating is handled by the BPMP power domain provider
and the "legacy" powergating API is not available. Therefore skip
these calls if we are attached to a power domain.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c

index 6474bd2a6d0704a832438520c6766d3154711e22..3d42cdbbe9c0bcf262ab729edd30493b188a04a0 100644 (file)
@@ -51,10 +51,12 @@ 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);
-       if (ret)
-               goto err_clamp;
-       udelay(10);
+       if (!tdev->pdev->dev.pm_domain) {
+               ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
+               if (ret)
+                       goto err_clamp;
+               udelay(10);
+       }
 
        reset_control_deassert(tdev->rst);
        udelay(10);