video: tegra: host: t19x: CV cluster clamps for pg

The CV cluster needs to be clamped before/after a rail gate/ungate
sequence. Since there is no way to hook into the CV power domain's
poweroff/poweron functions, track references to the CV domain explicitly
by having client CV modules get/put references to the CV cluster.

The first client module to poweron will result in the CV cluster clamp
getting disabled and the last client module to poweroff will result in the
clamp getting set. This will ensure that any subsequent CV rail gating
sequence happens with the clamps in place.

Jira HOSTX-194

Change-Id: Ic65176e15c1a487a020712a02147cbfc3f2f83c3
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1517643
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sai Gurrappadi
2017-07-11 17:31:35 -07:00
committed by Laxman Dewangan
parent 35c796151b
commit 5002cec200

View File

@@ -37,6 +37,7 @@
#include "t194/t194.h"
#include "nvhost_queue.h"
#include "nvhost_cv_pm.h"
#include "nvdla/nvdla.h"
#include "nvdla/nvdla_debug.h"
@@ -531,9 +532,14 @@ int nvhost_nvdla_prepare_poweroff(struct platform_device *pdev)
nvdla_dbg_fn(pdev, "");
ret = nvhost_flcn_prepare_poweroff(pdev);
if (ret)
if (ret) {
nvdla_dbg_err(pdev, "failed to poweroff\n");
goto out;
}
cv_cluster_clamp(pdev);
out:
return ret;
}