diff options
| author | Sai Gurrappadi <sgurrappadi@nvidia.com> | 2017-10-03 20:35:33 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-24 13:36:28 -0400 |
| commit | 7bd013d4c0ebdafbdb300d562f24737e0d3e583c (patch) | |
| tree | 95018bb8cb9b815300729c220bba6c501aa4c6a1 /include/linux | |
| parent | d7b51e4ad0bdb035743ff9383ee85366e1db8a58 (diff) | |
video: tegra: host: Fix up cluster power clamps
Some host1x clients require cluster power clamps to be applied before
executing any cluster wide power sequences (eg: railgating). Currently
this is implemented by client modules via pre_poweron() and
prepare_poweroff().
However, things end up breaking badly if the finalize_poweron() calls for
the client fail. The subsequent error paths can end up causing mismatches
in the cluster clamp ref counts.
Fix this by implementing cluster power clamp support explicitly in nvhost.
All clamp operations therefore remain in sync.
Bug 200352108
Change-Id: I70f47ed33814f25b81f17045248954468e929c73
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1572791
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvhost.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index 20793c850..14db3b700 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h | |||
| @@ -265,8 +265,12 @@ struct nvhost_device_data { | |||
| 265 | struct rw_semaphore busy_lock; | 265 | struct rw_semaphore busy_lock; |
| 266 | bool forced_idle; | 266 | bool forced_idle; |
| 267 | 267 | ||
| 268 | /* Used to run any device specific code before module poweron */ | 268 | /* |
| 269 | void (*pre_poweron)(struct platform_device *dev); | 269 | * Used to clamp/unclamp clusters across any cluster power sequences. |
| 270 | * The clamp is applied after poweroff and unclamp prior to poweron. | ||
| 271 | */ | ||
| 272 | void (*cluster_unclamp)(struct platform_device *dev); | ||
| 273 | void (*cluster_clamp)(struct platform_device *dev); | ||
| 270 | 274 | ||
| 271 | /* Finalize power on. Can be used for context restore. */ | 275 | /* Finalize power on. Can be used for context restore. */ |
| 272 | int (*finalize_poweron)(struct platform_device *dev); | 276 | int (*finalize_poweron)(struct platform_device *dev); |
